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:
authorDavid Benson <david@jgraph.com>2018-11-07 19:49:01 +0300
committerDavid Benson <david@jgraph.com>2018-11-07 19:49:01 +0300
commitddec2bbb9c478010edf6d34d295ea21d21a12f17 (patch)
treebd603cbdf11db38102b439168de2b1ac4be27e7e
parentb7972359bc3354e715248884b17f250a71f66d94 (diff)
9.3.4 releasev9.3.4
Former-commit-id: 6fbf5bc048f99af6d3d20ac1ada6b2eaa8a9d79a
-rw-r--r--ChangeLog9
-rw-r--r--VERSION2
-rw-r--r--etc/mxgraph/mxClient.js2
-rw-r--r--etc/vsd/README.txt2
-rw-r--r--src/main/java/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java3
-rw-r--r--src/main/java/com/mxgraph/io/gliffy/importer/SVGImporterUtils.java131
-rw-r--r--src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java5
-rw-r--r--src/main/webapp/WEB-INF/lib/mxgraph-core.jarbin463555 -> 468185 bytes
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/index.html114
-rw-r--r--src/main/webapp/js/app.min.js1680
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js1907
-rw-r--r--src/main/webapp/js/atlas.min.js791
-rw-r--r--src/main/webapp/js/diagramly/App.js67
-rw-r--r--src/main/webapp/js/diagramly/DistanceGuides.js214
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js139
-rw-r--r--src/main/webapp/js/diagramly/DriveClient.js571
-rw-r--r--src/main/webapp/js/diagramly/DriveFile.js467
-rw-r--r--src/main/webapp/js/diagramly/DriveRealtime.js47
-rw-r--r--src/main/webapp/js/diagramly/Editor.js26
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js49
-rw-r--r--src/main/webapp/js/diagramly/GitHubClient.js2
-rw-r--r--src/main/webapp/js/diagramly/Menus.js63
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js11
-rw-r--r--src/main/webapp/js/diagramly/Pages.js8
-rw-r--r--src/main/webapp/js/diagramly/vsdx/importer.js16
-rw-r--r--src/main/webapp/js/embed-static.min.js23
-rw-r--r--src/main/webapp/js/extensions.min.js16
-rw-r--r--src/main/webapp/js/mxgraph/Dialogs.js10
-rw-r--r--src/main/webapp/js/mxgraph/Graph.js12
-rw-r--r--src/main/webapp/js/reader.min.js23
-rw-r--r--src/main/webapp/js/sanitizer/sanitizer.min.js3
-rw-r--r--src/main/webapp/js/viewer.min.js1907
-rw-r--r--src/main/webapp/resources/dia.txt4
-rw-r--r--src/main/webapp/resources/dia_am.txt4
-rw-r--r--src/main/webapp/resources/dia_ar.txt4
-rw-r--r--src/main/webapp/resources/dia_bg.txt2
-rw-r--r--src/main/webapp/resources/dia_bn.txt4
-rw-r--r--src/main/webapp/resources/dia_bs.txt2
-rw-r--r--src/main/webapp/resources/dia_ca.txt2
-rw-r--r--src/main/webapp/resources/dia_cs.txt2
-rw-r--r--src/main/webapp/resources/dia_da.txt2
-rw-r--r--src/main/webapp/resources/dia_de.txt4
-rw-r--r--src/main/webapp/resources/dia_el.txt2
-rw-r--r--src/main/webapp/resources/dia_eo.txt20
-rw-r--r--src/main/webapp/resources/dia_es.txt2
-rw-r--r--src/main/webapp/resources/dia_et.txt2
-rw-r--r--src/main/webapp/resources/dia_fa.txt2
-rw-r--r--src/main/webapp/resources/dia_fi.txt2
-rw-r--r--src/main/webapp/resources/dia_fil.txt2
-rw-r--r--src/main/webapp/resources/dia_fr.txt2
-rw-r--r--src/main/webapp/resources/dia_gu.txt4
-rw-r--r--src/main/webapp/resources/dia_he.txt2
-rw-r--r--src/main/webapp/resources/dia_hi.txt4
-rw-r--r--src/main/webapp/resources/dia_hr.txt4
-rw-r--r--src/main/webapp/resources/dia_hu.txt2
-rw-r--r--src/main/webapp/resources/dia_i18n.txt2
-rw-r--r--src/main/webapp/resources/dia_id.txt2
-rw-r--r--src/main/webapp/resources/dia_it.txt2
-rw-r--r--src/main/webapp/resources/dia_ja.txt2
-rw-r--r--src/main/webapp/resources/dia_kn.txt4
-rw-r--r--src/main/webapp/resources/dia_ko.txt2
-rw-r--r--src/main/webapp/resources/dia_lt.txt4
-rw-r--r--src/main/webapp/resources/dia_lv.txt4
-rw-r--r--src/main/webapp/resources/dia_ml.txt4
-rw-r--r--src/main/webapp/resources/dia_mr.txt4
-rw-r--r--src/main/webapp/resources/dia_ms.txt2
-rw-r--r--src/main/webapp/resources/dia_nl.txt14
-rw-r--r--src/main/webapp/resources/dia_no.txt2
-rw-r--r--src/main/webapp/resources/dia_pl.txt2
-rw-r--r--src/main/webapp/resources/dia_pt-br.txt2
-rw-r--r--src/main/webapp/resources/dia_pt.txt2
-rw-r--r--src/main/webapp/resources/dia_ro.txt2
-rw-r--r--src/main/webapp/resources/dia_ru.txt2
-rw-r--r--src/main/webapp/resources/dia_sk.txt4
-rw-r--r--src/main/webapp/resources/dia_sl.txt4
-rw-r--r--src/main/webapp/resources/dia_sr.txt2
-rw-r--r--src/main/webapp/resources/dia_sv.txt2
-rw-r--r--src/main/webapp/resources/dia_sw.txt4
-rw-r--r--src/main/webapp/resources/dia_ta.txt4
-rw-r--r--src/main/webapp/resources/dia_te.txt4
-rw-r--r--src/main/webapp/resources/dia_th.txt2
-rw-r--r--src/main/webapp/resources/dia_tr.txt2
-rw-r--r--src/main/webapp/resources/dia_uk.txt2
-rw-r--r--src/main/webapp/resources/dia_vi.txt2
-rw-r--r--src/main/webapp/resources/dia_zh-tw.txt2
-rw-r--r--src/main/webapp/resources/dia_zh.txt2
87 files changed, 5033 insertions, 3463 deletions
diff --git a/ChangeLog b/ChangeLog
index 565b5539..c25cc3c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+06-NOV-2018: 9.3.4
+
+- Improves sanity check for Google Drive files
+- Uses mxGraph 3.9.11 beta 4
+
+02-NOV-2018: 9.3.2
+
+- Adds sanity check for Google Drive files
+
26-OCT-2018: 9.3.1
- Adds current page index to JSON protocol
diff --git a/VERSION b/VERSION
index 4fb2e5db..ca327ca0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-9.3.1 \ No newline at end of file
+9.3.4 \ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index fa940fd7..c75a3018 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -556,7 +556,7 @@ mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){g||a.setShadow(!1);a.b
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};
mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),k=this.graph.model.getTerminal(g,!0)==a;if(!b||k)k=this.graph.view.getVisibleTerminal(g,!k),this.traverse(k,b,c,g,e)}};
-mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(cell)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
diff --git a/etc/vsd/README.txt b/etc/vsd/README.txt
index 2242b612..b6f50e90 100644
--- a/etc/vsd/README.txt
+++ b/etc/vsd/README.txt
@@ -36,7 +36,7 @@ Running the conversion site without Hyper-V:
========================================
Running the conversion site with Hyper-V:
-1- Run VsdConverterApp TCP sever
+1- Run VsdConverterApp TCP sever (Also disable QuickEdit Mode: Property > Options > Edit Options > QuickEdit Mode)
2- Deploy VsdConverter to IIS (manually or using Web Deployment Tool).
In details (Ignore Hyper-V steps if it is running directly on the server):
diff --git a/src/main/java/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java b/src/main/java/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
index 9aa6c01b..e2552dba 100644
--- a/src/main/java/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
+++ b/src/main/java/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
@@ -811,7 +811,8 @@ public class GliffyDiagramConverter
cell.setVertex(true);
style.append("shape=image;imageAspect=0;");
Resource res = gliffyDiagram.embeddedResources.get(svg.embeddedResourceId);
-
+ SVGImporterUtils svgUtils = new SVGImporterUtils();
+ res.data = svgUtils.setViewBox(res.data);
style.append("image=data:image/svg+xml,").append(res.getBase64EncodedData()).append(";");
}
}
diff --git a/src/main/java/com/mxgraph/io/gliffy/importer/SVGImporterUtils.java b/src/main/java/com/mxgraph/io/gliffy/importer/SVGImporterUtils.java
new file mode 100644
index 00000000..7a81a8bd
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/gliffy/importer/SVGImporterUtils.java
@@ -0,0 +1,131 @@
+package com.mxgraph.io.gliffy.importer;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Class is used to stripe large unused white areas on SVG files and return only important parts.
+ * For example, if you have centered square of 50x50 size on 200x200 canvas this class will remove
+ * unused portions of the canvas and return larger square from the center.
+ *
+ */
+public class SVGImporterUtils
+{
+
+ private static final Pattern SVG_PATTERN = Pattern.compile("viewBox=\"(.*?)\"");
+
+ private final static Logger LOGGER = Logger.getLogger(SVGImporterUtils.class.getName());
+
+ public SVGImporterUtils()
+ {
+ }
+
+ /**
+ * This is main method that will return new viewBox value. Then we use this value to update existing SVG string in Gliffy object.
+ *
+ * @param svgString original SVG string from Gliffy Object.
+ * @return recalculated viewBox parameters as a String
+ */
+ public String setViewBox(String svgString)
+ {
+ try
+ {
+ Matcher m = SVG_PATTERN.matcher(svgString);
+ while (m.find())
+ {
+ String oldViewBox = m.group();
+ String newViewBox = getNewViewBox(svgString);
+ if (newViewBox != null)
+ {
+ return svgString.replace(oldViewBox, newViewBox);
+ }
+ }
+ }
+ catch (Throwable exc)
+ {
+ //perfectly fine to blow-up, just ignore - original string will be returned if something goes wrong
+ LOGGER.log(Level.WARNING, "Cannot set viewBox for: " + svgString + " with error " + exc);
+ }
+
+ return svgString;
+ }
+
+ private String getNewViewBox(String svgString) throws Exception
+ {
+ String result = null;
+ Object svg = createSVGDocument(svgString);
+ buildDocument(svg);
+ result = getViewBoxString(svg);
+ return result;
+ }
+
+ private Object createSVGDocument(String svgString) throws Exception
+ {
+ InputStream stream = new ByteArrayInputStream(svgString.getBytes(StandardCharsets.UTF_8));
+ Class<?> myClass = Class.forName("org.apache.batik.dom.svg.SAXSVGDocumentFactory");
+ Method myMethod = myClass.getDeclaredMethod("createSVGDocument", String.class, InputStream.class);
+ String param = null;
+ Object newInstance = myClass.getConstructor(String.class).newInstance(param);
+ Object o = myMethod.invoke(newInstance, "http://www.w3.org/2000/svg", stream);
+ return o;
+ }
+
+ private void buildDocument(Object svg) throws Exception
+ {
+ Class<?> bridgeContextClass = Class.forName("org.apache.batik.bridge.BridgeContext");
+ Class<?> userAgentAdapterClass = Class.forName("org.apache.batik.bridge.UserAgentAdapter");
+ Class<?> userAgentClass = Class.forName("org.apache.batik.bridge.UserAgent");
+ Class<?> gvtBuilderClass = Class.forName("org.apache.batik.bridge.GVTBuilder");
+ Class<?> documentClass = Class.forName("org.w3c.dom.Document");
+
+ Method myBuildMethod = gvtBuilderClass.getDeclaredMethod("build", bridgeContextClass, documentClass);
+ Object newBuilderInstance = gvtBuilderClass.getConstructor().newInstance();
+ Object newUserAgentAdapterInstance = userAgentAdapterClass.getConstructor().newInstance();
+ Object newBridgeContextClass = bridgeContextClass.getConstructor(userAgentClass).newInstance(newUserAgentAdapterInstance);
+ myBuildMethod.invoke(newBuilderInstance, newBridgeContextClass, svg);
+
+ }
+
+ private String getViewBoxString(Object svg) throws Exception
+ {
+ Class<?> svgDocumentClass = Class.forName("org.apache.batik.dom.svg.SVGOMDocument");
+ Class<?> svgSVGElement = Class.forName("org.apache.batik.dom.svg.SVGOMSVGElement");
+ Class<?> svgRect = Class.forName("org.w3c.dom.svg.SVGRect");
+
+ Method getRootElement = svgDocumentClass.getDeclaredMethod("getRootElement");
+ Method getBBox = svgSVGElement.getDeclaredMethod("getBBox");
+ Method getX = svgRect.getDeclaredMethod("getX");
+ Method getY = svgRect.getDeclaredMethod("getY");
+ Method getHeight = svgRect.getDeclaredMethod("getHeight");
+ Method getWidth = svgRect.getDeclaredMethod("getWidth");
+
+ Object root = getRootElement.invoke(svg);
+ Object bbox = getBBox.invoke(root);
+ Object x = getX.invoke(bbox);
+ Object y = getY.invoke(bbox);
+ Object height = getHeight.invoke(bbox);
+ Object width = getWidth.invoke(bbox);
+
+ String result = String.format("viewBox=\"%s %s %s %s\"", getIntValue(x.toString()), getIntValue(y.toString()),
+ getIntValue(width.toString()), getIntValue(height.toString()));
+ return result;
+
+ }
+
+ private String getIntValue(String value)
+ {
+ int dot = value.indexOf(".");
+ if (dot > 0)
+ {
+ return value.substring(0, dot);
+ }
+ return value;
+ }
+
+}
diff --git a/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java b/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java
index 2e26c5b8..8bb7e46e 100644
--- a/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java
+++ b/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java
@@ -284,7 +284,10 @@ public class GliffyObject implements PostDeserializable
public String getText()
{
- return graphic.getText().getHtml();
+ GliffyText text = graphic.getText();
+ //TODO These values are hurestics based on analyzing many files. 6 is a range from 2 to 6 so used the maximum
+ int widthDiff = "none".equals(text.overflow)? -3 : 6;
+ return "<div style='width: "+ (width + widthDiff) +"px;height: "+ height +"px;word-break: break-word;'>" + text.getHtml() + "</div>";
}
/**
diff --git a/src/main/webapp/WEB-INF/lib/mxgraph-core.jar b/src/main/webapp/WEB-INF/lib/mxgraph-core.jar
index 8984743d..a2f78299 100644
--- a/src/main/webapp/WEB-INF/lib/mxgraph-core.jar
+++ b/src/main/webapp/WEB-INF/lib/mxgraph-core.jar
Binary files differ
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 8f38eed0..f5ee32e0 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!
-# 10/26/2018 05:46 PM
+# 11/06/2018 04:33 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 604ccf54..4ca516a3 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -410,7 +410,119 @@
/**
* Main
*/
-App.main();
+App.main(function (ui)
+{
+ // **************************************************
+ // TESTING JSON TO XML CONVERTER FOR EOL OF GOOGLE RT
+ // **************************************************
+// ui.JSON_CHECK = 'JSON-CHECK7';
+
+// DriveFile.prototype.runCheck = function(json, fileNode, fileData)
+// {
+// try
+// {
+// this.debug('JSON Check', this.desc, json);
+
+// if (this.ui.getCurrentFile() == this && !this.isModified())
+// {
+// // Gets comparable XML structures
+// var convert = (json != null) ? this.getComparableFile(this.ui.drive.convertJsonToXml(json, true)) : null;
+// var remote = (fileNode != null) ? this.getComparableFile(fileNode) : null;
+// var local = this.getComparableFile(this.ui.getXmlFileData());
+
+// // Uses the newer of the two
+// var age = this.ui.drive.getRealtimeAge(this.desc, json);
+// var relevant = (age < 0 && convert != null) ? convert : remote;
+
+// if (local == null || relevant == null || !local.isEqualNode(relevant))
+// {
+// this.log('FAIL-REPORT');
+
+// var summary = ((relevant == convert) ? 'Source: Convert' : 'Source: Remote') +
+// '\nFile modified: ' + new Date(this.desc.modifiedDate).toUTCString();
+
+// if (json != null)
+// {
+// var mod = (json.value != null && json.value.modifiedDate != null) ? json.value.modifiedDate.json : null;
+
+// if (mod != null)
+// {
+// summary += '\nJson modified: ' + new Date(mod).toUTCString();
+// }
+
+// var bak = (json.value != null && json.value.backupDate != null) ? json.value.backupDate.json : null;
+
+// if (bak != null)
+// {
+// summary += '\nJson backedup: ' + new Date(bak).toUTCString();
+// }
+// }
+
+// if (local != null)
+// {
+// if (convert != null)
+// {
+// summary += '\nConvert-Equals-Local: ' + convert.isEqualNode(local);
+// }
+
+// if (remote != null)
+// {
+// summary += '\nRemote-Equals-Local: ' + remote.isEqualNode(local);
+// }
+// }
+
+// this.report('Realtime Error Report ' + new Date() +
+// '\n\nDescription: ' + JSON.stringify({version: this.ui.JSON_CHECK,
+// realtimeAge: age, title: this.desc.title, editable: this.desc.editable,
+// copyable: this.desc.copyable, labels: this.desc.labels, id: this.desc.id,
+// userPermission: this.desc.userPermission, fileSize: this.desc.fileSize,
+// fileExtension: this.desc.fileExtension, modifiedDate: this.desc.modifiedDate,
+// mimeType: this.desc.mimeType}) +
+// '\n\nSummary:\n' + summary +
+// '\n\nLocal:\n' + this.getAnonymizedXml(local) +
+// '\n\nRemote:\n' + this.getAnonymizedXml(remote) +
+// ((remote == null) ? ('\n\nData:\n' + fileData) : '') +
+// '\n\nConvert:\n' + this.getAnonymizedXml(convert) +
+// '\n\nJSON:\n' + this.getAnonymizedJson(json));
+// }
+// else
+// {
+// this.log('OK-age.' + age + '.');
+// }
+// }
+// }
+// catch (e)
+// {
+// this.log('CATCH-RUNCHECK-' + e.stack, true);
+// this.debug(e);
+// }
+// };
+
+// ui.editor.addListener('fileLoaded', mxUtils.bind(this, function()
+// {
+// try
+// {
+// var file = ui.getCurrentFile();
+
+// if (file != null && file.constructor == DriveFile && file.realtime != null)
+// {
+// // With a 30% probability
+// if (urlParams['json-check'] != '0' && (urlParams['json-check'] == '1' ||
+// (Math.random() > 0.3 && urlParams['dev'] != '1')))
+// {
+// file.checkConvert();
+// }
+// }
+// }
+// catch (e)
+// {
+// // ignore
+// }
+// }));
+ // ***********
+ // END OF TEST
+ // ***********
+});
</script>
</body>
</html>
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 23b09f68..aad70d0e 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -1,6 +1,7 @@
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
// NOTE: Modified to support data URIs for images, ie. data:image/*
+// Modified to allow "word-break: break-word" in styles. It is done by adding "break-word" which is at index 55 of J array J[55] to "cssLitGroup" of "word-break"
(function(){var c=void 0,n=!0,s=null,C=!1,J=["aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow,springgreen,steelblue,tan,teal,thistle,tomato,transparent,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","),
"all-scroll,col-resize,crosshair,default,e-resize,hand,help,move,n-resize,ne-resize,no-drop,not-allowed,nw-resize,pointer,progress,row-resize,s-resize,se-resize,sw-resize,text,vertical-text,w-resize,wait".split(","),"armenian,decimal,decimal-leading-zero,disc,georgian,lower-alpha,lower-greek,lower-latin,lower-roman,square,upper-alpha,upper-latin,upper-roman".split(","),"100,200,300,400,500,600,700,800,900,bold,bolder,lighter".split(","),"block-level,inline-level,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),
"condensed,expanded,extra-condensed,extra-expanded,narrower,semi-condensed,semi-expanded,ultra-condensed,ultra-expanded,wider".split(","),"inherit,inline,inline-block,inline-box,inline-flex,inline-grid,inline-list-item,inline-stack,inline-table,run-in".split(","),"behind,center-left,center-right,far-left,far-right,left-side,leftwards,right-side,rightwards".split(","),"large,larger,small,smaller,x-large,x-small,xx-large,xx-small".split(","),"dashed,dotted,double,groove,outset,ridge,solid".split(","),
@@ -25,7 +26,7 @@ position:{cssPropBits:0,cssLitGroup:[J[23]],cssFns:[]},quotes:{cssPropBits:8,css
cssLitGroup:[J[14],J[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[J[52],J[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[J[42],J[56],J[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[J[19],J[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[J[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[J[26],J[71]],cssFns:[]},"text-wrap":{cssPropBits:0,
cssLitGroup:[J[46],J[71],J[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[J[71]],cssFns:"matrix(),perspective(),rotate(),rotate3d(),rotatex(),rotatey(),rotatez(),scale(),scale3d(),scalex(),scaley(),scalez(),skew(),skewx(),skewy(),translate(),translate3d(),translatex(),translatey(),translatez()".split(",")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[J[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[J[10],J[48],J[50],J[71]],cssFns:["cubic-bezier()",
"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[J[48],J[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[J[30],J[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[J[12],J[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[J[27],J[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[J[17],J[69]],
-cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
+cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72],J[55]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
J[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[11],J[31],J[42],J[48],J[56],J[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[J[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[J[48],J[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[J[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},O;for(O in L)"string"===typeof L[O]&&Object.hasOwnProperty.call(L,O)&&(L[O]=L[L[O]]);"undefined"!==typeof window&&(window.cssSchema=L);var U,X;
@@ -663,7 +664,7 @@ mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){g||a.setShadow(!1);a.b
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};
mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),k=this.graph.model.getTerminal(g,!0)==a;if(!b||k)k=this.graph.view.getVisibleTerminal(g,!k),this.traverse(k,b,c,g,e)}};
-mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(cell)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
@@ -2461,13 +2462,14 @@ Graph.prototype.isCellFoldable=function(a){var c=this.view.getState(a),c=null!=c
Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var d=a.value.getAttribute("tooltip");if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),c=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var b=[];this.isEnabled()&&d.push("link");for(var f=0;f<a.length;f++)0>mxUtils.indexOf(d,a[f].nodeName)&&0<a[f].nodeValue.length&&b.push({name:a[f].nodeName,value:a[f].nodeValue});b.sort(function(a,b){return a.name<b.name?
-1:a.name>b.name?1:0});for(f=0;f<b.length;f++)"link"==b[f].name&&this.isCustomLink(b[f].value)||(c+=("link"!=b[f].name?"<b>"+b[f].name+":</b> ":"")+mxUtils.htmlEntities(b[f].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;">'+c+"</div>"))}}return c};Graph.prototype.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};
-Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
-Graph.prototype.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&c.push(a.charAt(d))}return c.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
-HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
-HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
-HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
-HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":
-IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
+Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.prototype.compressNode=function(a){return this.compress(this.zapGremlins(mxUtils.getXml(a)))};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};
+Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};Graph.prototype.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&c.push(a.charAt(d))}return c.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;
+HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";
+HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
+HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);
+HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
+HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+
+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,
mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
@@ -3169,9 +3171,8 @@ c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&
"right";var d=document.createElement("textarea");d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();
a.preventDefault()},!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var f=document.createElement("select");f.style.width="180px";f.className=
"geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),
-f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),a.editor.graph.openLink(a.getUrl());else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==
-f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};
-EditDiagramDialog.showNewWindowOption=!0;
+f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;
+(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+p.value:a+"."+p.value;"xml"===p.value?(n.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),t.setAttribute("disabled","true")):(n.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),t.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}
function d(){q.style.backgroundColor=q.value*r.value>MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,
mxResources.get("filename")+":");f.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");f.appendChild(k);var p=document.createElement("select");p.style.width="180px";k=document.createElement("option");k.setAttribute("value",
@@ -7163,17 +7164,18 @@ DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxU
DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,c,d){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,c){};DrawioFile.prototype.saveFile=function(a,b,c,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.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,c){};DrawioFile.prototype.isMovable=function(){return!1};
DrawioFile.prototype.move=function(a,b,c){};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.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var c=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=c&&c.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
-this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);
-this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
-DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<span title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</span>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("span"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,b,c,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=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!=c&&c(a)}),
-mxUtils.bind(this,function(a){null!=d&&d(a)}))}else null!=c&&c(null)}),a)};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.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var c=a.lastIndexOf("."),d=0<c?a.substring(c):"",c=b.lastIndexOf(".");return d===(0<c?b.substring(c):"")}return a==b};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,b,c,d){DrawioFile.call(this,a,b);this.title=c;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,c){this.saveAs(this.title,b,c)};LocalFile.prototype.saveAs=function(a,b,c){this.saveFile(a,!1,b,c)};
+DrawioFile.prototype.open=function(){var a=this.getData();null!=a&&this.ui.setFileData(a);this.changeListener=mxUtils.bind(this,function(a,c){var b=null!=c?c.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",
+this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",
+this.changeListener)};
+DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null,
+0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()})))};
+DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus()};
+DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):
+null,null!=a&&0<a.length?mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()})):this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+"</div>"))};
+DrawioFile.prototype.autosave=function(a,b,c,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();var e=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThead==e&&(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!=c&&c(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=c&&c(null)}),a);this.autosaveThread=e};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.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};
+DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var c=a.lastIndexOf("."),d=0<c?a.substring(c):"",c=b.lastIndexOf(".");return d===(0<c?b.substring(c):"")}return a==b};DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,b,c,d){DrawioFile.call(this,a,b);this.title=c;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,c){this.saveAs(this.title,b,c)};LocalFile.prototype.saveAs=function(a,b,c){this.saveFile(a,!1,b,c)};
LocalFile.prototype.saveFile=function(a,b,c,d){this.title=a;this.updateFileData();b=this.getData();var e=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),g=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,e?"image/png":"text/xml",e);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
(e?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=c&&c()});e?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):g(b)};LocalFile.prototype.rename=function(a,b,c){this.title=a;this.descriptorChanged();null!=b&&b()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,b,c){LocalFile.call(this,a,b,c)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,b,c){this.saveFile(a,!1,b,c)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,b,c){DrawioFile.call(this,a,b);this.title=c};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};
@@ -7181,282 +7183,282 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,b,c,d){if(this.isEditable()){var e=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!=c&&c()}))}catch(g){null!=d&&d(g)}});this.isRenamable()&&"."==a.charAt(0)&&null!=d?d({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]),e,d):e()}))}else null!=c&&c()};StorageFile.prototype.rename=function(a,b,c){var d=this.getTitle();d!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var g=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(d,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,b)}),c)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),g,c):g()})):b()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};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,b,c){StorageFile.call(this,a,b,c)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,c){this.saveFile(a,!1,b,c)};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,b,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,c){StorageFile.call(this,a,b,c);a=c;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+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,b,c){return!1};UrlLibrary.prototype.saveAs=function(a,b,c){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,c){function d(d,e,g,t,w,u){function q(){mxEvent.addListener(v,"click",null!=u?u:function(){g!=App.MODE_GOOGLE||a.isDriveDomain()?g==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,f.checked);b()})):(a.setMode(g,f.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.boxSizing="border-box";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 10px 12px 10px";v.style.width="88px";v.style.height="100px";v.style.whiteSpace="nowrap";v.setAttribute("title",e);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var x=document.createElement("div");x.style.textOverflow="ellipsis";x.style.overflow="hidden";if(null!=d){var p=document.createElement("img");
-p.setAttribute("src",d);p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";v.appendChild(p)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(x.style.paddingTop="0px",x.style.marginTop="-2px");v.appendChild(x);mxUtils.write(x,e);if(null!=w)for(d=0;d<w.length;d++)mxUtils.br(x),mxUtils.write(x,w[d]);if(null!=t&&null==a[t]){p.style.visibility=
-"hidden";mxUtils.setOpacity(x,10);var l=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});l.spin(v);var m=window.setTimeout(function(){null==a[t]&&(l.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(m),mxUtils.setOpacity(x,100),p.style.visibility="",l.stop(),q(),"drive"==t&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else q();
-n.appendChild(v);++h>=c&&(mxUtils.br(n),h=0)}c=null!=c?c:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){g=document.createElement("a");g.setAttribute("href","https://about.draw.io/support/");g.setAttribute("title",mxResources.get("help"));g.setAttribute("target","_blank");g.style.position=
-"absolute";g.style.textDecoration="none";g.style.cursor="pointer";g.style.fontSize="12px";g.style.bottom="28px";g.style.left="26px";g.style.color="gray";var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";g.appendChild(l);mxUtils.write(g,mxResources.get("help"));e.appendChild(g)}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"};e.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 n=document.createElement("div");mxClient.IS_QUIRKS&&(n.style.whiteSpace="nowrap",n.style.cssFloat="left");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";n.style.padding="12px 0px 12px 0px";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;var h=0,k=document.createElement("p"),g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.paddingTop=
+StorageLibrary.prototype.isRenamable=function(a,b,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,c){StorageFile.call(this,a,b,c);a=c;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+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,b,c){return!1};UrlLibrary.prototype.saveAs=function(a,b,c){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,c){function d(d,e,g,t,w,u){function v(){mxEvent.addListener(p,"click",null!=u?u:function(){g!=App.MODE_GOOGLE||a.isDriveDomain()?g==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,f.checked);b()})):(a.setMode(g,f.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace="nowrap";p.setAttribute("title",e);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var x=document.createElement("div");x.style.textOverflow="ellipsis";x.style.overflow="hidden";if(null!=d){var q=document.createElement("img");
+q.setAttribute("src",d);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";p.appendChild(q)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(x.style.paddingTop="0px",x.style.marginTop="-2px");p.appendChild(x);mxUtils.write(x,e);if(null!=w)for(d=0;d<w.length;d++)mxUtils.br(x),mxUtils.write(x,w[d]);if(null!=t&&null==a[t]){q.style.visibility=
+"hidden";mxUtils.setOpacity(x,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(p);var l=window.setTimeout(function(){null==a[t]&&(k.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(l),mxUtils.setOpacity(x,100),q.style.visibility="",k.stop(),v(),"drive"==t&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else v();
+m.appendChild(p);++h>=c&&(mxUtils.br(m),h=0)}c=null!=c?c:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){g=document.createElement("a");g.setAttribute("href","https://about.draw.io/support/");g.setAttribute("title",mxResources.get("help"));g.setAttribute("target","_blank");g.style.position=
+"absolute";g.style.textDecoration="none";g.style.cursor="pointer";g.style.fontSize="12px";g.style.bottom="28px";g.style.left="26px";g.style.color="gray";var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";g.appendChild(k);mxUtils.write(g,mxResources.get("help"));e.appendChild(g)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer";l.style.fontSize="12px";
+l.style.bottom="28px";l.style.color="gray";mxUtils.write(l,mxResources.get("decideLater"));a.isOfflineApp()?l.style.right="20px":(mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)"),l.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=-Math.round(l.clientWidth/2)+"px"};e.appendChild(l);mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
+!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;var h=0,n=document.createElement("p"),g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.paddingTop=
"4px";g.style.paddingBottom="16px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");e.appendChild(g);"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");mxClient.IS_IOS&&"device"!=urlParams.storage||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);e.appendChild(n);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(f);l=document.createElement("span");l.style.color="gray";l.style.fontSize="12px";mxUtils.write(l," "+mxResources.get("rememberThisSetting"));g.appendChild(l);mxUtils.br(g);var q=a.getRecent();if(null!=q&&
-0<q.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var p=document.createElement("option");p.setAttribute("value","");p.setAttribute("selected","selected");p.style.textAlign="center";mxUtils.write(p,mxResources.get("openRecent")+"...");u.appendChild(p);for(p=0;p<q.length;p++)(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)+")");u.appendChild(c)})(q[p]);g.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else g.style.marginTop="20px",n.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()}),g.appendChild(q),n.style.paddingBottom="4px");n.appendChild(g);mxEvent.addListener(l,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
-document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(k.style.padding="8px",k.style.fontSize="9pt",k.style.marginTop="-14px",k.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>",e.appendChild(k))},5E3);this.container=
+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);e.appendChild(m);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(f);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));g.appendChild(k);mxUtils.br(g);var u=a.getRecent();if(null!=u&&
+0<u.length){var p=document.createElement("select");p.style.marginTop="8px";p.style.width="140px";var q=document.createElement("option");q.setAttribute("value","");q.setAttribute("selected","selected");q.style.textAlign="center";mxUtils.write(q,mxResources.get("openRecent")+"...");p.appendChild(q);for(q=0;q<u.length;q++)(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)+")");p.appendChild(c)})(u[q]);g.appendChild(p);mxEvent.addListener(p,"change",function(b){""!=p.value&&a.loadFile(p.value)})}else g.style.marginTop="20px",m.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(u=document.createElement("div"),u.style.cursor="pointer",u.style.padding="18px 0px 6px 0px",u.style.fontSize="12px",u.style.color="gray",mxUtils.write(u,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(u,"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()}),g.appendChild(u),m.style.paddingBottom="4px");m.appendChild(g);mxEvent.addListener(k,"click",function(a){f.checked=!f.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>",e.appendChild(n))},5E3);this.container=
e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var c=null,c=a.getServiceCount();if(!a.isOffline()&&1<c){c=document.createElement("a");c.setAttribute("href","https://about.draw.io/support/");c.setAttribute("title",mxResources.get("help"));c.setAttribute("target","_blank");c.style.position="absolute";c.style.fontSize="12px";c.style.textDecoration="none";c.style.cursor="pointer";c.style.bottom="22px";c.style.left="26px";c.style.color=
"gray";var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);d.style.marginRight="2px";c.appendChild(d);mxUtils.write(c,mxResources.get("help"));b.appendChild(c)}c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.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 e="";a.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",e=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",e=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",e=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",e=mxResources.get("github")):a.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+
-"/trello-logo.svg",e=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",e=mxResources.get("device"));var g=document.createElement("div");g.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(g.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):
-(c.appendChild(d),mxUtils.write(c,e),b.appendChild(c),g.style.border="1px solid #d3d3d3",g.style.borderWidth="1px 0px 1px 0px",g.style.padding="18px 0px 24px 0px",l.style.marginBottom="8px");mxClient.IS_QUIRKS&&(g.style.whiteSpace="nowrap",g.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});g.appendChild(l);mxUtils.br(g);l=document.createElement("button");
-l.className="geBigButton";l.style.marginBottom="22px";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram"));mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});g.appendChild(l);c="undefined";a.mode==App.MODE_GOOGLE?c=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?c=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?c=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?c=mxResources.get("github"):
-a.mode==App.MODE_TRELLO?c=mxResources.get("trello"):a.mode==App.MODE_DEVICE?c=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(c=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(e=function(b){l.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"));l.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(c,
-"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});g.appendChild(c)},d=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=d?(l.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="inline-block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+d.displayName+")"),l.style.marginBottom="16px",g.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();
+"/trello-logo.svg",e=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",e=mxResources.get("device"));var g=document.createElement("div");g.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?(g.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px"):
+(c.appendChild(d),mxUtils.write(c,e),b.appendChild(c),g.style.border="1px solid #d3d3d3",g.style.borderWidth="1px 0px 1px 0px",g.style.padding="18px 0px 24px 0px",k.style.marginBottom="8px");mxClient.IS_QUIRKS&&(g.style.whiteSpace="nowrap",g.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()});g.appendChild(k);mxUtils.br(g);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()});g.appendChild(k);c="undefined";a.mode==App.MODE_GOOGLE?c=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?c=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?c=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?c=mxResources.get("github"):
+a.mode==App.MODE_TRELLO?c=mxResources.get("trello"):a.mode==App.MODE_DEVICE?c=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(c=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(e=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";g.style.paddingBottom="18px";mxEvent.addListener(c,
+"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});g.appendChild(c)},d=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=d?(k.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="inline-block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+d.displayName+")"),k.style.marginBottom="16px",g.style.paddingBottom="18px",mxEvent.addListener(e,"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()})}))}),g.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(g),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="inline-block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",[c])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();
-a.showSplash(!0)}),g.appendChild(e));b.appendChild(g);this.container=b},ConfirmDialog=function(a,b,c,d,e,g,l,m,n){var f=document.createElement("div");f.style.textAlign="center";var h=document.createElement("div");h.style.padding="6px";h.style.overflow="auto";h.style.maxHeight="44px";mxClient.IS_QUIRKS&&(h.style.height="60px");mxUtils.write(h,b);f.appendChild(h);h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type",
-"checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(k.checked)});g.className="geBtn";null!=m&&(g.innerHTML=m+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&h.appendChild(g);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(k.checked)});h.appendChild(e);null!=l?(e.innerHTML=l+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop=
-"8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(g);f.appendChild(h);n?(h.style.marginTop="10px",h=document.createElement("p"),h.style.marginTop="20px",h.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),h.appendChild(l),f.appendChild(h),mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container=
-f},EmbedDialog=function(a,b,c,d,e,g){d=document.createElement("div");var l=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=g?mxUtils.write(d,g):mxUtils.write(d,mxResources.get(5E5>b.length?l?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,a.formatFileSize(b.length));d.appendChild(g);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>b.length?(m.value=b,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=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!l||navigator.standalone||!(l||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),function(){var d=5E5>b.length?
-m.value:b;if(null!=e)e(d);else if(l)try{var f=a.openLink(d);null!=f&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=d.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),c||500)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var h=window.open().document;h.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+
-b+"</body></html>");h.close()}}),n.className="geBtn",g.appendChild(n));if(!l||7500<b.length){var f=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",b,"text/plain")});f.className="geBtn";g.appendChild(f)}if(l&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var h=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")})}}),
+a.showSplash(!0)}),g.appendChild(e));b.appendChild(g);this.container=b},ConfirmDialog=function(a,b,c,d,e,g,k,l,m){var f=document.createElement("div");f.style.textAlign="center";var h=document.createElement("div");h.style.padding="6px";h.style.overflow="auto";h.style.maxHeight="44px";mxClient.IS_QUIRKS&&(h.style.height="60px");mxUtils.write(h,b);f.appendChild(h);h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type",
+"checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(n.checked)});g.className="geBtn";null!=l&&(g.innerHTML=l+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&h.appendChild(g);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(n.checked)});h.appendChild(e);null!=k?(e.innerHTML=k+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop=
+"8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(g);f.appendChild(h);m?(h.style.marginTop="10px",h=document.createElement("p"),h.style.marginTop="20px",h.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),h.appendChild(k),f.appendChild(h),mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container=
+f},EmbedDialog=function(a,b,c,d,e,g){d=document.createElement("div");var k=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=g?mxUtils.write(d,g):mxUtils.write(d,mxResources.get(5E5>b.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,a.formatFileSize(b.length));d.appendChild(g);var l=document.createElement("textarea");l.setAttribute("autocomplete",
+"off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");d.appendChild(l);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",
+!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),function(){var d=5E5>b.length?
+l.value:b;if(null!=e)e(d);else if(k)try{var f=a.openLink(d);null!=f&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=d.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),c||500)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var h=window.open().document;h.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+
+b+"</body></html>");h.close()}}),m.className="geBtn",g.appendChild(m));if(!k||7500<b.length){var f=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",b,"text/plain")});f.className="geBtn";g.appendChild(f)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var h=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),
f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");h.appendChild(f);h.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");h.style.verticalAlign="bottom";h.style.paddingTop="4px";h.style.minWidth="46px";h.className="geBtn";g.appendChild(h)}7168>b.length&&(h=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")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom="5px",h.appendChild(f),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign="bottom",h.style.paddingTop="4px",h.style.minWidth="46px",
-h.className="geBtn",g.appendChild(h))}f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(f);h=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>b.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(h),
-h.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(n),f.className="geBtn",n.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,b){function c(){var a=null!=z.getTitle()?z.getTitle():this.defaultFilename;if(x.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);""!=k.value&&(b+="&height="+k.value);b+="&pan="+(p.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+
-(t.checked?"1":"0");b+="&x0="+Number(h.value);b+="&y0="+n;e.mathEnabled&&(b+="&math=1");A.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));f.value=b}else z.constructor==DriveFile||z.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=z.getHash().substring(1),b=z.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
-encodeURIComponent(a)),""!=k.value&&(a=parseInt(k.value)+parseInt(h.value),b+="&height="+a),f.value=b):f.value=""}var d=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),l=e.view.scale,m=Math.floor(g.x/l-e.view.translate.x),n=Math.floor(g.y/l-e.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.marginTop="2px";f.style.width="410px";d.appendChild(f);
-mxUtils.br(d);this.init=function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.setAttribute("size","4");h.style.marginRight="16px";h.style.marginLeft="4px";h.value=m;d.appendChild(h);mxUtils.write(d,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type",
-"text");k.setAttribute("size","4");k.style.marginLeft="4px";k.value=Math.ceil(g.height/l);d.appendChild(k);mxUtils.br(d);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";d.appendChild(g);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=b||"";
-d.appendChild(q);mxUtils.br(d);mxUtils.write(d,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";d.appendChild(u);mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";d.appendChild(p);mxUtils.write(d,mxResources.get("pan")+" ");var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";d.appendChild(v);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 A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,
+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom="5px",h.appendChild(f),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign="bottom",h.style.paddingTop="4px",h.style.minWidth="46px",
+h.className="geBtn",g.appendChild(h))}f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(f);h=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(h),
+h.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(m),f.className="geBtn",m.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,b){function c(){var a=null!=z.getTitle()?z.getTitle():this.defaultFilename;if(x.checked&&""!=u.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<C.length&&(b+="&s="+C);""!=p.value&&"0"!=p.value&&(b+="&border="+p.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+
+(t.checked?"1":"0");b+="&x0="+Number(h.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1");B.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));f.value=b}else z.constructor==DriveFile||z.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?b+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(b+=z.getHash().substring(1),b=z.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(h.value),b+="&height="+a),f.value=b):f.value=""}var d=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),k=e.view.scale,l=Math.floor(g.x/k-e.view.translate.x),m=Math.floor(g.y/k-e.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.marginTop="2px";f.style.width="410px";d.appendChild(f);
+mxUtils.br(d);this.init=function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.setAttribute("size","4");h.style.marginRight="16px";h.style.marginLeft="4px";h.value=l;d.appendChild(h);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(g.height/k);d.appendChild(n);mxUtils.br(d);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";d.appendChild(g);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=b||"";
+d.appendChild(u);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","3");p.style.marginBottom="8px";p.style.marginLeft="4px";p.value="0";d.appendChild(p);mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";d.appendChild(q);mxUtils.write(d,mxResources.get("pan")+" ");var v=document.createElement("input");
+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";d.appendChild(v);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 B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";d.appendChild(B);mxUtils.write(d,
mxResources.get("asNew")+" ");mxUtils.br(d);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";d.appendChild(t);mxUtils.write(d,mxResources.get("resize")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";d.appendChild(w);mxUtils.write(d,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft=
-"8px";d.appendChild(x);mxUtils.write(d,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),z=a.getCurrentFile();mxEvent.addListener(p,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(k,"change",c);mxEvent.addListener(h,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(q,"change",c);c();
-mxEvent.addListener(f,"click",function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";g.appendChild(l);d.appendChild(g);this.container=d},CreateGraphDialog=function(a,b,c){var d=document.createElement("div");d.style.textAlign=
-"right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);d.appendChild(b);var g=new Graph(b);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";g.cellRenderer.installCellOverlayListeners=
+"8px";d.appendChild(x);mxUtils.write(d,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),z=a.getCurrentFile();mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(h,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(u,"change",c);c();
+mxEvent.addListener(f,"click",function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";g.appendChild(k);d.appendChild(g);this.container=d},CreateGraphDialog=function(a,b,c){var d=document.createElement("div");d.style.textAlign=
+"right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);d.appendChild(b);var g=new Graph(b);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";g.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))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
-!1;g.connectionHandler.createEdgeState=function(a){a=g.createEdge(null,null,null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=g.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){g.connectionHandler.reset();g.clearSelection();var d=g.getCellGeometry(a),f;k(function(){f=g.insertVertex(m,null,"Entry",d.x,d.y,80,30,"rounded=1;");n(f);g.view.refresh(f);
-g.insertEdge(m,null,"",a,f,l)},function(){g.scrollCellToVisible(f)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var f=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(d,f.x,f.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var f;try{f=g.insertVertex(m,null,"Start",
-0,0,80,30,"ellipse"),n(f)}finally{g.getModel().endUpdate()}var h;"horizontalTree"==c?(h=new mxCompactTreeLayout(g),h.edgeRouting=!1,h.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(h=new mxCompactTreeLayout(g,!1),h.edgeRouting=!1,h.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(h=new mxRadialTreeLayout(g,!1),h.edgeRouting=!1,h.levelDistance=80):"verticalFlow"==c?h=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-c?h=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==c?(h=new mxFastOrganicLayout(g,!1),h.forceConstant=80):"circle"==c&&(h=new mxCircleLayout(g));if(null!=h){var k=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),h.execute(g.getDefaultParent(),f)}catch(t){throw t;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,d,f){q.apply(this,arguments);k()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&d.appendChild(u);var p=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,f=d.getBounds(c);f.x-=d.translate.x;f.y-=d.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()});d.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(u)};this.container=d};
+!1;g.connectionHandler.createEdgeState=function(a){a=g.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=g.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){g.connectionHandler.reset();g.clearSelection();var d=g.getCellGeometry(a),f;n(function(){f=g.insertVertex(l,null,"Entry",d.x,d.y,80,30,"rounded=1;");m(f);g.view.refresh(f);
+g.insertEdge(l,null,"",a,f,k)},function(){g.scrollCellToVisible(f)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var f=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(d,f.x,f.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var f;try{f=g.insertVertex(l,null,"Start",
+0,0,80,30,"ellipse"),m(f)}finally{g.getModel().endUpdate()}var h;"horizontalTree"==c?(h=new mxCompactTreeLayout(g),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(h=new mxCompactTreeLayout(g,!1),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(h=new mxRadialTreeLayout(g,!1),h.edgeRouting=!1,h.levelDistance=80):"verticalFlow"==c?h=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+c?h=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==c?(h=new mxFastOrganicLayout(g,!1),h.forceConstant=80):"circle"==c&&(h=new mxCircleLayout(g));if(null!=h){var n=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),h.execute(g.getDefaultParent(),f)}catch(t){throw t;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,d,f){u.apply(this,arguments);n()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var p=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&d.appendChild(p);var q=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();
+var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,f=d.getBounds(c);f.x-=d.translate.x;f.y-=d.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()});d.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(p)};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,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";c.appendChild(d);mxUtils.write(c,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(c);var d=a.editor.graph.backgroundImage,e=document.createElement("input");e.setAttribute("type","text");e.style.marginTop="4px";e.style.marginBottom="4px";e.style.width="350px";e.value=
-null!=d?d.src:"";var g=!1,l=function(){g||""==e.value||a.isOffline()?(m.value="",n.value=""):a.loadImage(mxUtils.trim(e.value),function(a){m.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";m.value="";n.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=c.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(c){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(b));c.stopPropagation();c.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.maxBackgroundSize,function(a,b,c,d,f,h){e.value=a;l()},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 c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&(e.value=decodeURIComponent(c),l())}b.stopPropagation();b.preventDefault()}),!1)}};c.appendChild(e);mxUtils.br(c);mxUtils.br(c);mxUtils.write(c,mxResources.get("width")+":");var m=document.createElement("input");
-m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=d?d.width:"";c.appendChild(m);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=d?d.height:"";c.appendChild(n);d=mxUtils.button(mxResources.get("reset"),function(){e.value="";m.value="";n.value="";g=!1});mxEvent.addListener(d,"mousedown",
-function(){g=!0});mxEvent.addListener(d,"touchstart",function(){g=!0});d.className="geBtn";d.width="100";c.appendChild(d);mxUtils.br(c);mxEvent.addListener(e,"change",l);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&&(e.value=a.url,l()));e.focus()};d=document.createElement("div");d.style.marginTop="40px";d.style.textAlign="right";var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+null!=d?d.src:"";var g=!1,k=function(){g||""==e.value||a.isOffline()?(l.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=c.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(c){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(b));c.stopPropagation();c.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.maxBackgroundSize,function(a,b,c,d,f,h){e.value=a;k()},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 c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&(e.value=decodeURIComponent(c),k())}b.stopPropagation();b.preventDefault()}),!1)}};c.appendChild(e);mxUtils.br(c);mxUtils.br(c);mxUtils.write(c,mxResources.get("width")+":");var l=document.createElement("input");
+l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=d?d.width:"";c.appendChild(l);mxUtils.write(c,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=d?d.height:"";c.appendChild(m);d=mxUtils.button(mxResources.get("reset"),function(){e.value="";l.value="";m.value="";g=!1});mxEvent.addListener(d,"mousedown",
+function(){g=!0});mxEvent.addListener(d,"touchstart",function(){g=!0});d.className="geBtn";d.width="100";c.appendChild(d);mxUtils.br(c);mxEvent.addListener(e,"change",k);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&&(e.value=a.url,k()));e.focus()};d=document.createElement("div");d.style.marginTop="40px";d.style.textAlign="right";var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
f.className="geBtn";a.editor.cancelFirst&&d.appendChild(f);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var h=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)});
h.className="geBtn";d.appendChild(h);null!=a.drive&&"1"==urlParams.photos&&(h=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)}))}),h.className="geBtn",d.appendChild(h))}h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),m.value,n.value):null)});h.className="geBtn gePrimaryBtn";d.appendChild(h);a.editor.cancelFirst||d.appendChild(f);c.appendChild(d);this.container=c},ParseDialog=function(a,b,c){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
-c||"plantUmlTxt"==c){var d="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",f=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var h=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?"_":"?"},e=function(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=h(c1&63);r+=h(c2&63);r+=h(c3&63);return r+=
-h(c4&63)},k=new XMLHttpRequest;k.open("GET",d+function(a){r="";for(q=0;q<a.length;q+=3)r=q+2==a.length?r+e(a.charCodeAt(q),a.charCodeAt(q+1),0):q+1==a.length?r+e(a.charCodeAt(q),0,0):r+e(a.charCodeAt(q),a.charCodeAt(q+1),a.charCodeAt(q+2));return r}(f.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(k.responseType="blob");k.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),f.setSelectionCell(a.insertAsPreText(this.response,
-g.x,g.y)),f.scrollCellToVisible(f.getSelectionCell());else{var h=new FileReader;h.readAsDataURL(this.response);h.onloadend=function(d){var c=new Image;c.onload=function(){a.spinner.stop();var d=c.width,k=c.height;if(0==d&&0==k){var e=h.result,w=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(w+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(d=parseFloat(e[0].getAttribute("width")),k=parseFloat(e[0].getAttribute("height")))}f.getModel().beginUpdate();try{cell=f.insertVertex(null,
-null,b,g.x,g.y,d,k,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(h.result)+";")}finally{f.getModel().endUpdate()}f.setSelectionCell(cell);f.scrollCellToVisible(f.getSelectionCell())};c.src=h.result};h.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(d)};k.onerror=function(b){a.handleError(b)};k.send()}}else if("table"==c){for(var w=null,x=[],u=0,q=0;q<d.length;q++)if(k=mxUtils.trim(d[q]),"create table"==k.substring(0,12).toLowerCase())k=
-mxUtils.trim(k.substring(12)),"("==k.charAt(k.length-1)&&(k=k.substring(0,k.lastIndexOf(" "))),w=new mxCell(k,new mxGeometry(u,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;"),w.vertex=!0,x.push(w),k=a.editor.graph.getPreferredSizeForCell(m),null!=k&&(w.geometry.width=k.width+10);else if(null!=w&&")"==k.charAt(0))u+=w.geometry.width+
-40,w=null;else if("("!=k&&null!=w&&(k=k.substring(0,","==k.charAt(k.length-1)?k.length-1:k.length),"primary key"!=k.substring(0,11).toLowerCase())){var l=k.toLowerCase().indexOf("primary key"),k=k.replace(/primary key/i,""),m=new mxCell(k,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;");m.vertex=
-!0;k=sb.cloneCell(m,0<l?"PK":"");k.connectable=!1;k.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;";k.geometry.width=30;k.geometry.height=26;m.insert(k);k=a.editor.graph.getPreferredSizeForCell(m);null!=k&&w.geometry.width<k.width+10&&(w.geometry.width=Math.min(220,k.width+10));w.insert(m);w.geometry.height+=26}0<x.length&&(f=a.editor.graph,d=f.view,
-k=f.getGraphBounds(),f.setSelectionCells(f.importCells(x,Math.ceil(Math.max(0,k.x/d.scale-d.translate.x)+4*f.gridSize),Math.ceil(Math.max(0,(k.y+k.height)/d.scale-d.translate.y)+4*f.gridSize))),f.scrollCellToVisible(f.getSelectionCell()))}else if("list"==c){if(0<d.length){f=a.editor.graph;w=new mxCell(d[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;");
-w.vertex=!0;k=f.getPreferredSizeForCell(w);null!=k&&w.geometry.width<k.width+10&&(w.geometry.width=k.width+10);m=[w];if(1<d.length)for(q=1;q<d.length;q++)"--"==d[q]?(k=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;"),k.vertex=!0,w.geometry.height+=k.geometry.height,w.insert(k),m.push(k)):0<d[q].length&&";"!=d[q].charAt(0)&&(u=new mxCell(d[q],
-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;"),u.vertex=!0,k=f.getPreferredSizeForCell(u),null!=k&&u.geometry.width<k.width&&(u.geometry.width=k.width),w.geometry.width=Math.max(w.geometry.width,u.geometry.width),w.geometry.height+=u.geometry.height,w.insert(u),m.push(u));f.getModel().beginUpdate();try{w=f.importCells([w],g.x,g.y)[0],f.fireEvent(new mxEventObject("cellsInserted",
-"cells",[w].concat(w.children)))}finally{f.getModel().endUpdate()}f.setSelectionCell(w);f.scrollCellToVisible(f.getSelectionCell())}}else{for(var m=function(a){var b=n[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,n[a]=b,x.push(b));return b},n={},x=[],q=0;q<d.length;q++)if(";"!=d[q].charAt(0)){var I=d[q].split("->");2<=I.length&&(u=m(I[0]),l=m(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry),I.edge=!0,u.insertEdge(I,!0),l.insertEdge(I,!1),
-x.push(I))}if(0<x.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);f=new Graph(d);f.getModel().beginUpdate();try{x=f.importCells(x);for(q=0;q<x.length;q++)f.getModel().isVertex(x[q])&&(k=f.getPreferredSizeForCell(x[q]),x[q].geometry.width=Math.max(x[q].geometry.width,k.width),x[q].geometry.height=Math.max(x[q].geometry.height,k.height));w=new mxFastOrganicLayout(f);w.disableEdgeStyle=!1;w.forceConstant=120;w.execute(f.getDefaultParent())}finally{f.getModel().endUpdate()}f.clearCellOverlays();
-m=[];a.editor.graph.getModel().beginUpdate();try{m=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());f.destroy();d.parentNode.removeChild(d)}}}function e(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
-"table"==m.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"==m.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"==m.value||"plantUmlTxt"==m.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 g=a.editor.graph.getFreeInsertPoint();b=document.createElement("div");b.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height=
-"354px";l.style.marginBottom="16px";var m=document.createElement("select");"formatSql"==c&&(m.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=c&&m.appendChild(n);null!=c&&"fromText"!=c||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==c&&(m.appendChild(n),n.setAttribute("selected","selected"));
-n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=c&&m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&n.setAttribute("selected","selected");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
-")");var h=document.createElement("option");h.setAttribute("value","plantUmlTxt");mxUtils.write(h,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(m.appendChild(n),m.appendChild(f),m.appendChild(h));var k=e();l.value=k;b.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.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){l.value=a.target.result};b.readAsText(a)}},!1));b.appendChild(m);mxEvent.addListener(m,"change",function(){var a=e();if(0==l.value.length||l.value==k)k=a,l.value=k});c=mxUtils.button(mxResources.get("close"),function(){l.value==k?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);n=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();d(l.value,m.value)});b.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(c);this.container=b},NewDialog=function(a,b,c,d,e,g,l,m,n,f,h,k,q,u,p){function v(){for(var a=!0;E<O.length&&(a||0!=mxUtils.mod(E,30));)a=O[E++],t(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 y(){if(aa)c||a.hideDialog(),u(aa,Z,F.value);else if(d)c||a.hideDialog(),d(P,F.value);else{var b=F.value;null!=b&&
-0<b.length&&a.pickFolder(a.mode,function(d){a.createFile(b,P,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,d)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function A(a,b,d,c,f){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");G.removeAttribute("disabled");P=b;T=d;S=a;aa=c;Z=f;S.style.backgroundColor=m;S.style.border=n}function t(b,d,c,f,h,k,e,w,g){var t=document.createElement("div");t.className="geTemplate";t.style.height=
-Q+"px";t.style.width=L+"px";null!=f&&0<f.length&&t.setAttribute("title",f);if(null!=k)t.style.backgroundImage="url("+k+")",t.style.backgroundSize="contain",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",mxEvent.addListener(t,"click",function(a){A(t,null,null,b,e)}),mxEvent.addListener(t,"dblclick",function(a){y()});else if(null!=b&&0<b.length){c=g||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";t.style.backgroundImage="url("+c+")";t.style.backgroundPosition="center center";
-t.style.backgroundRepeat="no-repeat";var q=!1;mxEvent.addListener(t,"click",function(c){G.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;mxUtils.get(c,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(A(t,a.getText(),d),q&&y())}))});mxEvent.addListener(t,"dblclick",function(a){q=!0})}else t.innerHTML=
-'<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",h&&A(t),null!=w?mxEvent.addListener(t,"click",w):(mxEvent.addListener(t,"click",function(a){A(t)}),mxEvent.addListener(t,"dblclick",function(a){y()}));N.appendChild(t)}function w(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in U){var c=document.createElement("div"),d=mxResources.get(b),h=U[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+" ("+h.length+")");mxUtils.write(c,c.getAttribute("title"));null!=f&&(c.style.padding=f);Y.appendChild(c);null==a&&(a=c,a.style.backgroundColor=l);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,
-a.style.backgroundColor=l,N.scrollTop=0,N.innerHTML="",E=0,O=U[b],B=null,v())})})(b,c)}v()}c=null!=c?c:!0;e=null!=e?e:!1;l=null!=l?l:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";h=null!=h?h:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";c&&x.appendChild(C);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width=
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),h.className="geBtn",d.appendChild(h))}h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});h.className="geBtn gePrimaryBtn";d.appendChild(h);a.editor.cancelFirst||d.appendChild(f);c.appendChild(d);this.container=c},ParseDialog=function(a,b,c){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
+c||"plantUmlTxt"==c){var d="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",f=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var h=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?"_":"?"},e=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=h(c1&63);r+=h(c2&63);r+=h(c3&63);return r+=
+h(c4&63)},n=new XMLHttpRequest;n.open("GET",d+function(a){r="";for(p=0;p<a.length;p+=3)r=p+2==a.length?r+e(a.charCodeAt(p),a.charCodeAt(p+1),0):p+1==a.length?r+e(a.charCodeAt(p),0,0):r+e(a.charCodeAt(p),a.charCodeAt(p+1),a.charCodeAt(p+2));return r}(f.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(n.responseType="blob");n.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),f.setSelectionCell(a.insertAsPreText(this.response,
+g.x,g.y)),f.scrollCellToVisible(f.getSelectionCell());else{var h=new FileReader;h.readAsDataURL(this.response);h.onloadend=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var c=d.width,n=d.height;if(0==c&&0==n){var e=h.result,w=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(w+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(c=parseFloat(e[0].getAttribute("width")),n=parseFloat(e[0].getAttribute("height")))}f.getModel().beginUpdate();try{cell=f.insertVertex(null,
+null,b,g.x,g.y,c,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(h.result)+";")}finally{f.getModel().endUpdate()}f.setSelectionCell(cell);f.scrollCellToVisible(f.getSelectionCell())};d.src=h.result};h.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(d)};n.onerror=function(b){a.handleError(b)};n.send()}}else if("table"==c){for(var w=null,x=[],u=0,p=0;p<d.length;p++)if(n=mxUtils.trim(d[p]),"create table"==n.substring(0,12).toLowerCase())n=
+mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=n.substring(0,n.lastIndexOf(" "))),w=new mxCell(n,new mxGeometry(u,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;"),w.vertex=!0,x.push(w),n=a.editor.graph.getPreferredSizeForCell(l),null!=n&&(w.geometry.width=n.width+10);else if(null!=w&&")"==n.charAt(0))u+=w.geometry.width+
+40,w=null;else if("("!=n&&null!=w&&(n=n.substring(0,","==n.charAt(n.length-1)?n.length-1:n.length),"primary key"!=n.substring(0,11).toLowerCase())){var k=n.toLowerCase().indexOf("primary key"),n=n.replace(/primary key/i,""),l=new mxCell(n,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;");l.vertex=
+!0;n=sb.cloneCell(l,0<k?"PK":"");n.connectable=!1;n.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;";n.geometry.width=30;n.geometry.height=26;l.insert(n);n=a.editor.graph.getPreferredSizeForCell(l);null!=n&&w.geometry.width<n.width+10&&(w.geometry.width=Math.min(220,n.width+10));w.insert(l);w.geometry.height+=26}0<x.length&&(f=a.editor.graph,d=f.view,
+n=f.getGraphBounds(),f.setSelectionCells(f.importCells(x,Math.ceil(Math.max(0,n.x/d.scale-d.translate.x)+4*f.gridSize),Math.ceil(Math.max(0,(n.y+n.height)/d.scale-d.translate.y)+4*f.gridSize))),f.scrollCellToVisible(f.getSelectionCell()))}else if("list"==c){if(0<d.length){f=a.editor.graph;w=new mxCell(d[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;");
+w.vertex=!0;n=f.getPreferredSizeForCell(w);null!=n&&w.geometry.width<n.width+10&&(w.geometry.width=n.width+10);l=[w];if(1<d.length)for(p=1;p<d.length;p++)"--"==d[p]?(n=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;"),n.vertex=!0,w.geometry.height+=n.geometry.height,w.insert(n),l.push(n)):0<d[p].length&&";"!=d[p].charAt(0)&&(u=new mxCell(d[p],
+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;"),u.vertex=!0,n=f.getPreferredSizeForCell(u),null!=n&&u.geometry.width<n.width&&(u.geometry.width=n.width),w.geometry.width=Math.max(w.geometry.width,u.geometry.width),w.geometry.height+=u.geometry.height,w.insert(u),l.push(u));f.getModel().beginUpdate();try{w=f.importCells([w],g.x,g.y)[0],f.fireEvent(new mxEventObject("cellsInserted",
+"cells",[w].concat(w.children)))}finally{f.getModel().endUpdate()}f.setSelectionCell(w);f.scrollCellToVisible(f.getSelectionCell())}}else{for(var l=function(a){var b=m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,m[a]=b,x.push(b));return b},m={},x=[],p=0;p<d.length;p++)if(";"!=d[p].charAt(0)){var I=d[p].split("->");2<=I.length&&(u=l(I[0]),k=l(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry),I.edge=!0,u.insertEdge(I,!0),k.insertEdge(I,!1),
+x.push(I))}if(0<x.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);f=new Graph(d);f.getModel().beginUpdate();try{x=f.importCells(x);for(p=0;p<x.length;p++)f.getModel().isVertex(x[p])&&(n=f.getPreferredSizeForCell(x[p]),x[p].geometry.width=Math.max(x[p].geometry.width,n.width),x[p].geometry.height=Math.max(x[p].geometry.height,n.height));w=new mxFastOrganicLayout(f);w.disableEdgeStyle=!1;w.forceConstant=120;w.execute(f.getDefaultParent())}finally{f.getModel().endUpdate()}f.clearCellOverlays();
+l=[];a.editor.graph.getModel().beginUpdate();try{l=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());f.destroy();d.parentNode.removeChild(d)}}}function e(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
+"table"==l.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"==l.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"==l.value||"plantUmlTxt"==l.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 g=a.editor.graph.getFreeInsertPoint();b=document.createElement("div");b.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
+"354px";k.style.marginBottom="16px";var l=document.createElement("select");"formatSql"==c&&(l.style.display="none");var m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));"plantUml"!=c&&l.appendChild(m);null!=c&&"fromText"!=c||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));"formatSql"==c&&(l.appendChild(m),m.setAttribute("selected","selected"));
+m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));"plantUml"!=c&&l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&m.setAttribute("selected","selected");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
+")");var h=document.createElement("option");h.setAttribute("value","plantUmlTxt");mxUtils.write(h,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(l.appendChild(m),l.appendChild(f),l.appendChild(h));var n=e();k.value=n;b.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));b.appendChild(l);mxEvent.addListener(l,"change",function(){var a=e();if(0==k.value.length||k.value==n)n=a,k.value=n});c=mxUtils.button(mxResources.get("close"),function(){k.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);m=mxUtils.button(mxResources.get("insert"),
+function(){a.hideDialog();d(k.value,l.value)});b.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(c);this.container=b},NewDialog=function(a,b,c,d,e,g,k,l,m,f,h,n,u,p,q){function v(){for(var a=!0;E<O.length&&(a||0!=mxUtils.mod(E,30));)a=O[E++],t(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 y(){if(aa)c||a.hideDialog(),p(aa,Z,F.value);else if(d)c||a.hideDialog(),d(P,F.value);else{var b=F.value;null!=b&&
+0<b.length&&a.pickFolder(a.mode,function(c){a.createFile(b,P,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,c)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function B(a,b,c,d,f){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");G.removeAttribute("disabled");P=b;T=c;S=a;aa=d;Z=f;S.style.backgroundColor=l;S.style.border=m}function t(b,c,d,f,h,n,e,w,g){var t=document.createElement("div");t.className="geTemplate";t.style.height=
+Q+"px";t.style.width=L+"px";null!=f&&0<f.length&&t.setAttribute("title",f);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){B(t,null,null,b,e)}),mxEvent.addListener(t,"dblclick",function(a){y()});else if(null!=b&&0<b.length){d=g||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";t.style.backgroundImage="url("+d+")";t.style.backgroundPosition="center center";
+t.style.backgroundRepeat="no-repeat";var p=!1;mxEvent.addListener(t,"click",function(d){G.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border="1px solid transparent";d=b;d=/^https?:\/\//.test(d)&&!a.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(B(t,a.getText(),c),p&&y())}))});mxEvent.addListener(t,"dblclick",function(a){p=!0})}else t.innerHTML=
+'<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(d)+"</td></tr></table>",h&&B(t),null!=w?mxEvent.addListener(t,"click",w):(mxEvent.addListener(t,"click",function(a){B(t)}),mxEvent.addListener(t,"dblclick",function(a){y()}));N.appendChild(t)}function w(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in U){var c=document.createElement("div"),d=mxResources.get(b),h=U[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+" ("+h.length+")");mxUtils.write(c,c.getAttribute("title"));null!=f&&(c.style.padding=f);Y.appendChild(c);null==a&&(a=c,a.style.backgroundColor=k);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,
+a.style.backgroundColor=k,N.scrollTop=0,N.innerHTML="",E=0,O=U[b],A=null,v())})})(b,c)}v()}c=null!=c?c:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";h=null!=h?h:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";c&&x.appendChild(C);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width=
"40px";z.style.height="40px";z.style.marginRight="10px";z.style.paddingBottom="4px";z.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";!b&&c&&C.appendChild(z);c&&mxUtils.write(C,
(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");z=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?z=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?z=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?z=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?z=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(z=a.trello.extension);var F=document.createElement("input");F.setAttribute("value",
-a.defaultFilename+z);F.style.marginRight="20px";F.style.marginLeft="10px";F.style.width=b?"220px":"430px";this.init=function(){c&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};c&&C.appendChild(F);var C=!1,E=0,G=mxUtils.button(mxResources.get("create"),function(){G.setAttribute("disabled","disabled");y();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(k||q){var I=[],B=null,D=function(a){G.setAttribute("disabled",
-"disabled");for(var b=0;b<I.length;b++)I[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},C=!0,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";x.appendChild(z);var H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";D(0);N.scrollTop=0;N.innerHTML="";E=0;B!=O&&(O=B,v(),B=null)});I.push(H);z.appendChild(H);var M=function(a){Y.style.display="none";N.style.left="30px";D(a?-1:1);null==B&&(B=O);N.scrollTop=0;
-N.innerHTML="";var b=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});b.spin(N);E=0;var c=function(a,c){b.stop();O=a;c?N.innerHTML=c:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",v())};a?q(K.value,c):k(c)};k&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(H),I.push(H));if(q){H=document.createElement("span");H.style.marginLeft=
+a.defaultFilename+z);F.style.marginRight="20px";F.style.marginLeft="10px";F.style.width=b?"220px":"430px";this.init=function(){c&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};c&&C.appendChild(F);var C=!1,E=0,G=mxUtils.button(mxResources.get("create"),function(){G.setAttribute("disabled","disabled");y();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(n||u){var I=[],A=null,D=function(a){G.setAttribute("disabled",
+"disabled");for(var b=0;b<I.length;b++)I[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},C=!0,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";x.appendChild(z);var H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";D(0);N.scrollTop=0;N.innerHTML="";E=0;A!=O&&(O=A,v(),A=null)});I.push(H);z.appendChild(H);var M=function(a){Y.style.display="none";N.style.left="30px";D(a?-1:1);null==A&&(A=O);N.scrollTop=0;
+N.innerHTML="";var b=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});b.spin(N);E=0;var c=function(a,c){b.stop();O=a;c?N.innerHTML=c:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",v())};a?u(K.value,c):n(c)};n&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(H),I.push(H));if(u){H=document.createElement("span");H.style.marginLeft=
"10px";H.innerHTML=mxResources.get("search")+":";z.appendChild(H);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&M(!0)});z.appendChild(K);H=mxUtils.button(mxResources.get("search"),function(){M(!0)});H.className="geBtn";z.appendChild(H)}D(0)}var T=null,P=null,S=null,aa=null,Z=null,N=document.createElement("div");N.style.border="1px solid #d3d3d3";N.style.position="absolute";
N.style.left="160px";N.style.right="34px";C=(c?72:40)+(C?30:0);N.style.top=C+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var Y=document.createElement("div");Y.style.cssText="position:absolute;left:30px;width:128px;top:"+C+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Q=140,L=140,U={},R=1;U.basic=[{title:"blankDiagram",select:!0}];var O=U.basic;if(!b){x.appendChild(Y);x.appendChild(N);var V=!1;/^https?:\/\//.test(h)&&
!a.isCorsEnabledForUrl(h)&&(h=PROXY_URL+"?url="+encodeURIComponent(h));mxUtils.get(h,function(a){if(!V){V=!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=U[c];null==b&&(R++,b=[],U[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}w()}})}mxEvent.addListener(F,"keypress",function(a){13==a.keyCode&&y()});h=document.createElement("div");h.style.marginTop=b?"4px":"16px";h.style.textAlign="right";h.style.position="absolute";h.style.left="40px";h.style.bottom="24px";h.style.right="40px";C=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});C.className="geBtn";!a.editor.cancelFirst||e&&null==g||h.appendChild(C);b||a.isOffline()||!c||null!=d||e||(z=mxUtils.button(mxResources.get("help"),
function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",h.appendChild(z));b||"1"==urlParams.embed||e||(b=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(F.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()}),b.className="geBtn",h.appendChild(b));Graph.fileSupport&&p&&(p=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()}),p.className="geBtn",h.appendChild(p));h.appendChild(G);a.editor.cancelFirst||null!=d||e&&null==g||h.appendChild(C);x.appendChild(h);
-this.container=x},CreateDialog=function(a,b,c,d,e,g,l,m,n,f,h,k,q,u,p){function v(c,d,f,h){function e(){mxEvent.addListener(g,"click",function(){var c=f;if(l){var d=w.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:z.value,k="";c==App.MODE_GOOGLE?k=a.drive.extension:c==App.MODE_GITHUB?k=a.gitHub.extension:c==App.MODE_TRELLO?k=a.trello.extension:c==App.MODE_DROPBOX?k=a.dropbox.extension:c==App.MODE_ONEDRIVE?k=a.oneDrive.extension:c==App.MODE_DEVICE&&(k=".xml");0<=h&&(d=d.substring(0,
-h));w.value=d+k}}y(f)})}var g=document.createElement("a");g.style.overflow="hidden";var t=document.createElement("img");t.src=c;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(t);mxClient.IS_QUIRKS&&(g.style.cssFloat=
-"left",g.style.zoom="1");g.style.color="gray";g.style.fontSize="11px";var q=document.createElement("div");g.appendChild(q);mxUtils.write(q,d);if(null!=h&&null==a[h]){t.style.visibility="hidden";mxUtils.setOpacity(q,10);var u=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});u.spin(g);var v=window.setTimeout(function(){null==a[h]&&(u.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=a[h]&&(window.clearTimeout(v),mxUtils.setOpacity(q,100),t.style.visibility="",u.stop(),e())}))}else e();x.appendChild(g);++C==k&&(mxUtils.br(x),C=0)}function y(b){var d=w.value;if(null==b||null!=d&&0<d.length)a.hideDialog(),c(d,b)}l=null!=l?l:!0;m=null!=m?m:!0;k=null!=k?k:4;var A=document.createElement("div");null==d&&a.addLanguageMenu(A);var t=document.createElement("h2");mxUtils.write(t,e||mxResources.get("create"));t.style.marginTop="0px";t.style.marginBottom="24px";A.appendChild(t);
-mxUtils.write(A,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",b);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};A.appendChild(w);null!=q&&null!=u&&"image/"==u.substring(0,6)&&(w.style.width="160px",e=null,"image/svg+xml"==u&&mxClient.IS_SVG?(e=document.createElement("div"),
-e.innerHTML=mxUtils.trim(q),q=e.getElementsByTagName("svg")[0],u=parseInt(q.getAttribute("width")),p=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+u+" "+p),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+u+(p?";base64,":";utf8,")+q)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),
-A.appendChild(e),n&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){y("_blank")})));mxUtils.br(A);var x=document.createElement("div");x.style.textAlign="center";var C=0;x.style.marginTop="6px";A.appendChild(x);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),
+mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",h.appendChild(b));Graph.fileSupport&&q&&(q=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()}),q.className="geBtn",h.appendChild(q));h.appendChild(G);a.editor.cancelFirst||null!=d||e&&null==g||h.appendChild(C);x.appendChild(h);
+this.container=x},CreateDialog=function(a,b,c,d,e,g,k,l,m,f,h,n,u,p,q){function v(c,d,f,h){function e(){mxEvent.addListener(g,"click",function(){var c=f;if(k){var d=w.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:z.value,n="";c==App.MODE_GOOGLE?n=a.drive.extension:c==App.MODE_GITHUB?n=a.gitHub.extension:c==App.MODE_TRELLO?n=a.trello.extension:c==App.MODE_DROPBOX?n=a.dropbox.extension:c==App.MODE_ONEDRIVE?n=a.oneDrive.extension:c==App.MODE_DEVICE&&(n=".xml");0<=h&&(d=d.substring(0,
+h));w.value=d+n}}y(f)})}var g=document.createElement("a");g.style.overflow="hidden";var t=document.createElement("img");t.src=c;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(t);mxClient.IS_QUIRKS&&(g.style.cssFloat=
+"left",g.style.zoom="1");g.style.color="gray";g.style.fontSize="11px";var p=document.createElement("div");g.appendChild(p);mxUtils.write(p,d);if(null!=h&&null==a[h]){t.style.visibility="hidden";mxUtils.setOpacity(p,10);var u=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});u.spin(g);var q=window.setTimeout(function(){null==a[h]&&(u.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,
+function(){null!=a[h]&&(window.clearTimeout(q),mxUtils.setOpacity(p,100),t.style.visibility="",u.stop(),e())}))}else e();x.appendChild(g);++C==n&&(mxUtils.br(x),C=0)}function y(b){var d=w.value;if(null==b||null!=d&&0<d.length)a.hideDialog(),c(d,b)}k=null!=k?k:!0;l=null!=l?l:!0;n=null!=n?n:4;var B=document.createElement("div");null==d&&a.addLanguageMenu(B);var t=document.createElement("h2");mxUtils.write(t,e||mxResources.get("create"));t.style.marginTop="0px";t.style.marginBottom="24px";B.appendChild(t);
+mxUtils.write(B,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",b);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};B.appendChild(w);null!=u&&null!=p&&"image/"==p.substring(0,6)&&(w.style.width="160px",e=null,"image/svg+xml"==p&&mxClient.IS_SVG?(e=document.createElement("div"),
+e.innerHTML=mxUtils.trim(u),u=e.getElementsByTagName("svg")[0],p=parseInt(u.getAttribute("width")),q=parseInt(u.getAttribute("height")),u.setAttribute("viewBox","0 0 "+p+" "+q),u.setAttribute("width","120px"),u.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+p+(q?";base64,":";utf8,")+u)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),
+B.appendChild(e),m&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){y("_blank")})));mxUtils.br(B);var x=document.createElement("div");x.style.textAlign="center";var C=0;x.style.marginTop="6px";B.appendChild(x);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),
z.appendChild(e),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),z.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),
e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),z.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),z.appendChild(e),v(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&
-(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),z.appendChild(e),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),z.appendChild(e),a.mode!=App.MODE_DEVICE&&m||e.setAttribute("selected",
-"selected"),h&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),z.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="center";
-null!=f&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),e.className="geBtn",m.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&m.appendChild(e);null==d&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),q.className="geBtn",m.appendChild(q));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),
-function(){y("_blank")}),n.className="geBtn",m.appendChild(n));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){y(h?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",m.appendChild(g));a.editor.cancelFirst||m.appendChild(e);mxEvent.addListener(w,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});A.appendChild(m);this.container=A},PopupDialog=function(a,b,c,d,e){e=null!=e?e:!0;var g=document.createElement("div");
-g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=d&&d()});l.className="geBtn";l.style.marginBottom="8px";l.style.width="280px";g.appendChild(l);mxUtils.br(g);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=c&&c();a.openLink(b,null,!0)});m.className="geBtn gePrimaryBtn";m.style.width=l.style.width;g.appendChild(m);
-mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,b,c,d,e,g){g=null!=g?g:!0;var l=a.editor.graph,m=document.createElement("div");mxUtils.write(m,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||(b.style.paddingRight="20px");var n=document.createElement("input");
-n.setAttribute("value",c);n.setAttribute("type","text");n.setAttribute("spellcheck","false");n.setAttribute("autocorrect","off");n.setAttribute("autocomplete","off");n.setAttribute("autocapitalize","off");n.style.marginTop="6px";n.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";c=document.createElement("div");
-c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){n.value="";n.focus()});b.appendChild(n);b.appendChild(c);m.appendChild(b);var f=function(b,c,f,h){var k="data:"==b.substring(0,5);!a.isOffline()||
-k&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(k){a.spinner.stop();a.hideDialog();var e=!1===h?1:null!=c&&null!=f?Math.max(c/k.width,f/k.height):Math.min(1,Math.min(520/k.width,520/k.height));g&&(b=a.convertDataUri(b));d(b,Math.round(Number(k.width)*e),Math.round(Number(k.height)*e))},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,f=null==f?100:f,a.hideDialog(),d(b,c,f))},h=function(b,c){if(null!=b){var h=e?null:l.getModel().getGeometry(l.getSelectionCell());null!=h?f(b,h.width,h.height,c):f(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.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,d,f,k,e,g){h(a,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
+(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),z.appendChild(e),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),z.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected",
+"selected"),h&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),z.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";
+null!=f&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==d&&(u=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),u.className="geBtn",l.appendChild(u));m&&Editor.popupsAllowed&&(m=mxUtils.button(mxResources.get("openInNewWindow"),
+function(){y("_blank")}),m.className="geBtn",l.appendChild(m));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){y(h?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",l.appendChild(g));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(w,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});B.appendChild(l);this.container=B},PopupDialog=function(a,b,c,d,e){e=null!=e?e:!0;var g=document.createElement("div");
+g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=d&&d()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";g.appendChild(k);mxUtils.br(g);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=c&&c();a.openLink(b,null,!0)});l.className="geBtn gePrimaryBtn";l.style.width=k.style.width;g.appendChild(l);
+mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,b,c,d,e,g){g=null!=g?g:!0;var k=a.editor.graph,l=document.createElement("div");mxUtils.write(l,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||(b.style.paddingRight="20px");var m=document.createElement("input");
+m.setAttribute("value",c);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";c=document.createElement("div");
+c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){m.value="";m.focus()});b.appendChild(m);b.appendChild(c);l.appendChild(b);var f=function(b,c,f,h){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 e=!1===h?1:null!=c&&null!=f?Math.max(c/n.width,f/n.height):Math.min(1,Math.min(520/n.width,520/n.height));g&&(b=a.convertDataUri(b));d(b,Math.round(Number(n.width)*e),Math.round(Number(n.height)*e))},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,f=null==f?100:f,a.hideDialog(),d(b,c,f))},h=function(b,c){if(null!=b){var h=e?null:k.getModel().getGeometry(k.getSelectionCell());null!=h?f(b,h.width,h.height,c):f(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=l.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.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,d,f,n,e,g){h(a,g)},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 d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&h(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";c.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});b.className="geBtn";
-a.editor.cancelFirst&&c.appendChild(b);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&&(n.value=a.url));n.focus()};if(Graph.fileSupport){var k=document.createElement("input");k.setAttribute("multiple","multiple");k.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(k,"change",function(b){a.importFiles(k.files,0,0,a.maxImageSize,function(a,b,c,d,f,k){h(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(){k.click()});q.className="geBtn";c.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,11)&&"data:image/svg"!=n.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,n.value,function(a){n.value=a});a.showDialog(b.container,200,185,!0,!0);
-b.init()}),q.className="geBtn",c.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",c.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",c.appendChild(q)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&h(n.value)});q=mxUtils.button(mxResources.get("apply"),function(){h(n.value)});q.className="geBtn gePrimaryBtn";c.appendChild(q);a.editor.cancelFirst||c.appendChild(b);Graph.fileSupport&&(c.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition=
-"center 65%",m.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),m.appendChild(b));m.appendChild(c);this.container=m},LinkDialog=function(a,b,c,d,e){function g(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);y.appendChild(c)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.style.paddingRight="20px");var n=document.createElement("input");
-n.setAttribute("placeholder",mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="440px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";
-f.style.display=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){n.value="";n.focus()});var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";
-k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="420px";if(e&&null!=a.pages){null!=b&&"data:page/id,"==b.substring(0,13)?(k.setAttribute("checked","checked"),k.defaultChecked=!0):(n.setAttribute("value",b),h.setAttribute("checked","checked"),h.defaultChecked=!0);n.style.width="420px";m.appendChild(h);m.appendChild(n);m.appendChild(f);mxUtils.br(m);m.appendChild(k);e=!1;for(f=0;f<a.pages.length;f++){var u=
-document.createElement("option");mxUtils.write(u,a.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));u.setAttribute("value","data:page/id,"+a.pages[f].getId());b==u.getAttribute("value")&&(u.setAttribute("selected","selected"),e=!0);q.appendChild(u)}if(!e&&k.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");q.appendChild(p);mxEvent.addListener(q,
-"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}m.appendChild(q)}else n.setAttribute("value",b),m.appendChild(n),m.appendChild(f);l.appendChild(m);var v=mxUtils.button(c,function(){a.hideDialog();d(k.checked?"pageNotFound"!==q.value?q.value:b:n.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){k.checked?q.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){h.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(n,"focus",function(){k.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});if(Graph.fileSupport){var b=l.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.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")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),h.setAttribute("checked","checked"),h.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");
-y.style.marginTop="20px";y.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&y.appendChild(c);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=
+a.editor.cancelFirst&&c.appendChild(b);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&&(m.value=a.url));m.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,c,d,f,n){h(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 u=mxUtils.button(mxResources.get("open"),function(){n.click()});u.className="geBtn";c.appendChild(u)}}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,11)&&"data:image/svg"!=m.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,m.value,function(a){m.value=a});a.showDialog(b.container,200,185,!0,!0);
+b.init()}),u.className="geBtn",c.appendChild(u));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(u=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)}),u.className=
+"geBtn",c.appendChild(u),null!=a.drive&&"1"==urlParams.photos&&(u=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)}))}),u.className="geBtn",c.appendChild(u)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&h(m.value)});u=mxUtils.button(mxResources.get("apply"),function(){h(m.value)});u.className="geBtn gePrimaryBtn";c.appendChild(u);a.editor.cancelFirst||c.appendChild(b);Graph.fileSupport&&(c.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition=
+"center 65%",l.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),l.appendChild(b));l.appendChild(c);this.container=l},LinkDialog=function(a,b,c,d,e){function g(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);y.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var m=document.createElement("input");
+m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="440px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";
+f.style.display=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){m.value="";m.focus()});var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.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 u=document.createElement("select");u.style.width="420px";if(e&&null!=a.pages){null!=b&&"data:page/id,"==b.substring(0,13)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(m.setAttribute("value",b),h.setAttribute("checked","checked"),h.defaultChecked=!0);m.style.width="420px";l.appendChild(h);l.appendChild(m);l.appendChild(f);mxUtils.br(l);l.appendChild(n);e=!1;for(f=0;f<a.pages.length;f++){var p=
+document.createElement("option");mxUtils.write(p,a.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+a.pages[f].getId());b==p.getAttribute("value")&&(p.setAttribute("selected","selected"),e=!0);u.appendChild(p)}if(!e&&n.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");u.appendChild(q);mxEvent.addListener(u,
+"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}l.appendChild(u)}else m.setAttribute("value",b),l.appendChild(m),l.appendChild(f);k.appendChild(l);var v=mxUtils.button(c,function(){a.hideDialog();d(n.checked?"pageNotFound"!==u.value?u.value:b:m.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){n.checked?u.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+m.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){h.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");h.setAttribute("checked","checked");h.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(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.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")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),h.setAttribute("checked","checked"),h.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");
+y.style.marginTop="20px";y.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&y.appendChild(c);l=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});l.style.verticalAlign="middle";l.className="geBtn";y.appendChild(l);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.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||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&
-(b="https://drive.google.com/#folders/"+a.docs[0].id);n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&g(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,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
+(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&g(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,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(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(c).addView(d).addView(f).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&&g(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){n.value=a[0].link;n.focus()}})});null!=
-a.oneDrive&&g(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){n.value=b.value[0].webUrl;n.focus()})});null!=a.gitHub&&g(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),
-d(k.checked?q.value:n.value,LinkDialog.selectedDocs))});y.appendChild(v);a.editor.cancelFirst||y.appendChild(c);l.appendChild(y);this.container=l},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var c=document.createElement("img");c.style.border="0px";mxClient.IS_SVG?(c.setAttribute("width","164"),c.setAttribute("height","221"),c.style.width="164px",c.style.height="221px",c.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):
+"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&&g(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=
+a.oneDrive&&g(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl;m.focus()})});null!=a.gitHub&&g(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),
+d(n.checked?u.value:m.value,LinkDialog.selectedDocs))});y.appendChild(v);a.editor.cancelFirst||y.appendChild(c);k.appendChild(y);this.container=k},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var c=document.createElement("img");c.style.border="0px";mxClient.IS_SVG?(c.setAttribute("width","164"),c.setAttribute("height","221"),c.style.width="164px",c.style.height="221px",c.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):
(c.setAttribute("width","176"),c.setAttribute("height","219"),c.style.width="170px",c.style.height="219px",c.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));b.appendChild(c);mxUtils.br(b);c=document.createElement("small");c.innerHTML="v "+EditorUi.VERSION;c.style.color="#505050";b.appendChild(c);mxUtils.br(b);mxUtils.br(b);c=document.createElement("small");c.style.color="#505050";c.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';
b.appendChild(c);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b=document.createElement("div"),c=document.createElement("div");mxUtils.write(c,mxResources.get("sendYourFeedbackToDrawIo"));c.style.fontSize="18px";c.style.marginBottom="18px";b.appendChild(c);c=document.createElement("div");mxUtils.write(c,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(c);var d=document.createElement("input");
-d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(l.checked?"\nDiagram:\n"+a.getFileData():"")+"\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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
-"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+n.value+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"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\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(d,"change",function(){0<d.value.length&&0<g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(d);this.init=function(){d.focus()};var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;c=document.createElement("p");c.style.marginTop=
-"14px";c.appendChild(l);var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));c.appendChild(m);mxEvent.addListener(m,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});b.appendChild(c);c=document.createElement("div");mxUtils.write(c,mxResources.get("feedback"));b.appendChild(c);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("commentsNotes"));
-b.appendChild(n);c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(c.appendChild(m),c.appendChild(e)):(c.appendChild(e),c.appendChild(m));b.appendChild(c);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,b,c){var d=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));d.appendChild(e);var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";d.appendChild(g);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
-"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);d.appendChild(l);var m=new Graph(l);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var n=0,f=null,h=0,k=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=f&&null!=f[h]?f[h].getAttribute("name"):"pagenumber"==a?h+1:k.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%"}),u=a.getCurrentFile(),p=null,v=null,y=null,A=null,t=mxUtils.button("",function(){null!=y&&m.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));
-t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var w=mxUtils.button("",function(){null!=y&&m.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var x=mxUtils.button("",function(){null!=y&&(m.maxFitScale=8,m.fit(8),m.center())});x.className=
-"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var C=mxUtils.button("",function(){null!=y&&(m.zoomActual(),m.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 z=
+d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(k.checked?"\nDiagram:\n"+a.getFileData():"")+"\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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+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"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\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(d,"change",function(){0<d.value.length&&0<g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&g.test(d.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(d);this.init=function(){d.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;c=document.createElement("p");c.style.marginTop=
+"14px";c.appendChild(k);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));c.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});b.appendChild(c);c=document.createElement("div");mxUtils.write(c,mxResources.get("feedback"));b.appendChild(c);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("commentsNotes"));
+b.appendChild(m);c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(c.appendChild(l),c.appendChild(e)):(c.appendChild(e),c.appendChild(l));b.appendChild(c);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,b,c){var d=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));d.appendChild(e);var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";d.appendChild(g);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 l=new Graph(k);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var m=0,f=null,h=0,n=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=f&&null!=f[h]?f[h].getAttribute("name"):"pagenumber"==a?h+1:n.apply(this,arguments)};l.getLinkForCell=function(){return null};Editor.MathJaxRender&&
+l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var u=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%"}),p=a.getCurrentFile(),q=null,v=null,y=null,B=null,t=mxUtils.button("",function(){null!=y&&l.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));
+t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var w=mxUtils.button("",function(){null!=y&&l.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var x=mxUtils.button("",function(){null!=y&&(l.maxFitScale=8,l.fit(8),l.center())});x.className=
+"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var C=mxUtils.button("",function(){null!=y&&(l.zoomActual(),l.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 z=
document.createElement("div");z.style.position="absolute";z.style.textAlign="right";z.style.color="gray";z.style.marginTop="10px";z.style.backgroundColor="transparent";z.style.top="440px";z.style.right="32px";z.style.maxWidth="380px";z.style.cursor="default";var F=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"))}});F.className="geBtn";F.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=A&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(A):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(A);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.setAttribute("disabled","disabled");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var I=null;mxEvent.addListener(G,"change",function(a){null!=
-I&&(I(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),window.openWindow(a.getUrl()))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=c&&(B.style.display="none");var D=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl())});D.className="geBtn gePrimaryBtn";D.setAttribute("disabled",
-"disabled");null!=c&&(D.style.display="none",E.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var M=null;if(null!=b&&0<b.length){l.style.cursor="move";var K=document.createElement("table");K.style.border=
-"1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),P=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=b.length-1;0<=S;S--){var aa=function(c){var d=new Date(c.modifiedDate),k=null;if(0<=d.getTime()){var e=function(b){q.stop();var c=mxUtils.parseXml(b),e=a.editor.extractGraphModel(c.documentElement,!0);if(null!=e){var g=function(b){null!=b&&(b=
-v(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},v=function(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,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};G.style.display="none";G.innerHTML="";y=c;A=b;f=parseSelectFunction=null;h=0;if("mxfile"==e.nodeName){c=e.getElementsByTagName("diagram");f=[];for(b=0;b<c.length;b++)f.push(c[b]);
-h=Math.min(n,f.length-1);0<f.length&&g(f[h]);if(1<f.length)for(G.removeAttribute("disabled"),G.style.display="",b=0;b<f.length;b++)c=document.createElement("option"),mxUtils.write(c,f[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==h&&c.setAttribute("selected","selected"),G.appendChild(c);I=function(){h=n=parseInt(G.value);g(f[n])}}else v(e);z.innerHTML="";mxUtils.write(z,d.toLocaleDateString()+" "+d.toLocaleTimeString());z.setAttribute("title",k.getAttribute("title"));
-t.removeAttribute("disabled");w.removeAttribute("disabled");x.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),F.removeAttribute("disabled"),D.removeAttribute("disabled"),B.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(C,60)}else G.style.display="none",G.innerHTML="",z.innerHTML="",mxUtils.write(z,mxResources.get("errorLoadingFile"))},
-k=document.createElement("tr");k.style.borderBottom="1px solid lightGray";k.style.fontSize="12px";k.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===P?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());k.appendChild(g);k.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
-(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(k,"click",function(a){v!=c&&(q.stop(),null!=p&&(p.style.backgroundColor=""),v=c,p=k,p.style.backgroundColor="#ebf2f9",A=y=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",m.getModel().clear(),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),C.setAttribute("disabled",
-"disabled"),x.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(C,20),q.spin(l),c.getXml(function(a){v==c&&e(a)},function(a){q.stop();G.style.display="none";G.innerHTML="";z.innerHTML="";mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(k,"dblclick",function(a){D.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(k)}return k}(b[S]);null!=aa&&S==b.length-1&&(M=aa)}K.appendChild(T);g.appendChild(K)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",H.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(l.style.display="none",H.style.display="none",mxUtils.write(g,
-mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";H.appendChild(G);H.appendChild(t);H.appendChild(w);H.appendChild(C);H.appendChild(x);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(F),e.appendChild(B),e.appendChild(E),e.appendChild(D)):(e.appendChild(F),e.appendChild(B),e.appendChild(E),e.appendChild(D),e.appendChild(g));d.appendChild(e);d.appendChild(H);d.appendChild(z);this.container=
-d},DraftDialog=function(a,b,c,d,e,g,l,m){var n=document.createElement("div"),f=document.createElement("div");f.style.marginTop="0px";f.style.whiteSpace="nowrap";f.style.overflow="auto";mxUtils.write(f,b);n.appendChild(f);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.marginTop="10px";h.style.width="640px";h.style.top="46px";h.style.bottom="74px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);n.appendChild(h);var k=new Graph(h);
-k.setEnabled(!1);k.setPanning(!0);k.panningHandler.ignoreCell=!0;k.panningHandler.useLeftButtonForPanning=!0;k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;b=mxUtils.parseXml(c);var q=a.editor.extractGraphModel(b.documentElement,!0),u=0,p=null,v=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a&&null!=p&&null!=p[u]?p[u].getAttribute("name"):"pagenumber"==a?u+1:v.apply(this,arguments)};k.getLinkForCell=function(){return null};b=mxUtils.button("",function(){k.zoomIn()});b.className=
-"geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);c=mxUtils.button("",function(){k.zoomOut()});c.className="geSprite geSprite-zoomout";c.setAttribute("title",mxResources.get("zoomOut"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);f=mxUtils.button("",function(){k.maxFitScale=8;k.fit(8);k.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",
-mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);var y=mxUtils.button("",function(){k.zoomActual();k.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);e=mxUtils.button(l||mxResources.get("discard"),e);e.className="geBtn";var A=document.createElement("select");A.style.maxWidth="80px";A.style.position=
-"relative";A.style.top="-2px";A.style.verticalAlign="bottom";A.style.marginRight="6px";A.style.display="none";d=mxUtils.button(g||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.width="640px";g.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.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";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,k.getModel());k.maxFitScale=1;k.fit(8);k.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(A,"change",function(a){u=parseInt(A.value);c(p[u]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram");
-p=[];for(var f=0;f<d.length;f++)p.push(d[f]);0<p.length&&c(p[u]);if(1<p.length)for(A.style.display="",f=0;f<p.length;f++)d=document.createElement("option"),mxUtils.write(d,p[f].getAttribute("name")||mxResources.get("pageWithNumber",[f+1])),d.setAttribute("value",f),f==u&&d.setAttribute("selected","selected"),A.appendChild(d)}else b(q)};l.appendChild(A);l.appendChild(b);l.appendChild(c);l.appendChild(y);l.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
-"geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(g.appendChild(b),null!=m&&g.appendChild(m),g.appendChild(e),g.appendChild(d)):(g.appendChild(d),g.appendChild(e),null!=m&&g.appendChild(m),g.appendChild(b));n.appendChild(g);n.appendChild(l);this.container=n},FindWindow=function(a,b,c,d,e){function g(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var f=
-mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&f.substring(0,c.length)===c||null!=a&&a.test(f))return!0}}return!1}function l(){var a=n.model.getDescendants(n.model.getRoot()),b=q.value.toLowerCase(),c=u.checked?new RegExp(b):null,d=null;f!=b&&(f=b,h=null);var k=null==h;if(0<b.length)for(var e=0;e<a.length;e++){var m=n.view.getState(a[e]);if(null!=m&&null!=m.cell.value&&(k||null==d)&&(n.model.isVertex(m.cell)||n.model.isEdge(m.cell))&&(n.isHtmlLabel(m.cell)?
-(p.innerHTML=n.getLabel(m.cell),label=mxUtils.extractTextWithWhitespace([p])):label=n.getLabel(m.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||g(c,m.cell,b))||null!=c&&(c.test(label)||g(c,m.cell,b))))if(k){d=m;break}else null==d&&(d=m);k=k||m==h}null!=d?(h=d,n.scrollCellToVisible(h.cell),n.isEnabled()?n.setSelectionCell(h.cell):n.highlightCell(h.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d}
-var m=a.actions.get("find"),n=a.editor.graph,f=null,h=null,k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.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";k.appendChild(q);mxUtils.br(k);var u=document.createElement("input");
-u.setAttribute("type","checkbox");u.style.marginRight="4px";k.appendChild(u);mxUtils.write(k,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(k);var v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";f=h=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";k.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=
-l()?"":"#ffcfcf"}catch(y){a.handleError(y)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";k.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(f!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=l()?"":"#ffcfcf"}catch(A){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(k,"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"),k,b,c,d,e,!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)):n.container.focus()}))},
-TagsWindow=function(a,b,c,d,e){var g=a.editor.graph,l="tags",m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("allTags"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.width="260px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";m.appendChild(n);if(!a.isOffline()||mxClient.IS_CHROMEAPP){n.style.width=
-"240px";var f=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");f.firstChild.style.marginBottom="6px";f.style.marginLeft="6px";m.appendChild(f)}mxEvent.addListener(n,"dblclick",function(){var b=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(m);
-f=mxUtils.button(mxResources.get("hide"),function(){var a=g.getCellsForTags(n.value.split(" "),void 0,l);g.setCellsVisible(a,!1)});f.setAttribute("title",mxResources.get("hide"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";m.appendChild(f);f=mxUtils.button(mxResources.get("show"),function(){var a=g.getCellsForTags(n.value.split(" "),void 0,l);g.setCellsVisible(a,!0);if(g.isEnabled())g.setSelectionCells(a);else for(var b=0;b<a.length;b++)g.highlightCell(a[b])});f.setAttribute("title",
-mxResources.get("show"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";m.appendChild(f);var h=a.actions.get("tags"),f=mxUtils.button(mxResources.get("close"),function(){h.funct()});f.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");f.style.marginTop="8px";f.className="geBtn gePrimaryBtn";m.appendChild(f);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||h.funct()});this.window=new mxWindow(mxResources.get("tags"),m,b,c,d,e,!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()?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):g.container.focus()}))},AuthDialog=function(a,b,c,d){var e=document.createElement("div");e.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding=
-"0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("authorizationRequired"));var l="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";b==a.drive?(l=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(l=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(l=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):
-b==a.gitHub?(l=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):b==a.trello&&(l=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[l]));var n=document.createElement("input");n.setAttribute("type","checkbox");l=mxUtils.button(mxResources.get("authorize"),function(){d(n.checked)});l.insertBefore(m,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";e.appendChild(g);e.appendChild(a);
-e.appendChild(l);c&&(c=document.createElement("p"),c.style.marginTop="20px",c.appendChild(n),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberMe")),c.appendChild(g),e.appendChild(c),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,c){c=null!=c?c:a.sidebar.entries;var d=document.createElement("div"),e=[];if(null!=a.sidebar.customEntries)for(var g=0;g<a.sidebar.customEntries.length;g++){for(var l=
-a.sidebar.customEntries[g],m={title:a.getResource(l.title),entries:[]},n=0;n<l.entries.length;n++){var f=l.entries[n];m.entries.push({id:f.id,title:a.getResource(f.title),desc:a.getResource(f.desc),image:f.preview})}e.push(m)}for(g=0;g<c.length;g++)if(null==a.sidebar.enabledLibraries)e.push(c[g]);else{m={title:c[g].title,entries:[]};for(n=0;n<c[g].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[g].entries[n].id)&&m.entries.push(c[g].entries[n]);0<m.entries.length&&e.push(m)}c=e;
-if(b){n=document.createElement("div");n.className="geDialogTitle";mxUtils.write(n,mxResources.get("shapes"));n.style.position="absolute";n.style.top="0px";n.style.left="0px";n.style.lineHeight="40px";n.style.height="40px";n.style.right="0px";mxClient.IS_QUIRKS&&(n.style.width="718px");var h=document.createElement("div"),k=document.createElement("div");h.style.position="absolute";h.style.top="40px";h.style.left="0px";h.style.width="202px";h.style.bottom="60px";h.style.overflow="auto";mxClient.IS_QUIRKS&&
-(h.style.height="437px",h.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(n.style.width)-202+"px",k.style.height=h.style.height,k.style.marginTop=h.style.marginTop);var q=null,u=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right=
-"0px";for(g=0;g<c.length;g++)(function(b){var c=p.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);h.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=p.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var f=document.createElement("input");f.setAttribute("type","checkbox");f.checked=a.sidebar.isEntryVisible(b.id);f.defaultChecked=f.checked;c.appendChild(f);
-mxUtils.write(c," "+b.title);h.appendChild(c);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){k.style.textAlign="center";k.style.padding="0px";k.style.color="";k.innerHTML="";if(null!=b.desc){var d=document.createElement("pre");d.style.boxSizing="border-box";d.style.fontFamily="inherit";d.style.margin="20px";d.style.right="0px";d.style.textAlign="left";mxUtils.write(d,b.desc);k.appendChild(d)}null!=b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML+='<img border="0" src="'+
-b.image+'"/>':null==b.desc&&(k.style.padding="20px",k.style.color="rgb(179, 179, 179)",mxUtils.write(k,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",e);mxEvent.addListener(c,"dblclick",function(a){f.checked=!f.checked;mxEvent.consume(a)});u.push(function(){return f.checked?b.id:null});0==g&&0==d&&e()})(b.entries[d])})(c[g]);d.style.padding="30px";d.appendChild(n);
-d.appendChild(h);d.appendChild(k);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=n.style.width,c.style.paddingTop="12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),
-n.style.paddingRight="20px",n.appendChild(v),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(n,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(n.style.position="relative",n.style.top="-6px"),c.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";b=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=
-[],c=0;c<u.length;c++){var d=u[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});b.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table"),n=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";m=document.createElement("tr");y.style.width="100%";b=document.createElement("td");var e=document.createElement("td"),l=document.createElement("td"),A=mxUtils.bind(this,function(b,c,d){var f=document.createElement("input");
-f.type="checkbox";y.appendChild(f);f.checked=a.sidebar.isEntryVisible(d);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(f);c.appendChild(h);mxEvent.addListener(h,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return f.checked?d:null}});m.appendChild(b);m.appendChild(e);m.appendChild(l);n.appendChild(m);y.appendChild(n);for(var u=[],t=0,g=0;g<c.length;g++)for(n=0;n<c[g].entries.length;n++)t++;
-for(var w=[b,e,l],x=0,g=0;g<c.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(A(w[Math.floor(x/(t/3))],c.title,c.id));x++}})(c[g]);d.appendChild(y);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,c.appendChild(v),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),c.appendChild(n),
-mxEvent.addListener(n,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));d.appendChild(c);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";b=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var d=u[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});b.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";
-c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(n),c.appendChild(b)):(c.appendChild(b),c.appendChild(n));d.appendChild(c);this.container=d},PluginsDialog=function(a){function b(){if(0==e.length)d.innerHTML=mxResources.get("noPlugins");else{d.innerHTML="";for(var c=0;c<e.length;c++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top=
+(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"))}});F.className="geBtn";F.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=B&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(B):a.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(B);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.setAttribute("disabled","disabled");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var I=null;mxEvent.addListener(G,"change",function(a){null!=
+I&&(I(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),window.openWindow(a.getUrl()))});A.className="geBtn";A.setAttribute("disabled","disabled");null!=c&&(A.style.display="none");var D=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl())});D.className="geBtn gePrimaryBtn";D.setAttribute("disabled",
+"disabled");null!=c&&(D.style.display="none",E.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var M=null;if(null!=b&&0<b.length){k.style.cursor="move";var K=document.createElement("table");K.style.border=
+"1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),P=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var S=b.length-1;0<=S;S--){var aa=function(c){var d=new Date(c.modifiedDate),n=null;if(0<=d.getTime()){var e=function(b){u.stop();var c=mxUtils.parseXml(b),e=a.editor.extractGraphModel(c.documentElement,!0);if(null!=e){var g=function(b){null!=b&&(b=
+q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},q=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,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};G.style.display="none";G.innerHTML="";y=c;B=b;f=parseSelectFunction=null;h=0;if("mxfile"==e.nodeName){c=e.getElementsByTagName("diagram");f=[];for(b=0;b<c.length;b++)f.push(c[b]);
+h=Math.min(m,f.length-1);0<f.length&&g(f[h]);if(1<f.length)for(G.removeAttribute("disabled"),G.style.display="",b=0;b<f.length;b++)c=document.createElement("option"),mxUtils.write(c,f[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==h&&c.setAttribute("selected","selected"),G.appendChild(c);I=function(){h=m=parseInt(G.value);g(f[m])}}else q(e);z.innerHTML="";mxUtils.write(z,d.toLocaleDateString()+" "+d.toLocaleTimeString());z.setAttribute("title",n.getAttribute("title"));
+t.removeAttribute("disabled");w.removeAttribute("disabled");x.removeAttribute("disabled");C.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),F.removeAttribute("disabled"),D.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(C,60)}else G.style.display="none",G.innerHTML="",z.innerHTML="",mxUtils.write(z,mxResources.get("errorLoadingFile"))},
+n=document.createElement("tr");n.style.borderBottom="1px solid lightGray";n.style.fontSize="12px";n.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===P?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());n.appendChild(g);n.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(n,"click",function(a){v!=c&&(u.stop(),null!=q&&(q.style.backgroundColor=""),v=c,q=n,q.style.backgroundColor="#ebf2f9",B=y=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",l.getModel().clear(),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),C.setAttribute("disabled",
+"disabled"),x.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(C,20),u.spin(k),c.getXml(function(a){v==c&&e(a)},function(a){u.stop();G.style.display="none";G.innerHTML="";z.innerHTML="";mxUtils.write(z,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}(b[S]);null!=aa&&S==b.length-1&&(M=aa)}K.appendChild(T);g.appendChild(K)}else null==p||null==a.drive&&p.constructor==window.DriveFile||null==a.dropbox&&p.constructor==window.DropboxFile?(k.style.display="none",H.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",H.style.display="none",mxUtils.write(g,
+mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";H.appendChild(G);H.appendChild(t);H.appendChild(w);H.appendChild(C);H.appendChild(x);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(F),e.appendChild(A),e.appendChild(E),e.appendChild(D)):(e.appendChild(F),e.appendChild(A),e.appendChild(E),e.appendChild(D),e.appendChild(g));d.appendChild(e);d.appendChild(H);d.appendChild(z);this.container=
+d},DraftDialog=function(a,b,c,d,e,g,k,l){var m=document.createElement("div"),f=document.createElement("div");f.style.marginTop="0px";f.style.whiteSpace="nowrap";f.style.overflow="auto";mxUtils.write(f,b);m.appendChild(f);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.marginTop="10px";h.style.width="640px";h.style.top="46px";h.style.bottom="74px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);m.appendChild(h);var n=new Graph(h);
+n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(c);var u=a.editor.extractGraphModel(b.documentElement,!0),p=0,q=null,v=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[p]?q[p].getAttribute("name"):"pagenumber"==a?p+1:v.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className=
+"geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);c=mxUtils.button("",function(){n.zoomOut()});c.className="geSprite geSprite-zoomout";c.setAttribute("title",mxResources.get("zoomOut"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);f=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",
+mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,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);e=mxUtils.button(k||mxResources.get("discard"),e);e.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position=
+"relative";B.style.top="-2px";B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";d=mxUtils.button(g||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.width="640px";g.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";h.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(B,"change",function(a){p=parseInt(B.value);c(q[p]);mxEvent.consume(a)});if("mxfile"==u.nodeName){var d=u.getElementsByTagName("diagram");
+q=[];for(var f=0;f<d.length;f++)q.push(d[f]);0<q.length&&c(q[p]);if(1<q.length)for(B.style.display="",f=0;f<q.length;f++)d=document.createElement("option"),mxUtils.write(d,q[f].getAttribute("name")||mxResources.get("pageWithNumber",[f+1])),d.setAttribute("value",f),f==p&&d.setAttribute("selected","selected"),B.appendChild(d)}else b(u)};k.appendChild(B);k.appendChild(b);k.appendChild(c);k.appendChild(y);k.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
+"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(g.appendChild(b),null!=l&&g.appendChild(l),g.appendChild(e),g.appendChild(d)):(g.appendChild(d),g.appendChild(e),null!=l&&g.appendChild(l),g.appendChild(b));m.appendChild(g);m.appendChild(k);this.container=m},FindWindow=function(a,b,c,d,e){function g(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var f=
+mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&f.substring(0,c.length)===c||null!=a&&a.test(f))return!0}}return!1}function k(){var a=m.model.getDescendants(m.model.getRoot()),b=u.value.toLowerCase(),c=p.checked?new RegExp(b):null,d=null;f!=b&&(f=b,h=null);var n=null==h;if(0<b.length)for(var e=0;e<a.length;e++){var k=m.view.getState(a[e]);if(null!=k&&null!=k.cell.value&&(n||null==d)&&(m.model.isVertex(k.cell)||m.model.isEdge(k.cell))&&(m.isHtmlLabel(k.cell)?
+(q.innerHTML=m.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([q])):label=m.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||g(c,k.cell,b))||null!=c&&(c.test(label)||g(c,k.cell,b))))if(n){d=k;break}else null==d&&(d=k);n=n||k==h}null!=d?(h=d,m.scrollCellToVisible(h.cell),m.isEnabled()?m.setSelectionCell(h.cell):m.highlightCell(h.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}
+var l=a.actions.get("find"),m=a.editor.graph,f=null,h=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";n.appendChild(u);mxUtils.br(n);var p=document.createElement("input");
+p.setAttribute("type","checkbox");p.style.marginRight="4px";n.appendChild(p);mxUtils.write(n,mxResources.get("regularExpression"));var q=document.createElement("div");mxUtils.br(n);var v=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";f=h=null;u.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{u.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(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(f!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=k()?"":"#ffcfcf"}catch(B){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&
+a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,b,c,d,e,!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()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},
+TagsWindow=function(a,b,c,d,e){var g=a.editor.graph,k="tags",l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var m=document.createElement("input");m.setAttribute("placeholder",mxResources.get("allTags"));m.setAttribute("type","text");m.style.marginTop="4px";m.style.width="260px";m.style.fontSize="12px";m.style.borderRadius="4px";m.style.padding="6px";l.appendChild(m);if(!a.isOffline()||mxClient.IS_CHROMEAPP){m.style.width=
+"240px";var f=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");f.firstChild.style.marginBottom="6px";f.style.marginLeft="6px";l.appendChild(f)}mxEvent.addListener(m,"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()});m.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(l);
+f=mxUtils.button(mxResources.get("hide"),function(){var a=g.getCellsForTags(m.value.split(" "),void 0,k);g.setCellsVisible(a,!1)});f.setAttribute("title",mxResources.get("hide"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";l.appendChild(f);f=mxUtils.button(mxResources.get("show"),function(){var a=g.getCellsForTags(m.value.split(" "),void 0,k);g.setCellsVisible(a,!0);if(g.isEnabled())g.setSelectionCells(a);else for(var b=0;b<a.length;b++)g.highlightCell(a[b])});f.setAttribute("title",
+mxResources.get("show"));f.style.marginTop="8px";f.style.marginRight="4px";f.className="geBtn";l.appendChild(f);var h=a.actions.get("tags"),f=mxUtils.button(mxResources.get("close"),function(){h.funct()});f.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");f.style.marginTop="8px";f.className="geBtn gePrimaryBtn";l.appendChild(f);mxEvent.addListener(m,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||h.funct()});this.window=new mxWindow(mxResources.get("tags"),l,b,c,d,e,!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()?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):g.container.focus()}))},AuthDialog=function(a,b,c,d){var e=document.createElement("div");e.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding=
+"0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("authorizationRequired"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";b==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):
+b==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):b==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var m=document.createElement("input");m.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){d(m.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";e.appendChild(g);e.appendChild(a);
+e.appendChild(k);c&&(c=document.createElement("p"),c.style.marginTop="20px",c.appendChild(m),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberMe")),c.appendChild(g),e.appendChild(c),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,c){c=null!=c?c:a.sidebar.entries;var d=document.createElement("div"),e=[];if(null!=a.sidebar.customEntries)for(var g=0;g<a.sidebar.customEntries.length;g++){for(var k=
+a.sidebar.customEntries[g],l={title:a.getResource(k.title),entries:[]},m=0;m<k.entries.length;m++){var f=k.entries[m];l.entries.push({id:f.id,title:a.getResource(f.title),desc:a.getResource(f.desc),image:f.preview})}e.push(l)}for(g=0;g<c.length;g++)if(null==a.sidebar.enabledLibraries)e.push(c[g]);else{l={title:c[g].title,entries:[]};for(m=0;m<c[g].entries.length;m++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[g].entries[m].id)&&l.entries.push(c[g].entries[m]);0<l.entries.length&&e.push(l)}c=e;
+if(b){m=document.createElement("div");m.className="geDialogTitle";mxUtils.write(m,mxResources.get("shapes"));m.style.position="absolute";m.style.top="0px";m.style.left="0px";m.style.lineHeight="40px";m.style.height="40px";m.style.right="0px";mxClient.IS_QUIRKS&&(m.style.width="718px");var h=document.createElement("div"),n=document.createElement("div");h.style.position="absolute";h.style.top="40px";h.style.left="0px";h.style.width="202px";h.style.bottom="60px";h.style.overflow="auto";mxClient.IS_QUIRKS&&
+(h.style.height="437px",h.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(m.style.width)-202+"px",n.style.height=h.style.height,n.style.marginTop=h.style.marginTop);var u=null,p=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right=
+"0px";for(g=0;g<c.length;g++)(function(b){var c=q.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);h.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=q.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var f=document.createElement("input");f.setAttribute("type","checkbox");f.checked=a.sidebar.isEntryVisible(b.id);f.defaultChecked=f.checked;c.appendChild(f);
+mxUtils.write(c," "+b.title);h.appendChild(c);var e=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 d=document.createElement("pre");d.style.boxSizing="border-box";d.style.fontFamily="inherit";d.style.margin="20px";d.style.right="0px";d.style.textAlign="left";mxUtils.write(d,b.desc);n.appendChild(d)}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!=u&&(u.style.backgroundColor="");u=c;u.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",e);mxEvent.addListener(c,"dblclick",function(a){f.checked=!f.checked;mxEvent.consume(a)});p.push(function(){return f.checked?b.id:null});0==g&&0==d&&e()})(b.entries[d])})(c[g]);d.style.padding="30px";d.appendChild(m);
+d.appendChild(h);d.appendChild(n);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=m.style.width,c.style.paddingTop="12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),
+m.style.paddingRight="20px",m.appendChild(v),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(m,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(m.style.position="relative",m.style.top="-6px"),c.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";b=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=
+[],c=0;c<p.length;c++){var d=p[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});b.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table"),m=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";l=document.createElement("tr");y.style.width="100%";b=document.createElement("td");var e=document.createElement("td"),k=document.createElement("td"),B=mxUtils.bind(this,function(b,c,d){var f=document.createElement("input");
+f.type="checkbox";y.appendChild(f);f.checked=a.sidebar.isEntryVisible(d);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(f);c.appendChild(h);mxEvent.addListener(h,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return f.checked?d:null}});l.appendChild(b);l.appendChild(e);l.appendChild(k);m.appendChild(l);y.appendChild(m);for(var p=[],t=0,g=0;g<c.length;g++)for(m=0;m<c[g].entries.length;m++)t++;
+for(var w=[b,e,k],x=0,g=0;g<c.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];p.push(B(w[Math.floor(x/(t/3))],c.title,c.id));x++}})(c[g]);d.appendChild(y);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,c.appendChild(v),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),c.appendChild(m),
+mxEvent.addListener(m,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));d.appendChild(c);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";b=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<p.length;c++){var d=p[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});b.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";
+c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(m),c.appendChild(b)):(c.appendChild(b),c.appendChild(m));d.appendChild(c);this.container=d},PluginsDialog=function(a){function b(){if(0==e.length)d.innerHTML=mxResources.get("noPlugins");else{d.innerHTML="";for(var c=0;c<e.length;c++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top=
"5px";g.style.marginRight="4px";g.style.display="inline-block";f.appendChild(g);mxUtils.write(f,e[c]);d.appendChild(f);mxUtils.br(d);mxEvent.addListener(g,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(c))}}}var c=document.createElement("div"),d=document.createElement("div");d.style.height="120px";d.style.overflow="auto";var e=mxSettings.getPlugins().slice();c.appendChild(d);b();var g=mxUtils.button(mxResources.get("add"),
function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var f=d.split(";"),d=0;d<f.length;d++){var g=App.pluginRegistry[f[d]];null!=g&&(c+=g+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){f=a.split(";");for(a=0;a<f.length;a++){var c=f[a],d=App.pluginRegistry[c];null!=d&&(c=d);0<c.length&&0>mxUtils.indexOf(e,c)&&e.push(c)}b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(c.container,
-300,80,!0,!0);c.init()});g.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var n=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});n.className="geBtn";a.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(n.style.display="none");var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(l),f.appendChild(n),f.appendChild(g),f.appendChild(m)):(f.appendChild(n),f.appendChild(g),f.appendChild(m),f.appendChild(l));c.appendChild(f);this.container=c},CropImageDialog=function(a,b,c){var d=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"),l=document.createElement("tr"),m=
-document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+"...");l.appendChild(m);g.appendChild(l);var l=document.createElement("tr"),n=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus();h.select()};f.appendChild(h);
-l.appendChild(n);l.appendChild(f);g.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";f.appendChild(k);l.appendChild(n);l.appendChild(f);g.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var q=
-document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";f.appendChild(q);l.appendChild(n);l.appendChild(f);g.appendChild(l);l=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";f.appendChild(u);l.appendChild(n);l.appendChild(f);g.appendChild(l);l=document.createElement("tr");
-n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");l.appendChild(n);var p=document.createElement("input");p.setAttribute("type","checkbox");f.appendChild(p);l.appendChild(f);g.appendChild(l);e.appendChild(g);d.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),d=b.getContext("2d"),f=v.width,
-e=v.height,g=parseInt(h.value),m=parseInt(k.value),f=Math.max(1,f-g-parseInt(q.value)),e=Math.max(1,e-m-parseInt(u.value));b.width=f;b.height=e;p.checked&&(d.fillStyle="#000000",d.arc(f/2,e/2,Math.min(f/2,e/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(v,g,m,f,e,0,0,f,e);c(b.toDataURL())});y.setAttribute("disabled","disabled");v.onload=function(){y.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+
-": "+v.height)};v.src=b;mxEvent.addListener(d,"keypress",function(a){13==a.keyCode&&y.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(y)):(b.appendChild(y),b.appendChild(e));d.appendChild(b);this.container=d},EditGeometryDialog=function(a,b){var c=a.editor.graph,d=1==b.length?c.getCellGeometry(b[0]):null,e=document.createElement("div"),g=document.createElement("table"),l=document.createElement("tbody"),
-m=document.createElement("tr"),n=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var h=document.createElement("input");h.setAttribute("type","checkbox");null!=d&&d.relative&&(h.setAttribute("checked","checked"),h.defaultChecked=!0);this.init=function(){h.focus()};f.appendChild(h);m.appendChild(n);m.appendChild(f);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");
-mxUtils.write(n,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=d?d.x:"";f.appendChild(k);m.appendChild(n);m.appendChild(f);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.y:"";f.appendChild(q);m.appendChild(n);
-m.appendChild(f);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d&&null!=d.offset?d.offset.x:"";f.appendChild(u);m.appendChild(n);m.appendChild(f);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+
-":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d&&null!=d.offset?d.offset.y:"";f.appendChild(p);m.appendChild(n);m.appendChild(f);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d?d.width:"";f.appendChild(v);m.appendChild(n);m.appendChild(f);
-l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";f.appendChild(y);m.appendChild(n);m.appendChild(f);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");f=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var A=document.createElement("input");
-A.setAttribute("type","text");A.style.width="100px";A.value=1==b.length?mxUtils.getValue(c.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";f.appendChild(A);m.appendChild(n);m.appendChild(f);l.appendChild(m);g.appendChild(l);e.appendChild(g);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;d<b.length;d++){var f=c.getCellGeometry(b[d]);null!=
-f&&(f=f.clone(),c.isCellMovable(b[d])&&(f.relative=h.checked,0<mxUtils.trim(k.value).length&&(f.x=Number(k.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(p.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(p.value))),c.isCellResizable(b[d])&&(0<mxUtils.trim(v.value).length&&(f.width=Number(v.value)),0<mxUtils.trim(y.value).length&&(f.height=Number(y.value))),
-c.getModel().setGeometry(b[d],f));0<mxUtils.trim(A.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[b[d]])}}finally{c.getModel().endUpdate()}});t.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&t.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(d),g.appendChild(t)):(g.appendChild(t),g.appendChild(d));e.appendChild(g);this.container=e},LibraryDialog=function(a,
-b,c,d,e,g){function l(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 c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,f,k,e,g,q,n){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==v[b]){var C=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=M.title&&0<M.title.length?M.title:mxResources.get("untitled"));
-D.style.color=null==M.title||0==M.title.length?"#d0d0d0":""};u.style.backgroundImage="";p.style.display="none";var A=k,z=e;if(k>a.maxImageSize||e>a.maxImageSize){var B=Math.min(1,Math.min(a.maxImageSize/Math.max(1,k)),a.maxImageSize/Math.max(1,e));k*=B;e*=B}A>z?(z=Math.round(100*z/A),A=100):(A=Math.round(100*A/z),z=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move";
-mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",w.convert(b));E.style.width=A+"px";E.style.height=z+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-z)/2)+"px";E.style.paddingLeft=Math.floor((100-A)/2)+"px";F.appendChild(E)}else if(null!=g){var G=a.stringToCells(a.editor.graph.decompress(g.xml));0<G.length&&(a.sidebar.createThumb(G,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS?
+300,80,!0,!0);c.init()});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});m.className="geBtn";a.isOffline()&&
+!mxClient.IS_CHROMEAPP&&(m.style.display="none");var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(m),f.appendChild(g),f.appendChild(l)):(f.appendChild(m),f.appendChild(g),f.appendChild(l),f.appendChild(k));c.appendChild(f);this.container=c},CropImageDialog=function(a,b,c){var d=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"),k=document.createElement("tr"),l=
+document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");k.appendChild(l);g.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus();h.select()};f.appendChild(h);
+k.appendChild(m);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";f.appendChild(n);k.appendChild(m);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var u=
+document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";f.appendChild(u);k.appendChild(m);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";f.appendChild(p);k.appendChild(m);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");
+m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var q=document.createElement("input");q.setAttribute("type","checkbox");f.appendChild(q);k.appendChild(f);g.appendChild(k);e.appendChild(g);d.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),d=b.getContext("2d"),f=v.width,
+e=v.height,g=parseInt(h.value),k=parseInt(n.value),f=Math.max(1,f-g-parseInt(u.value)),e=Math.max(1,e-k-parseInt(p.value));b.width=f;b.height=e;q.checked&&(d.fillStyle="#000000",d.arc(f/2,e/2,Math.min(f/2,e/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(v,g,k,f,e,0,0,f,e);c(b.toDataURL())});y.setAttribute("disabled","disabled");v.onload=function(){y.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+
+": "+v.height)};v.src=b;mxEvent.addListener(d,"keypress",function(a){13==a.keyCode&&y.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(y)):(b.appendChild(y),b.appendChild(e));d.appendChild(b);this.container=d},EditGeometryDialog=function(a,b){var c=a.editor.graph,d=1==b.length?c.getCellGeometry(b[0]):null,e=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),
+l=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("relative")+":");var h=document.createElement("input");h.setAttribute("type","checkbox");null!=d&&d.relative&&(h.setAttribute("checked","checked"),h.defaultChecked=!0);this.init=function(){h.focus()};f.appendChild(h);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");
+mxUtils.write(m,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.x:"";f.appendChild(n);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d?d.y:"";f.appendChild(u);l.appendChild(m);
+l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("dx")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d&&null!=d.offset?d.offset.x:"";f.appendChild(p);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("dy")+
+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d&&null!=d.offset?d.offset.y:"";f.appendChild(q);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d?d.width:"";f.appendChild(v);l.appendChild(m);l.appendChild(f);
+k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";f.appendChild(y);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.width="100px";B.value=1==b.length?mxUtils.getValue(c.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";f.appendChild(B);l.appendChild(m);l.appendChild(f);k.appendChild(l);g.appendChild(k);e.appendChild(g);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;d<b.length;d++){var f=c.getCellGeometry(b[d]);null!=
+f&&(f=f.clone(),c.isCellMovable(b[d])&&(f.relative=h.checked,0<mxUtils.trim(n.value).length&&(f.x=Number(n.value)),0<mxUtils.trim(u.value).length&&(f.y=Number(u.value)),0<mxUtils.trim(p.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(q.value))),c.isCellResizable(b[d])&&(0<mxUtils.trim(v.value).length&&(f.width=Number(v.value)),0<mxUtils.trim(y.value).length&&(f.height=Number(y.value))),
+c.getModel().setGeometry(b[d],f));0<mxUtils.trim(B.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[b[d]])}}finally{c.getModel().endUpdate()}});t.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&t.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(d),g.appendChild(t)):(g.appendChild(t),g.appendChild(d));e.appendChild(g);this.container=e},LibraryDialog=function(a,
+b,c,d,e,g){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=p;)a=a.parentNode;var b=null;if(null!=a)for(var c=p.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,d,f,e,n,g,u,m){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==v[b]){var C=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=M.title&&0<M.title.length?M.title:mxResources.get("untitled"));
+D.style.color=null==M.title||0==M.title.length?"#d0d0d0":""};p.style.backgroundImage="";q.style.display="none";var B=e,z=n;if(e>a.maxImageSize||n>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=A;n*=A}B>z?(z=Math.round(100*z/B),B=100):(B=Math.round(100*B/z),z=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move";
+mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",w.convert(b));E.style.width=B+"px";E.style.height=z+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-z)/2)+"px";E.style.paddingLeft=Math.floor((100-B)/2)+"px";F.appendChild(E)}else if(null!=g){var G=a.stringToCells(a.editor.graph.decompress(g.xml));0<G.length&&(a.sidebar.createThumb(G,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS?
"inline":"inline-block",F.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border","0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.position="absolute";H.style.marginLeft="-12px";H.style.zIndex="1";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(H,"click",function(d){v[b]=null;for(var f=
-0;f<h.length;f++)if(null!=h[f].data&&h[f].data==b||null!=h[f].xml&&null!=c&&h[f].xml==c.xml){h.splice(f,1);break}F.parentNode.removeChild(a);0==h.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(F,b,g);F.appendChild(H);F.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 M=null;null!=b?(M={data:b,w:k,h:e,title:n},null!=q&&(M.aspect=q),v[b]=E,h.push(M)):null!=g&&(g.aspect="fixed",h.push(g),M=g);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(a))});C();F.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});G=function(b){if(mxClient.IS_IOS||
+0;f<h.length;f++)if(null!=h[f].data&&h[f].data==b||null!=h[f].xml&&null!=c&&h[f].xml==c.xml){h.splice(f,1);break}F.parentNode.removeChild(a);0==h.length&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(F,b,g);F.appendChild(H);F.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 M=null;null!=b?(M={data:b,w:e,h:n,title:m},null!=u&&(M.aspect=u),v[b]=E,h.push(M)):null!=g&&(g.aspect="fixed",h.push(g),M=g);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(a))});C();F.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 c=new FilenameDialog(a,M.title||"",mxResources.get("ok"),function(a){null!=a&&(M.title=a,C())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=t&&(t(),t=null);if(null==M.title||0==M.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);t=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";M.title=D.innerHTML;C()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",G);mxEvent.addListener(F,"dblclick",G);u.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);y=l(a);mxClient.IS_GC&&(F.style.opacity="0.9");
-window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);H.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{k=!1;try{if(a.spinner.stop(),A=mxUtils.parseXml(b),"mxlibrary"==
-A.documentElement.nodeName){z=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=z&&0<z.length)for(var K=0;K<z.length;K++)null!=z[K].xml?m(null,null,0,0,0,0,z[K]):m(z[K].data,null,0,0,z[K].w,z[K].h,null,"fixed",z[K].title);k=!0}else if("mxfile"==A.documentElement.nodeName){for(var I=A.documentElement.getElementsByTagName("diagram"),K=0;K<I.length;K++){var z=mxUtils.getTextContent(I[K]),G=a.stringToCells(a.editor.graph.decompress(z)),V=a.editor.graph.getBoundingBoxFromGeometry(G);m(null,
-null,0,0,0,0,{xml:z,w:V.width,h:V.height})}k=!0}}catch(J){}k||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(J){}return null}function n(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function f(b){b.stopPropagation();b.preventDefault();x=!1;A=l(b);if(null!=y)null!=A&&A<u.children.length?(h.splice(A>y?A-1:A,0,h.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[A])):(h.push(h.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 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);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var h=[];c=document.createElement("div");
-c.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";c.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",b);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==e||e.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};k.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==h.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=
-document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));c.appendChild(p);var v={},y=null,A=null,t=null;b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=t&&(t(),t=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",b);mxEvent.addListener(u,"pointerdown",b);mxEvent.addListener(u,"touchstart",
-b);var w=new mxUrlConverter,x=!1;if(null!=d)for(b=0;b<d.length;b++)k=d[b],m(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(u,"dragleave",function(a){p.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==p){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var C=function(b){return function(c,d,f,h,k,e,g,w,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(c){a.spinner.stop();m(c,d,f,
-h,k,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,t.name)?a.parseFile(t,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,d,f,h,k,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,d,f,h,k,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,
-g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",f);mxEvent.addListener(p,"dragover",n);mxEvent.addListener(p,"drop",f);c.appendChild(u);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);k=mxUtils.button(mxResources.get("export"),
-function(){var b=a.createLibraryDataFromImages(h),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")});k.setAttribute("id","btnDownload");k.className="geBtn";d.appendChild(k);var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,
-"change",function(b){x=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,c,d,f,h,k,e,g,w){C(b)(a,c,d,f,h,k,e,g,w);z.value=""});u.scrollTop=u.scrollHeight}),k=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);z.click()}),k.setAttribute("id","btnAddImage"),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){x=!1;if(null!=a){if("data:image/"==
-a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}m(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";d.appendChild(k);this.saveBtnClickHandler=function(b,c,d,f){a.saveLibrary(b,c,d,f)};k=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(q.value,h,e,g)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";d.appendChild(k);
-a.editor.cancelFirst||d.appendChild(b);c.appendChild(d);this.container=c},EditShapeDialog=function(a,b,c,d,e){d=null!=d?d:300;e=null!=e?e:120;var g,l,m=document.createElement("table"),n=document.createElement("tbody");m.style.cellPadding="4px";g=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,c);g.appendChild(l);n.appendChild(g);g=document.createElement("tr");l=document.createElement("td");var f=document.createElement("textarea");
-f.style.outline="none";f.style.resize="none";f.style.width=d-200+"px";f.style.height=e+"px";this.textarea=f;this.init=function(){f.focus();f.scrollTop=0};l.appendChild(f);g.appendChild(l);l=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=e+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var h=new Graph(c);h.setEnabled(!1);
-var k=a.editor.graph.cloneCells([b])[0];h.addCells([k]);c=h.view.getState(k);var q="";null!=c.shape&&null!=c.shape.stencil&&(q=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(f,q||"");c=h.getGraphBounds();e=Math.min(160/c.width,(e-40)/c.height);h.view.scaleAndTranslate(e,20/e-c.x,20/e-c.y);g.appendChild(l);n.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align",
-"right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);a.isOffline()||(c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),c.className="geBtn",l.appendChild(c));var u=function(b,c,d){var h=f.value,k=mxUtils.parseXml(h),h=mxUtils.getPrettyXml(k.documentElement),k=k.documentElement.getElementsByTagName("parsererror");if(null!=k&&0<k.length)a.showError(mxResources.get("error"),
-mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),k=!b.model.contains(c),!d||k||h!=q){h=a.editor.graph.compress(h);b.getModel().beginUpdate();try{if(k){var e=a.editor.graph.getInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+h+")",[c])}catch(x){throw x;}finally{b.getModel().endUpdate()}k&&b.setSelectionCell(c)}};c=mxUtils.button(mxResources.get("preview"),function(){u(h,k,!1)});c.className="geBtn";
-l.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,b,!0)});c.className="geBtn gePrimaryBtn";l.appendChild(c);a.editor.cancelFirst||l.appendChild(e);g.appendChild(l);n.appendChild(g);m.appendChild(n);this.container=m},CustomDialog=function(a,b,c,d,e,g,l,m){var n=document.createElement("div");n.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=l&&b.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();
-null!=d&&d()});l.className="geBtn";m&&(l.style.display="none");a.editor.cancelFirst&&b.appendChild(l);a.isOffline()||null==g||(m=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),m.className="geBtn",b.appendChild(m));e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c()});b.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(l);n.appendChild(b);this.cancelBtn=l;this.okButton=e;this.container=n},TemplatesDialog=function(){var a=
+"true");D.focus();document.execCommand("selectAll",!1,null);t=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";M.title=D.innerHTML;C()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",G);mxEvent.addListener(F,"dblclick",G);p.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);y=k(a);mxClient.IS_GC&&(F.style.opacity="0.9");
+window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);H.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),B=mxUtils.parseXml(b),"mxlibrary"==
+B.documentElement.nodeName){z=JSON.parse(mxUtils.getTextContent(B.documentElement));if(null!=z&&0<z.length)for(var K=0;K<z.length;K++)null!=z[K].xml?l(null,null,0,0,0,0,z[K]):l(z[K].data,null,0,0,z[K].w,z[K].h,null,"fixed",z[K].title);e=!0}else if("mxfile"==B.documentElement.nodeName){for(var I=B.documentElement.getElementsByTagName("diagram"),K=0;K<I.length;K++){var z=mxUtils.getTextContent(I[K]),G=a.stringToCells(a.editor.graph.decompress(z)),V=a.editor.graph.getBoundingBoxFromGeometry(G);l(null,
+null,0,0,0,0,{xml:z,w:V.width,h:V.height})}e=!0}}catch(J){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(J){}return null}function m(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function f(b){b.stopPropagation();b.preventDefault();x=!1;B=k(b);if(null!=y)null!=B&&B<p.children.length?(h.splice(B>y?B-1:B,0,h.splice(y,1)[0]),p.insertBefore(p.children[y],p.children[B])):(h.push(h.splice(y,1)[0]),p.appendChild(p.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 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){l(c,null,0,0,a.width,a.height);p.scrollTop=p.scrollHeight})}b.stopPropagation();b.preventDefault()}var h=[];c=document.createElement("div");
+c.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";c.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",b);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==e||e.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);var p=document.createElement("div");p.style.borderWidth="1px 0px 1px 0px";p.style.borderColor="#d3d3d3";p.style.borderStyle="solid";p.style.marginTop="6px";p.style.overflow="auto";p.style.height="340px";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";0==h.length&&Graph.fileSupport&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=
+document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var v={},y=null,B=null,t=null;b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=t&&(t(),t=null,mxEvent.consume(a))};mxEvent.addListener(p,"mousedown",b);mxEvent.addListener(p,"pointerdown",b);mxEvent.addListener(p,"touchstart",
+b);var w=new mxUrlConverter,x=!1;if(null!=d)for(b=0;b<d.length;b++)n=d[b],l(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(p,"dragleave",function(a){q.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==p||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var C=function(b){return function(c,d,f,h,e,n,g,w,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(c){a.spinner.stop();l(c,d,f,
+h,e,n,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,t.name)?a.parseFile(t,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(l(c.responseText,d,f,h,e,n,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight))})):(l(c,d,f,h,e,n,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,
+g.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight)}};mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",f);mxEvent.addListener(q,"dragover",m);mxEvent.addListener(q,"drop",f);c.appendChild(p);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);n=mxUtils.button(mxResources.get("export"),
+function(){var b=a.createLibraryDataFromImages(h),c=u.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 z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,
+"change",function(b){x=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,c,d,f,h,e,n,g,w){C(b)(a,c,d,f,h,e,n,g,w);z.value=""});p.scrollTop=p.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);z.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){x=!1;if(null!=a){if("data:image/"==
+a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}l(a,null,0,0,b,c);p.scrollTop=p.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";d.appendChild(n);this.saveBtnClickHandler=function(b,c,d,f){a.saveLibrary(b,c,d,f)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(u.value,h,e,g)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";d.appendChild(n);
+a.editor.cancelFirst||d.appendChild(b);c.appendChild(d);this.container=c},EditShapeDialog=function(a,b,c,d,e){d=null!=d?d:300;e=null!=e?e:120;var g,k,l=document.createElement("table"),m=document.createElement("tbody");l.style.cellPadding="4px";g=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,c);g.appendChild(k);m.appendChild(g);g=document.createElement("tr");k=document.createElement("td");var f=document.createElement("textarea");
+f.style.outline="none";f.style.resize="none";f.style.width=d-200+"px";f.style.height=e+"px";this.textarea=f;this.init=function(){f.focus();f.scrollTop=0};k.appendChild(f);g.appendChild(k);k=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=e+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);k.appendChild(c);var h=new Graph(c);h.setEnabled(!1);
+var n=a.editor.graph.cloneCells([b])[0];h.addCells([n]);c=h.view.getState(n);var u="";null!=c.shape&&null!=c.shape.stencil&&(u=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(f,u||"");c=h.getGraphBounds();e=Math.min(160/c.width,(e-40)/c.height);h.view.scaleAndTranslate(e,20/e-c.x,20/e-c.y);g.appendChild(k);m.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align",
+"right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&k.appendChild(e);a.isOffline()||(c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),c.className="geBtn",k.appendChild(c));var p=function(b,c,d){var h=f.value,e=mxUtils.parseXml(h),h=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),
+mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||h!=u){h=a.editor.graph.compress(h);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x;c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+h+")",[c])}catch(x){throw x;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};c=mxUtils.button(mxResources.get("preview"),function(){p(h,n,!1)});c.className="geBtn";
+k.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){p(a.editor.graph,b,!0)});c.className="geBtn gePrimaryBtn";k.appendChild(c);a.editor.cancelFirst||k.appendChild(e);g.appendChild(k);m.appendChild(g);l.appendChild(m);this.container=l},CustomDialog=function(a,b,c,d,e,g,k,l){var m=document.createElement("div");m.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=k&&b.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();
+null!=d&&d()});k.className="geBtn";l&&(k.style.display="none");a.editor.cancelFirst&&b.appendChild(k);a.isOffline()||null==g||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),l.className="geBtn",b.appendChild(l));e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c()});b.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(k);m.appendChild(b);this.cancelBtn=k;this.okButton=e;this.container=m},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>",b=document.createElement("div");b.innerHTML=a;b.className="geTemplateDlg";
var a=window.innerWidth,c=window.innerHeight,d=987,e=712;.9*a<d&&(d=Math.max(.9*a,600),b.style.width=d+"px");.9*c<e&&(e=Math.max(.9*c,300),b.style.height=e+"px");this.width=d;this.height=e;this.container=b};
-TemplatesDialog.prototype.init=function(a,b,c,d,e,g,l,m,n,f){function h(){null!=E&&(E.style.fontWeight="normal",E.style.textDecoration="none",E=null)}function k(a,b,c,d,f,h,k){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(k?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+b).src="/images/"+c+"-sel.svg";C.querySelector("."+f).src="/images/"+
-h+".svg";return!0}function q(a){function b(a){Z.removeChild(d);C.removeChild(c);Z.scrollTop=h}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";C.appendChild(c);var d=document.createElement("div");d.className="geTempDlgDiagramPreviewBox";var f=document.createElement("img");f.src=a;d.appendChild(f);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));d.appendChild(a);var h=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(d);Z.scrollTop=0;d.style.lineHeight=d.clientHeight+"px"}function u(a,b,c){if(null!=G){for(var d=G.className.split(" "),f=0;f<d.length;f++)if(-1<d[f].indexOf("Active")){d.splice(f,1);break}G.className=d.join(" ")}null!=a?(G=a,G.className+=" "+b,I=c,L.className="geTempDlgCreateBtn"):(I=G=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function p(c){if(null!=I){var d=I;I=null;L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==c?f(d.url,d,"nameInput.value"):n(d.url,d,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+d.url,mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()&&(b(c.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=C.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
-a}function y(a,b,c){function d(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");v(!b)}P.innerHTML="";u();M=a;var f=null;if(c){f=document.createElement("table");f.className="geTempDlgDiagramsListGrid";var h=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxResources.get("diagram",null,"Diagram");h.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("changedBy",null,"Changed By");h.appendChild(k);
-k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");h.appendChild(k);f.appendChild(h);P.appendChild(f)}for(h=0;h<a.length;h++){a[h].isExternal=!b;var e=a[h].url,k=mxUtils.htmlEntities(a[h].title),g=a[h].tooltip||a[h].title,w=a[h].imgUrl,t=mxUtils.htmlEntities(a[h].changedBy||""),m=mxUtils.htmlEntities(a[h].lastModifiedOn||"");w||(w=TEMPLATE_PATH+"/"+e.substring(0,e.length-4)+".png");e=c?50:15;null!=k&&k.length>e&&(k=k.substring(0,
-e)+"&hellip;");if(c){var x=document.createElement("tr"),w=document.createElement("td"),l=document.createElement("img");l.src="/images/icon-search.svg";l.className="geTempDlgDiagramListPreviewBtn";l.setAttribute("title",mxResources.get("preview"));w.appendChild(l);g=document.createElement("span");g.className="geTempDlgDiagramTitle";g.innerHTML=k;w.appendChild(g);x.appendChild(w);w=document.createElement("td");w.innerHTML=t;x.appendChild(w);w=document.createElement("td");w.innerHTML=m;x.appendChild(w);
-f.appendChild(x);null==G&&(d(),u(x,"geTempDlgDiagramsListGridActive",a[h]));(function(a,b){mxEvent.addListener(x,"click",function(){G!=b&&(d(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(x,"dblclick",p);mxEvent.addListener(l,"click",function(){q(a)})})(a[h],x)}else{var n=document.createElement("div");n.className="geTempDlgDiagramTile";n.setAttribute("title",g);null==G&&(d(),u(n,"geTempDlgDiagramTileActive",a[h]));t=document.createElement("div");t.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var C=document.createElement("img");C.style.display="none";(function(a,b){C.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};C.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(C,t);C.src=w;t.appendChild(C);n.appendChild(t);t=document.createElement("div");t.className="geTempDlgDiagramTileLbl";t.innerHTML=null!=k?k:"";n.appendChild(t);l=document.createElement("img");l.src="/images/icon-search.svg";l.className="geTempDlgDiagramPreviewBtn";
-l.setAttribute("title",mxResources.get("preview"));n.appendChild(l);(function(a,b){mxEvent.addListener(n,"click",function(){G!=b&&(d(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(n,"dblclick",p);mxEvent.addListener(l,"click",function(){q(a)})})(a[h],n);P.appendChild(n)}}}function A(a,b){Q.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,d=0;d<c;d++){var f=a[d];f.isCategory=!0;var h=document.createElement("div"),k=mxResources.get(f.title);null==k&&(k=f.title.substring(0,1).toUpperCase()+
-f.title.substring(1));h.className="geTempDlgNewDiagramCatItem";h.setAttribute("title",k);k=mxUtils.htmlEntities(k);15<k.length&&(k=k.substring(0,15)+"&hellip;");null==G&&(L.innerHTML=mxResources.get("create"),v(),u(h,"geTempDlgNewDiagramCatItemActive",f));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");g.src=NEW_DIAGRAM_CATS_PATH+"/"+f.img;e.appendChild(g);h.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
-e.innerHTML=k;h.appendChild(e);Q.appendChild(h);(function(a,b){mxEvent.addListener(h,"click",function(){G!=b&&(L.innerHTML=mxResources.get("create"),v(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(h,"dblclick",p)})(f,h)}T.style.display=5>a.length?"none":""}function t(a){var b=C.querySelector(".geTemplatesList"),c;for(c in a){var d=document.createElement("div"),f=mxResources.get(c),h=a[c];null==f&&(f=c.substring(0,1).toUpperCase()+c.substring(1));d.className="geTemplateCatLink";
-d.setAttribute("title",f+" ("+h.length+")");f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");d.innerHTML=f+" ("+h.length+")";b.appendChild(d);(function(b,c,f){mxEvent.addListener(d,"click",function(){E!=f&&(null!=E?(E.style.fontWeight="normal",E.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),E=f,E.style.fontWeight="bold",E.style.textDecoration="underline",Z.scrollTop=0,z&&(F=!0),S.innerHTML=c,aa.style.display="none",y(a[b],!0))})})(c,f,d)}}function w(a){l&&
-(Z.scrollTop=0,P.innerHTML="",U.spin(P),F=!1,z=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,l(W,a?null:g))}function x(a){h();Z.scrollTop=0;P.innerHTML="";U.spin(P);F=!1;z=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';m(a,W,D?null:g);K=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,z=!1,F=!1,E=null,G=null,I=null,B=!1,D=!0,H=!1,M=[],K,T=C.querySelector(".geTempDlgShowAllBtn"),
+TemplatesDialog.prototype.init=function(a,b,c,d,e,g,k,l,m,f){function h(){null!=E&&(E.style.fontWeight="normal",E.style.textDecoration="none",E=null)}function n(a,b,c,d,f,h,e){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(e?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+b).src="/images/"+c+"-sel.svg";C.querySelector("."+f).src="/images/"+
+h+".svg";return!0}function u(a){function b(a){Z.removeChild(d);C.removeChild(c);Z.scrollTop=h}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";C.appendChild(c);var d=document.createElement("div");d.className="geTempDlgDiagramPreviewBox";var f=document.createElement("img");f.src=a;d.appendChild(f);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));d.appendChild(a);var h=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(d);Z.scrollTop=0;d.style.lineHeight=d.clientHeight+"px"}function p(a,b,c){if(null!=G){for(var d=G.className.split(" "),f=0;f<d.length;f++)if(-1<d[f].indexOf("Active")){d.splice(f,1);break}G.className=d.join(" ")}null!=a?(G=a,G.className+=" "+b,I=c,L.className="geTempDlgCreateBtn"):(I=G=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function q(c){if(null!=I){var d=I;I=null;L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==c?f(d.url,d,"nameInput.value"):m(d.url,d,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+d.url,mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()&&(b(c.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=C.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
+a}function y(a,b,c){function d(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");v(!b)}P.innerHTML="";p();M=a;var f=null;if(c){f=document.createElement("table");f.className="geTempDlgDiagramsListGrid";var h=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxResources.get("diagram",null,"Diagram");h.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxResources.get("changedBy",null,"Changed By");h.appendChild(e);
+e=document.createElement("th");e.style.width="25%";e.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");h.appendChild(e);f.appendChild(h);P.appendChild(f)}for(h=0;h<a.length;h++){a[h].isExternal=!b;var n=a[h].url,e=mxUtils.htmlEntities(a[h].title),g=a[h].tooltip||a[h].title,w=a[h].imgUrl,t=mxUtils.htmlEntities(a[h].changedBy||""),k=mxUtils.htmlEntities(a[h].lastModifiedOn||"");w||(w=TEMPLATE_PATH+"/"+n.substring(0,n.length-4)+".png");n=c?50:15;null!=e&&e.length>n&&(e=e.substring(0,
+n)+"&hellip;");if(c){var x=document.createElement("tr"),w=document.createElement("td"),l=document.createElement("img");l.src="/images/icon-search.svg";l.className="geTempDlgDiagramListPreviewBtn";l.setAttribute("title",mxResources.get("preview"));w.appendChild(l);g=document.createElement("span");g.className="geTempDlgDiagramTitle";g.innerHTML=e;w.appendChild(g);x.appendChild(w);w=document.createElement("td");w.innerHTML=t;x.appendChild(w);w=document.createElement("td");w.innerHTML=k;x.appendChild(w);
+f.appendChild(x);null==G&&(d(),p(x,"geTempDlgDiagramsListGridActive",a[h]));(function(a,b){mxEvent.addListener(x,"click",function(){G!=b&&(d(),p(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(x,"dblclick",q);mxEvent.addListener(l,"click",function(){u(a)})})(a[h],x)}else{var m=document.createElement("div");m.className="geTempDlgDiagramTile";m.setAttribute("title",g);null==G&&(d(),p(m,"geTempDlgDiagramTileActive",a[h]));t=document.createElement("div");t.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var C=document.createElement("img");C.style.display="none";(function(a,b){C.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};C.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(C,t);C.src=w;t.appendChild(C);m.appendChild(t);t=document.createElement("div");t.className="geTempDlgDiagramTileLbl";t.innerHTML=null!=e?e:"";m.appendChild(t);l=document.createElement("img");l.src="/images/icon-search.svg";l.className="geTempDlgDiagramPreviewBtn";
+l.setAttribute("title",mxResources.get("preview"));m.appendChild(l);(function(a,b){mxEvent.addListener(m,"click",function(){G!=b&&(d(),p(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(m,"dblclick",q);mxEvent.addListener(l,"click",function(){u(a)})})(a[h],m);P.appendChild(m)}}}function B(a,b){Q.innerHTML="";p();for(var c=!b&&5<a.length?5:a.length,d=0;d<c;d++){var f=a[d];f.isCategory=!0;var h=document.createElement("div"),e=mxResources.get(f.title);null==e&&(e=f.title.substring(0,1).toUpperCase()+
+f.title.substring(1));h.className="geTempDlgNewDiagramCatItem";h.setAttribute("title",e);e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");null==G&&(L.innerHTML=mxResources.get("create"),v(),p(h,"geTempDlgNewDiagramCatItemActive",f));var n=document.createElement("div");n.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");g.src=NEW_DIAGRAM_CATS_PATH+"/"+f.img;n.appendChild(g);h.appendChild(n);n=document.createElement("div");n.className="geTempDlgNewDiagramCatItemLbl";
+n.innerHTML=e;h.appendChild(n);Q.appendChild(h);(function(a,b){mxEvent.addListener(h,"click",function(){G!=b&&(L.innerHTML=mxResources.get("create"),v(),p(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(h,"dblclick",q)})(f,h)}T.style.display=5>a.length?"none":""}function t(a){var b=C.querySelector(".geTemplatesList"),c;for(c in a){var d=document.createElement("div"),f=mxResources.get(c),h=a[c];null==f&&(f=c.substring(0,1).toUpperCase()+c.substring(1));d.className="geTemplateCatLink";
+d.setAttribute("title",f+" ("+h.length+")");f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");d.innerHTML=f+" ("+h.length+")";b.appendChild(d);(function(b,c,f){mxEvent.addListener(d,"click",function(){E!=f&&(null!=E?(E.style.fontWeight="normal",E.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),E=f,E.style.fontWeight="bold",E.style.textDecoration="underline",Z.scrollTop=0,z&&(F=!0),S.innerHTML=c,aa.style.display="none",y(a[b],!0))})})(c,f,d)}}function w(a){k&&
+(Z.scrollTop=0,P.innerHTML="",U.spin(P),F=!1,z=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,k(W,a?null:g))}function x(a){h();Z.scrollTop=0;P.innerHTML="";U.spin(P);F=!1;z=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';l(a,W,D?null:g);K=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,z=!1,F=!1,E=null,G=null,I=null,A=!1,D=!0,H=!1,M=[],K,T=C.querySelector(".geTempDlgShowAllBtn"),
P=C.querySelector(".geTempDlgDiagramsTiles"),S=C.querySelector(".geTempDlgDiagramsListTitle"),aa=C.querySelector(".geTempDlgDiagramsListBtns"),Z=C.querySelector(".geTempDlgContent"),N=C.querySelector(".geTempDlgDiagramsList"),Y=C.querySelector(".geTempDlgNewDiagramCat"),Q=C.querySelector(".geTempDlgNewDiagramCatList"),L=C.querySelector(".geTempDlgCreateBtn"),U=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(){h();Y.style.display="";N.style.minHeight="calc(100% - 280px)";w(D)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){k(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(D=!0,null==K?w(D):x(K))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){k(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
-"all-diagrams",!0)&&(D=!1,null==K?w(D):x(K))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){k(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(H=!0,y(M,!1,H))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){k(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(H=!1,y(M,!1,H))});mxEvent.addListener(T,"click",function(){B?(Y.style.height="280px",
-Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),A(J)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),A(J,!0));B=!B});var R=!1,O=!1,V={},J=[],X=1;mxUtils.get(d,function(a){if(!R){R=!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=V[b];null==c&&(X++,c=[],V[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}t(V)}});mxUtils.get(e,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&J.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;A(J)}});var W=function(a,b){aa.style.display="";U.stop();z=!1;F?F=!1:b?P.innerHTML=b:
-0==a.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,H)};w(D);var da=null;m&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?x(b.value):da=setTimeout(function(){x(b.value)},500)});mxEvent.addListener(L,"click",p);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){p(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+"click",function(){h();Y.style.display="";N.style.minHeight="calc(100% - 280px)";w(D)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){n(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(D=!0,null==K?w(D):x(K))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){n(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
+"all-diagrams",!0)&&(D=!1,null==K?w(D):x(K))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){n(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(H=!0,y(M,!1,H))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){n(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(H=!1,y(M,!1,H))});mxEvent.addListener(T,"click",function(){A?(Y.style.height="280px",
+Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),B(J)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),B(J,!0));A=!A});var R=!1,O=!1,V={},J=[],X=1;mxUtils.get(d,function(a){if(!R){R=!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=V[b];null==c&&(X++,c=[],V[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}t(V)}});mxUtils.get(e,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&J.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;B(J)}});var W=function(a,b){aa.style.display="";U.stop();z=!1;F?F=!1:b?P.innerHTML=b:
+0==a.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,H)};w(D);var da=null;l&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?x(b.value):da=setTimeout(function(){x(b.value)},500)});mxEvent.addListener(L,"click",q);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
c&&c();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":
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==":
@@ -7469,8 +7471,9 @@ dispName:"Source Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none
type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"loopStyle",dispName:"Loop Style",type:"bool",defVal:!0}];Editor.commonVertexProperties=[{type:"separator"},{name:"fillOpacity",dispName:"Fill Opacity",
type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",
type:"enum",defVal:"east",enumList:[{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Port Const. Rot.",type:"bool",defVal:!1},{name:"snapToPoint",dispName:"Snap to Point",
-type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",
-type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",
+dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",
+dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,b){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;
Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
@@ -7490,8 +7493,8 @@ showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||
Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.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 d=document.getElementsByTagName("script");
if(null!=d&&0<d.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};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,c,d,f){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==f&&b.push(f);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
-"1"==urlParams.embed||this.editorUi.editor.chromeless?m.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 n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=
+mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
+"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=
this.editorUi,c=b.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var d=new ChangePageSetup(b);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;c.model.execute(d)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,
60));a.appendChild(d)}return a};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=f.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=b.getCurrentFile();null!=d&&d.isAutosaveOptional()&&(d=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(d))}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop=
@@ -7517,44 +7520,44 @@ font:"#ffffff"},{fill:"#6d8764",stroke:"#6d8764",font:"#ffffff"},{fill:"#647687"
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,b,c){if(null!=b){var d=function(a){if(null!=a)if(c)for(var d=0;d<a.length;d++)b[a[d].name]=a[d];else for(var f in b){for(var h=!1,d=0;d<a.length;d++)if(a[d].name==f&&a[d].type==b[f].type){h=!0;break}h||delete b[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=
!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(E){}}};var h=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
-h.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,d=a.edges,f=0;f<c.length;f++)this.findCommonProperties(c[f],b,0==f);for(f=0;f<d.length;f++)this.findCommonProperties(d[f],b,0==c.length&&0==f);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
+h.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,d=a.edges,f=0;f<c.length;f++)this.findCommonProperties(c[f],b,0==f);for(f=0;f<d.length;f++)this.findCommonProperties(d[f],b,0==c.length&&0==f);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 k.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function d(a,b,c,d){w.getModel().beginUpdate();try{var f=[],h=[];if(null!=c.index){for(var k=[],e=c.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)k.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<k.length?null!=d?k.splice(d,1):k[c.index]=b:k.push(b);null!=c.size&&k.length>
-c.size&&(k=k.slice(0,c.size));b=k.join(",");null!=c.countProperty&&(w.setCellStyles(c.countProperty,k.length,w.getSelectionCells()),f.push(c.countProperty),h.push(k.length))}w.setCellStyles(a,b,w.getSelectionCells());f.push(a);h.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a],t=c.dependentPropsVals[a];if(t.length>b)t=t.slice(0,b);else for(var l=t.length;l<b;l++)t.push(g);t=t.join(",");w.setCellStyles(c.dependentProps[a],t,w.getSelectionCells());
-f.push(c.dependentProps[a]);h.push(t)}q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",h,"cells",w.getSelectionCells()))}finally{w.getModel().endUpdate()}}function f(b,c,d){var f=mxUtils.getOffset(a,!0),h=mxUtils.getOffset(b,!0);c.style.position="absolute";c.style.left=h.x-f.x+"px";c.style.top=h.y-f.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(d?4:0)+"px";c.style.zIndex=5}function h(a,b,c){var f=document.createElement("div");f.style.width="32px";f.style.height=
-"4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(h){this.editorUi.pickColor(b,function(b){f.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;d(a,b,c)});mxEvent.consume(h)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function k(a,b,c,f,h,k,e){null!=b&&(b=b.split(","),m.push({name:a,
-values:b,type:c,defVal:f,countProperty:h,parentRow:k,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var g=k,q=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,q++;else break;var w={type:c,parentRow:k,index:q,isDeletable:!0,defVal:f,countProperty:h},q=t(a,"",w,0==q%2,e);d(a,f,w);g.parentNode.insertBefore(q,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function e(a,b,c,d,f,h,k){if(0<f){var e=Array(f);b=null!=b?b.split(","):[];for(var g=0;g<f;g++)e[g]=null!=b[g]?b[g]:null!=d?d:"";m.push({name:a,values:e,type:c,defVal:d,parentRow:h,flipBkg:k,size:f})}return document.createElement("div")}function g(a,b,c){var f=document.createElement("input");f.type="checkbox";f.checked="1"==b;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",c)});return f}function t(b,c,t,w,l){var m=t.dispName,u=t.type,v=document.createElement("tr");v.className="gePropRow"+
-(l?"Dark":"")+(w?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);w=!1;null!=t.index&&(v.setAttribute("data-index",t.index),m=(null!=m?m:"")+"["+t.index+"]",w=!0);var p=document.createElement("td");p.className="gePropRowCell";p.innerHTML=mxUtils.htmlEntities(mxResources.get(m,null,m));w&&(p.style.textAlign="right");v.appendChild(p);p=document.createElement("td");p.className="gePropRowCell";if("color"==u)p.appendChild(h(b,c,t));else if("bool"==u||"boolean"==
-u)p.appendChild(g(b,c,t));else if("enum"==u){var x=t.enumList;for(l=0;l<x.length;l++)if(m=x[l],m.val==c){p.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(p,"click",mxUtils.bind(q,function(){var h=document.createElement("select");f(p,h);for(var k=0;k<x.length;k++){var e=x[k],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));h.appendChild(g)}h.value=
-c;a.appendChild(h);mxEvent.addListener(h,"change",function(){var a=mxUtils.htmlEntities(h.value);d(b,a,t)});h.focus();mxEvent.addListener(h,"blur",function(){a.removeChild(h)})}))}else"dynamicArr"==u?p.appendChild(k(b,c,t.subType,t.subDefVal,t.countProperty,v,l)):"staticArr"==u?p.appendChild(e(b,c,t.subType,t.subDefVal,t.size,v,l)):(p.innerHTML=c,mxEvent.addListener(p,"click",mxUtils.bind(q,function(){function h(){var a=k.value;null!=t.min&&a<t.min?a=t.min:null!=t.max&&a>t.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==
-u?parseInt(a):a)+"");d(b,a,t)}var k=document.createElement("input");f(p,k,!0);k.value=c;k.className="gePropEditor";if("int"==u||"float"==u)k.type="number",k.step="int"==u?"1":"any",null!=t.min&&(k.min=parseFloat(t.min)),null!=t.max&&(k.max=parseFloat(t.max));a.appendChild(k);mxEvent.addListener(k,"change",h);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&h()});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})})));t.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(q,
-function(a){d(b,"",t,t.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",p.appendChild(l));v.appendChild(p);return v}var q=this,w=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var u=document.createElement("table");u.style.whiteSpace="nowrap";u.style.width="100%";var l=document.createElement("tr");l.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var p=
-document.createElement("img");p.src=Sidebar.prototype.expandedImage;v.appendChild(p);mxUtils.write(v,mxResources.get("property",null,"Property"));l.style.cursor="pointer";var x=function(){var b=u.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){p.src=Sidebar.prototype.collapsedImage;c="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],h=f.nodeName.toUpperCase();"INPUT"!=h&&"SELECT"!=h||a.removeChild(f)}catch(ea){}}else p.src=Sidebar.prototype.expandedImage,
-c="";for(d=0;d<b.length;d++)b[d].style.display=c};mxEvent.addListener(l,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;x()});l.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value",null,"Value");l.appendChild(v);u.appendChild(l);var n=!1,A=!1,y;for(y in b){var l=b[y],C=null!=c.style[y]?mxUtils.htmlEntities(c.style[y]+""):l.defVal;if("separator"==l.type)A=!A;else{if("staticArr"==l.type)l.size=parseInt(c.style[l.sizeProperty]||
-b[l.sizeProperty].defVal)||0;else if(null!=l.dependentProps){for(var U=l.dependentProps,R=[],O=[],v=0;v<U.length;v++){var V=c.style[U[v]];O.push(b[U[v]].subDefVal);R.push(null!=V?V.split(","):[])}l.dependentPropsDefVal=O;l.dependentPropsVals=R}u.appendChild(t(y,C,l,n,A));n=!n}}for(v=0;v<m.length;v++)for(l=m[v],b=l.parentRow,c=0;c<l.values.length;c++)y=t(l.name,l.values[c],{type:l.type,parentRow:l.parentRow,isDeletable:l.isDeletable,index:c,defVal:l.defVal,countProperty:l.countProperty,size:l.size},
-0==c%2,l.flipBkg),b.parentNode.insertBefore(y,b.nextSibling),b=y;a.appendChild(u);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var f=d.getModel().getStyle(c[b]),k=0;k<h.length;k++)f=mxUtils.removeStylename(f,h[k]);var e=d.getModel().isVertex(c[b])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,
-a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(c[b])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,
-mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(c[b])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(c[b],f)}}finally{d.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?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,
-mxConstants.STYLE_FILLCOLOR,"#ffffff"),b.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var c=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+k}f.appendChild(b)}f.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(f),b(a[c])}function c(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,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);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 k=document.createElement("div");k.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(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.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(k),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(k);c(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+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 d(a,b,c,d){u.getModel().beginUpdate();try{var f=[],h=[];if(null!=c.index){for(var e=[],n=c.parentRow.nextSibling;n&&n.getAttribute("data-pName")==a;)e.push(n.getAttribute("data-pValue")),n=n.nextSibling;c.index<e.length?null!=d?e.splice(d,1):e[c.index]=b:e.push(b);null!=c.size&&e.length>
+c.size&&(e=e.slice(0,c.size));b=e.join(",");null!=c.countProperty&&(u.setCellStyles(c.countProperty,e.length,u.getSelectionCells()),f.push(c.countProperty),h.push(e.length))}u.setCellStyles(a,b,u.getSelectionCells());f.push(a);h.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a],t=c.dependentPropsVals[a];if(t.length>b)t=t.slice(0,b);else for(var w=t.length;w<b;w++)t.push(g);t=t.join(",");u.setCellStyles(c.dependentProps[a],t,u.getSelectionCells());
+f.push(c.dependentProps[a]);h.push(t)}p.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",h,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function f(b,c,d){var f=mxUtils.getOffset(a,!0),h=mxUtils.getOffset(b,!0);c.style.position="absolute";c.style.left=h.x-f.x+"px";c.style.top=h.y-f.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(d?4:0)+"px";c.style.zIndex=5}function h(a,b,c){var f=document.createElement("div");f.style.width="32px";f.style.height=
+"4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(h){this.editorUi.pickColor(b,function(b){f.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;d(a,b,c)});mxEvent.consume(h)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function e(a,b,c,f,h,e,n){null!=b&&(b=b.split(","),w.push({name:a,
+values:b,type:c,defVal:f,countProperty:h,parentRow:e,isDeletable:!0,flipBkg:n}));btn=mxUtils.button("+",mxUtils.bind(p,function(b){for(var g=e,p=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,p++;else break;var u={type:c,parentRow:e,index:p,isDeletable:!0,defVal:f,countProperty:h},p=t(a,"",u,0==p%2,n);d(a,f,u);g.parentNode.insertBefore(p,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function n(a,b,c,d,f,h,e){if(0<f){var n=Array(f);b=null!=b?b.split(","):[];for(var g=0;g<f;g++)n[g]=null!=b[g]?b[g]:null!=d?d:"";w.push({name:a,values:n,type:c,defVal:d,parentRow:h,flipBkg:e,size:f})}return document.createElement("div")}function g(a,b,c){var f=document.createElement("input");f.type="checkbox";f.checked="1"==b;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",c)});return f}function t(b,c,t,u,w){var k=t.dispName,l=t.type,q=document.createElement("tr");q.className="gePropRow"+
+(w?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";q.setAttribute("data-pName",b);q.setAttribute("data-pValue",c);u=!1;null!=t.index&&(q.setAttribute("data-index",t.index),k=(null!=k?k:"")+"["+t.index+"]",u=!0);var v=document.createElement("td");v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(k,null,k));u&&(v.style.textAlign="right");q.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==l)v.appendChild(h(b,c,t));else if("bool"==l||"boolean"==
+l)v.appendChild(g(b,c,t));else if("enum"==l){var m=t.enumList;for(w=0;w<m.length;w++)if(k=m[w],k.val==c){v.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(p,function(){var h=document.createElement("select");f(v,h);for(var e=0;e<m.length;e++){var n=m[e],g=document.createElement("option");g.value=mxUtils.htmlEntities(n.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(n.dispName,null,n.dispName));h.appendChild(g)}h.value=
+c;a.appendChild(h);mxEvent.addListener(h,"change",function(){var a=mxUtils.htmlEntities(h.value);d(b,a,t)});h.focus();mxEvent.addListener(h,"blur",function(){a.removeChild(h)})}))}else"dynamicArr"==l?v.appendChild(e(b,c,t.subType,t.subDefVal,t.countProperty,q,w)):"staticArr"==l?v.appendChild(n(b,c,t.subType,t.subDefVal,t.size,q,w)):(v.innerHTML=c,mxEvent.addListener(v,"click",mxUtils.bind(p,function(){function h(){var a=e.value,a=0==a.length&&"string"!=l?0:a;t.allowAuto&&("auto"==a.trim().toLowerCase()?
+(a="auto",l="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=t.min&&a<t.min?a=t.min:null!=t.max&&a>t.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==l?parseInt(a):a)+"");d(b,a,t)}var e=document.createElement("input");f(v,e,!0);e.value=c;e.className="gePropEditor";"int"!=l&&"float"!=l||t.allowAuto||(e.type="number",e.step="int"==l?"1":"any",null!=t.min&&(e.min=parseFloat(t.min)),null!=t.max&&(e.max=parseFloat(t.max)));a.appendChild(e);mxEvent.addListener(e,"change",h);mxEvent.addListener(e,"keypress",
+function(a){13==a.keyCode&&h()});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})})));t.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(p,function(a){d(b,"",t,t.index);mxEvent.consume(a)})),w.style.height="16px",w.style.width="25px",w.style["float"]="right",w.className="geColorBtn",v.appendChild(w));q.appendChild(v);return q}var p=this,u=this.editorUi.editor.graph,w=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";
+k.style.width="100%";var l=document.createElement("tr");l.className="gePropHeader";var q=document.createElement("th");q.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;q.appendChild(v);mxUtils.write(q,mxResources.get("property",null,"Property"));l.style.cursor="pointer";var m=function(){var b=k.querySelectorAll(".gePropNonHeaderRow"),c;if(p.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;c="none";for(var d=a.childNodes.length-
+1;0<=d;d--)try{var f=a.childNodes[d],h=f.nodeName.toUpperCase();"INPUT"!=h&&"SELECT"!=h||a.removeChild(f)}catch(ea){}}else v.src=Sidebar.prototype.expandedImage,c="";for(d=0;d<b.length;d++)b[d].style.display=c};mxEvent.addListener(l,"click",function(){p.editorUi.propertiesCollapsed=!p.editorUi.propertiesCollapsed;m()});l.appendChild(q);q=document.createElement("th");q.className="gePropHeaderCell";q.innerHTML=mxResources.get("value",null,"Value");l.appendChild(q);k.appendChild(l);var x=!1,B=!1,y;for(y in b){var l=
+b[y],C=null!=c.style[y]?mxUtils.htmlEntities(c.style[y]+""):l.defVal;if("separator"==l.type)B=!B;else{if("staticArr"==l.type)l.size=parseInt(c.style[l.sizeProperty]||b[l.sizeProperty].defVal)||0;else if(null!=l.dependentProps){for(var U=l.dependentProps,R=[],O=[],q=0;q<U.length;q++){var V=c.style[U[q]];O.push(b[U[q]].subDefVal);R.push(null!=V?V.split(","):[])}l.dependentPropsDefVal=O;l.dependentPropsVals=R}k.appendChild(t(y,C,l,x,B));x=!x}}for(q=0;q<w.length;q++)for(l=w[q],b=l.parentRow,c=0;c<l.values.length;c++)y=
+t(l.name,l.values[c],{type:l.type,parentRow:l.parentRow,isDeletable:l.isDeletable,index:c,defVal:l.defVal,countProperty:l.countProperty,size:l.size},0==c%2,l.flipBkg),b.parentNode.insertBefore(y,b.nextSibling),b=y;a.appendChild(k);m();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var f=d.getModel().getStyle(c[b]),e=0;e<h.length;e++)f=mxUtils.removeStylename(f,
+h[e]);var n=d.getModel().isVertex(c[b])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(c[b])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,
+a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(c[b])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,
+null))));d.getModel().setStyle(c[b],f)}}finally{d.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?
+b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),b.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var c=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+
+e}f.appendChild(b)}f.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(f),b(a[c])}function c(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,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);
+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 e=document.createElement("div");e.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(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var n=document.createElement("div");n.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(e),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(e);c(n);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==c?b.style.width="202px":
(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var q=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}q.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var u=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}u.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=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("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}return d.apply(this,arguments)}};var u=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return u.apply(this,arguments)&&!mxClient.IS_SF};var p=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=p.apply(this,arguments);if(null==
+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}return d.apply(this,arguments)}};var p=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return p.apply(this,arguments)&&!mxClient.IS_SF};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=q.apply(this,arguments);if(null==
b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(C){null!=window.console&&console.log("Error in vars URL parameter: "+C)}null!=this.globalUrlVars&&(b=this.globalUrlVars[a])}return b};var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){v.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 d=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=
-d},d));else{var f=this.model.getCell(a[c]);null!=f&&b.push(f)}return b};Graph.prototype.getCellsForTags=function(a,b,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var f=0;f<b.length;f++)if(this.model.isVertex(b[f])||this.model.isEdge(b[f])){var h=null!=b[f].value&&"object"==typeof b[f].value?mxUtils.trim(b[f].value.getAttribute(c)||""):"",k=!0;if(0<h.length)for(var h=h.toLowerCase().split(" "),e=0;e<a.length&&k;e++)var g=mxUtils.trim(a[e]).toLowerCase(),
-k=k&&(0==g.length||0<=mxUtils.indexOf(h,g));else k=0==a.length;k&&d.push(b[f])}}return d};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,d){for(var f=0;f<
+d},d));else{var f=this.model.getCell(a[c]);null!=f&&b.push(f)}return b};Graph.prototype.getCellsForTags=function(a,b,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var f=0;f<b.length;f++)if(this.model.isVertex(b[f])||this.model.isEdge(b[f])){var h=null!=b[f].value&&"object"==typeof b[f].value?mxUtils.trim(b[f].value.getAttribute(c)||""):"",e=!0;if(0<h.length)for(var h=h.toLowerCase().split(" "),n=0;n<a.length&&e;n++)var g=mxUtils.trim(a[n]).toLowerCase(),
+e=e&&(0==g.length||0<=mxUtils.indexOf(h,g));else e=0==a.length;e&&d.push(b[f])}}return d};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,d){for(var f=0;f<
a.length;f++)this.highlightCell(a[f],b,c,d)};Graph.prototype.highlightCell=function(a,b,c,d){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,b,f,!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)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.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");f.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");f.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");f.appendChild(h);
@@ -7568,98 +7571,99 @@ mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mx
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];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.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 A=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,f,h,k,e,g,t){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return A.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){u.value=Math.max(1,
-Math.min(e,Math.max(parseInt(u.value),parseInt(m.value))));m.value=Math.max(1,Math.min(e,Math.min(parseInt(u.value),parseInt(m.value))))}function d(b){function c(b,c,f){var h=b.getGraphBounds(),k=0,e=0,g=da.get(),t=1/b.pageScale,q=n.checked;if(q)var t=parseInt(X.value),l=parseInt(W.value),t=Math.min(g.height*l/(h.height/b.view.scale),g.width*t/(h.width/b.view.scale));else t=parseInt(w.value)/(100*b.pageScale),isNaN(t)&&(d=1/b.pageScale,w.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*
-d);g.height=Math.ceil(g.height*d);t*=d;!q&&b.pageVisible?(h=b.getPageLayout(),k-=h.x*g.width,e-=h.y*g.height):q=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,g,0,k,e,q);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var m=c.writeHead;c.writeHead=function(b){m.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,d,f,h){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=u.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,f,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=q;c.appendGraph(b,t,k,e,f,!0)}return c}var d=parseInt(ba.value)/100;isNaN(d)&&(d=
-1,ba.value="100 %");var d=.75*d,h=m.value,k=u.value,e=!q.checked,t=null;e&&(e=h==g&&k==g);if(!e&&null!=a.pages&&a.pages.length){var l=0,e=a.pages.length-1;q.checked||(l=parseInt(h)-1,e=parseInt(k)-1);for(var v=l;v<=e;v++){var p=a.pages[v],h=p==a.currentPage?f:null;if(null==h){var h=a.createTemporaryGraph(f.getStylesheet()),k=!0,l=!1,x=null,A=null;null==p.viewState&&null==p.mapping&&null==p.root&&a.updatePageRoot(p);null!=p.viewState?(k=p.viewState.pageVisible,l=p.viewState.mathEnabled,x=p.viewState.background,
-A=p.viewState.backgroundImage):null!=p.mapping&&null!=p.mapping.diagramMap&&(l="0"!=p.mapping.diagramMap.get("mathEnabled"),x=p.mapping.diagramMap.get("background"),A=p.mapping.diagramMap.get("backgroundImage"),A=null!=A&&0<A.length?JSON.parse(A):null);h.background=x;h.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;h.pageVisible=k;h.mathEnabled=l;var y=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?v+1:y.apply(this,arguments)};document.body.appendChild(h.container);
-a.updatePageRoot(p);h.model.setRoot(p.root)}t=c(h,t,v!=e);h!=f&&h.container.parentNode.removeChild(h.container)}}else t=c(f);t.mathEnabled&&(e=t.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln('"HTML-CSS": {'),
-e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));
-t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}var f=a.editor.graph,h=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,b||mxResources.get("print"));h.appendChild(k);var e=1,g=1,t=document.createElement("div");t.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");t.appendChild(q);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));t.appendChild(k);mxUtils.br(t);var l=q.cloneNode(!0);q.setAttribute("checked","checked");l.setAttribute("value","range");t.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");t.appendChild(k);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";
-m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";t.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));t.appendChild(k);var u=m.cloneNode(!0);t.appendChild(u);mxEvent.addListener(m,"focus",function(){l.checked=!0});mxEvent.addListener(u,"focus",function(){l.checked=!0});mxEvent.addListener(m,"change",c);mxEvent.addListener(u,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==
-a.pages[k]){g=k+1;m.value=g;u.value=g;break}m.setAttribute("max",e);u.setAttribute("max",e);1<e&&h.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");v.appendChild(p);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));v.appendChild(k);var w=document.createElement("input");w.style.cssText=
-"margin:0 8px 0 8px;";w.setAttribute("value","100 %");w.style.width="50px";v.appendChild(w);mxEvent.addListener(w,"focus",function(){p.checked=!0});h.appendChild(v);var t=t.cloneNode(!1),n=p.cloneNode(!0);n.setAttribute("value","fit");p.setAttribute("checked","checked");k=document.createElement("div");k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(n);t.appendChild(k);v=document.createElement("table");v.style.display="inline-block";var x=document.createElement("tbody"),
-A=document.createElement("tr"),y=A.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),R=L.cloneNode(!0),O=L.cloneNode(!0),V=L.cloneNode(!0),J=L.cloneNode(!0);L.style.textAlign="right";O.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","1");X.setAttribute("min","1");X.setAttribute("type","number");X.style.width="40px";U.appendChild(X);k=document.createElement("span");mxUtils.write(k,
-mxResources.get("fitToSheetsAcross"));R.appendChild(k);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){n.checked=!0});mxEvent.addListener(W,"focus",function(){n.checked=!0});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));J.appendChild(k);A.appendChild(L);A.appendChild(U);A.appendChild(R);y.appendChild(O);y.appendChild(V);y.appendChild(J);x.appendChild(A);x.appendChild(y);v.appendChild(x);
-t.appendChild(v);h.appendChild(t);t=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));t.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(k,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));t.appendChild(k);
-var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);h.appendChild(t);k=document.createElement("div");k.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-v.className="geBtn",k.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),v.className="geBtn",k.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className="geBtn gePrimaryBtn";k.appendChild(v);a.editor.cancelFirst||k.appendChild(t);h.appendChild(k);this.container=h};var t=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+[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 B=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,f,h,e,n,g,t){if(null!=c&&null==mxMarker.markers[c]){var p=this.getPackageForType(c);null!=p&&mxStencilRegistry.getStencil(p)}return B.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){l.value=Math.max(1,
+Math.min(n,Math.max(parseInt(l.value),parseInt(k.value))));k.value=Math.max(1,Math.min(n,Math.min(parseInt(l.value),parseInt(k.value))))}function d(b){function c(b,c,f){var h=b.getGraphBounds(),e=0,n=0,g=da.get(),t=1/b.pageScale,p=w.checked;if(p)var t=parseInt(X.value),u=parseInt(W.value),t=Math.min(g.height*u/(h.height/b.view.scale),g.width*t/(h.width/b.view.scale));else t=parseInt(m.value)/(100*b.pageScale),isNaN(t)&&(d=1/b.pageScale,m.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*
+d);g.height=Math.ceil(g.height*d);t*=d;!p&&b.pageVisible?(h=b.getPageLayout(),e-=h.x*g.width,n-=h.y*g.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,g,0,e,n,p);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 l=c.renderPage;c.renderPage=
+function(a,b,c,d,f,h){var e=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var n=l.apply(this,arguments);mxClient.NO_FO=e;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}c.open(null,null,f,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=p;c.appendGraph(b,t,e,n,f,!0)}return c}var d=parseInt(ba.value)/100;isNaN(d)&&(d=
+1,ba.value="100 %");var d=.75*d,h=k.value,e=l.value,n=!p.checked,t=null;n&&(n=h==g&&e==g);if(!n&&null!=a.pages&&a.pages.length){var u=0,n=a.pages.length-1;p.checked||(u=parseInt(h)-1,n=parseInt(e)-1);for(var q=u;q<=n;q++){var v=a.pages[q],h=v==a.currentPage?f:null;if(null==h){var h=a.createTemporaryGraph(f.getStylesheet()),e=!0,u=!1,B=null,x=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(e=v.viewState.pageVisible,u=v.viewState.mathEnabled,B=v.viewState.background,
+x=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(u="0"!=v.mapping.diagramMap.get("mathEnabled"),B=v.mapping.diagramMap.get("background"),x=v.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);h.background=B;h.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;h.pageVisible=e;h.mathEnabled=u;var y=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?q+1:y.apply(this,arguments)};document.body.appendChild(h.container);
+a.updatePageRoot(v);h.model.setRoot(v.root)}t=c(h,t,q!=n);h!=f&&h.container.parentNode.removeChild(h.container)}}else t=c(f);t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln("showMathMenu: false,"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln('"HTML-CSS": {'),
+n.writeln("imageFont: null"),n.writeln("},"),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));
+t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}var f=a.editor.graph,h=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));h.appendChild(e);var n=1,g=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";
+p.setAttribute("value","all");p.setAttribute("type","radio");p.setAttribute("name","pages-printdialog");t.appendChild(p);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));t.appendChild(e);mxUtils.br(t);var u=p.cloneNode(!0);p.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");t.appendChild(e);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";t.appendChild(k);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));t.appendChild(e);var l=k.cloneNode(!0);t.appendChild(l);mxEvent.addListener(k,"focus",function(){u.checked=!0});mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(k,"change",c);mxEvent.addListener(l,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==
+a.pages[e]){g=e+1;k.value=g;l.value=g;break}k.setAttribute("max",n);l.setAttribute("max",n);1<n&&h.appendChild(t);var q=document.createElement("div");q.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");q.appendChild(v);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));q.appendChild(e);var m=document.createElement("input");m.style.cssText=
+"margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width="50px";q.appendChild(m);mxEvent.addListener(m,"focus",function(){v.checked=!0});h.appendChild(q);var t=t.cloneNode(!1),w=v.cloneNode(!0);w.setAttribute("value","fit");v.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(w);t.appendChild(e);q=document.createElement("table");q.style.display="inline-block";var B=document.createElement("tbody"),
+x=document.createElement("tr"),y=x.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),R=L.cloneNode(!0),O=L.cloneNode(!0),V=L.cloneNode(!0),J=L.cloneNode(!0);L.style.textAlign="right";O.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","1");X.setAttribute("min","1");X.setAttribute("type","number");X.style.width="40px";U.appendChild(X);e=document.createElement("span");mxUtils.write(e,
+mxResources.get("fitToSheetsAcross"));R.appendChild(e);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){w.checked=!0});mxEvent.addListener(W,"focus",function(){w.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));J.appendChild(e);x.appendChild(L);x.appendChild(U);x.appendChild(R);y.appendChild(O);y.appendChild(V);y.appendChild(J);B.appendChild(x);B.appendChild(y);q.appendChild(B);
+t.appendChild(q);h.appendChild(t);t=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));t.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));t.appendChild(e);
+var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);h.appendChild(t);e=document.createElement("div");e.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);a.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+q.className="geBtn",e.appendChild(q));PrintDialog.previewEnabled&&(q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),q.className="geBtn",e.appendChild(q));q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});q.className="geBtn gePrimaryBtn";e.appendChild(q);a.editor.cancelFirst||e.appendChild(t);h.appendChild(e);this.container=h};var t=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)):(t.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,c,d,e,g,l,m,n,f,h){n=null!=n?n:!0;var k=document.createElement("div");k.style.textAlign="center";if(null!=b){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";mxUtils.write(q,b);k.appendChild(q)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=c;k.appendChild(b);c=document.createElement("div");
-c.style.marginTop="16px";c.style.textAlign="center";null!=g&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),b.className="geBtn",c.appendChild(b),c.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=h&&h()}),f.className="geBtn",c.appendChild(f));var u=mxUtils.button(d,function(){n&&a.hideDialog();null!=e&&e()});u.className="geBtn";c.appendChild(u);null!=l&&(d=mxUtils.button(l,function(){n&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",
-c.appendChild(d));this.init=function(){u.focus()};k.appendChild(c);this.container=k};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,d){d.ui=a.ui;return c};a.afterDecode=function(a,c,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="9.3.1";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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";
+var ErrorDialog=function(a,b,c,d,e,g,k,l,m,f,h){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var u=document.createElement("div");u.style.padding="0px";u.style.margin="0px";u.style.fontSize="18px";u.style.paddingBottom="16px";u.style.marginBottom="16px";u.style.borderBottom="1px solid #c0c0c0";u.style.color="gray";mxUtils.write(u,b);n.appendChild(u)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=c;n.appendChild(b);c=document.createElement("div");
+c.style.marginTop="16px";c.style.textAlign="center";null!=g&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),b.className="geBtn",c.appendChild(b),c.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=h&&h()}),f.className="geBtn",c.appendChild(f));var p=mxUtils.button(d,function(){m&&a.hideDialog();null!=e&&e()});p.className="geBtn";c.appendChild(p);null!=k&&(d=mxUtils.button(k,function(){m&&a.hideDialog();null!=l&&l()}),d.className="geBtn gePrimaryBtn",
+c.appendChild(d));this.init=function(){p.focus()};n.appendChild(c);this.container=n};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,d){d.ui=a.ui;return c};a.afterDecode=function(a,c,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="9.3.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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.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(u){}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(p){}};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(u){}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(u){}})();
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;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"),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(q){}};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(p){}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(p){}})();
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 d=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}),f=d.spin;d.spin=function(c,h){var k=!1;this.active||(f.call(this,c),this.active=!0,null!=h&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight=
-"10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),k.innerHTML=h+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,
-b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,h)}));this.stop();return a}),k=!0);return k};var h=d.stop;d.stop=function(){h.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=h;h+=b;return a.substring(c,h)}function f(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var k=d(a,4);if(null!=b&&b(h-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};
+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}),f=d.spin;d.spin=function(c,h){var e=!1;this.active||(f.call(this,c),this.active=!0,null!=h&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight=
+"10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=h+"...",c.appendChild(e),d.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,
+b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,h)}));this.stop();return a}),e=!0);return e};var h=d.stop;d.stop=function(){h.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=h;h+=b;return a.substring(c,h)}function f(a){a=d(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var e=d(a,4);if(null!=b&&b(h-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}return!1};
var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var f=b.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=b.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),g=this.editor.extractGraphModel(e.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=
g?mxUtils.getXml(g):""}catch(v){}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))}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,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 e=this.updatePageRoot(new DiagramPage(d[f]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,e,0==f?e: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(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,l,m,n,t){b=null!=
-b?b:this.editor.graph;e=null!=e?e:!1;n=null!=n?n:!0;var f,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":h=f=d;if(null==a)return"";var k=a;if("mxfile"!=k.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),k=b.compress(q);if(b.decompress(k)!=q)return q;q=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,k);k=a.ownerDocument.createElement("mxfile");k.appendChild(q)}t?(k=k.cloneNode(!0),k.removeAttribute("userAgent"),k.removeAttribute("version"),
-k.removeAttribute("editor"),k.removeAttribute("type")):(k.setAttribute("userAgent",navigator.userAgent),k.setAttribute("version",EditorUi.VERSION),k.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&k.setAttribute("type",a));a=mxUtils.getXml(k);if(!g&&!e&&(l||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(k),b,null!=c?c.getTitle():null,f,h);else if(g||!e&&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,n,h);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){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var h=this.pages[f].mapping;
-this.currentPage!=this.pages[f]&&null!=h&&h.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(h.graphModel),h.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),h.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,l,m,n){e=null!=e?e:!0;l=null!=l?l:this.getXmlFileData(e,null!=g?g:!1);n=null!=n?n:this.getCurrentFile();g=this.editor.graph;
-if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}a=this.createFileData(l,g,n,window.location.href,a,b,c,d,e,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};
-EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(f.x/k-b.view.translate.x);k=Math.floor(f.y/k-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(h="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",k)}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!=e&&(e=e.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==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
+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(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,l,m,t){b=null!=
+b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var f,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":h=f=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(p);if(b.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n);n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}t?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),
+n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,f,h);else if(g||!e&&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,l,m,h);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++){var f=
+this.pages[d].mapping;if(this.currentPage!=this.pages[d]&&null!=f&&f.needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel);f.writeRealtimeToNode(e);mxUtils.setTextContent(this.pages[d].node,this.editor.graph.compressNode(e));f.needsUpdate=!1}c.appendChild(this.pages[d].node)}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,k,l,m){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1);m=null!=m?m:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&
+this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}a=this.createFileData(k,g,m,window.location.href,a,b,c,d,e,l);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=
+function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;g=Math.floor(f.x/n-b.view.translate.x);n=Math.floor(f.y/n-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(h="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);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!=e&&(e=e.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==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\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==e?'<script type="text/javascript" src="'+h+'">\x3c/script>':
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" 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,c,d,e){null!=e&&(e=e.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==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\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==e?'<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="'+e+'" 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;var b=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};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,e,g,l){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),
-h=f+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(h,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(h,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?h=f+".png":"jpeg"==a&&(h=f+".jpg"),this.saveRequest(h,a,mxUtils.bind(this,function(b,c){try{var f=
-this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var h=this.createDownloadRequest(b,a,d,c,l);this.editor.graph.pageVisible=f;return h}catch(B){this.handleError(B)}}));else{var m=null,q=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var v=this.editor.graph.background;if(l||v==
-mxConstants.NONE)v=null;var u=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();q('<?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 h=f+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();q(a)}),d)}}catch(F){this.handleError(F)}};
-EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var h="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){h="&from="+k;break}k=this.editor.graph.background;"png"==b&&e&&(k=mxConstants.NONE);
-return new mxXmlRequest(EXPORT_URL,"format="+b+h+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&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,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,
-null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var h=null!=a.interval?parseInt(a.interval):6E4,k=null,e=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()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(e,h)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();e()}));g();e()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var h=a.url;/^https?:\/\//.test(h)&&
-!this.isCorsEnabledForUrl(h)&&(h=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(h,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){editorUi.alert(a.tooltip)});return b}var c=null;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,
-null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,f=d.getModel();f.beginUpdate();var e=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var g=f.getCell(a.getAttribute("id"));if(null!=g){try{var l=a.getAttribute("value");if(null!=l){var m=mxUtils.parseXml(l).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))f.setValue(g,m);else for(var t=m.attributes,n=0;n<t.length;n++)d.setAttributeForCell(g,t[n].nodeName,0<t[n].nodeValue.length?t[n].nodeValue:null)}}catch(B){null!=
-window.console&&console.log("Error in value for "+g.id+": "+B)}try{var x=a.getAttribute("style");null!=x&&d.model.setStyle(g,x)}catch(B){null!=window.console&&console.log("Error in style for "+g.id+": "+B)}try{var C=a.getAttribute("icon");if(null!=C){var z=0<C.length?JSON.parse(C):null;null!=z&&z.append||d.removeCellOverlays(g);null!=z&&d.addCellOverlay(g,b(z))}}catch(B){null!=window.console&&console.log("Error in icon for "+g.id+": "+B)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),
-E=d.getCellGeometry(g);if(null!=E){E=E.clone();for(key in F){var G=parseFloat(F[key]);"dx"==key?E.x+=G:"dy"==key?E.y+=G:"dw"==key?E.width+=G:"dh"==key?E.height+=G:E[key]=parseFloat(F[key])}d.model.setGeometry(g,E)}}}catch(B){null!=window.console&&console.log("Error in icon for "+g.id+": "+B)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
-(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(e=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=e&&this.chromelessResize&&this.chromelessResize(!0,e)}return c};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);
-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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});
-if(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(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){null!=window.console&&console.log("error in fileLoaded:",a,u);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!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(p){}this.handleError(u,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?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};
-EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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(k){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,g,l){};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 b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);
-return mxUtils.getXml(b)};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 b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;
-if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());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 f=null,h=mxUtils.bind(this,function(b,c){0==b.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"))),c.appendChild(f)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var e=0;e<b.length;e++)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[e]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){h(b,a)}));this.repositionLibrary(d);
-var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");g.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",
-mxResources.get("close"));l.setAttribute("valign","absmiddle");l.setAttribute("border","0");l.style.margin="0 3px";var m=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=
-this.editor.graph,z=null,F=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!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=l.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",t.insertBefore(z,t.firstChild),g.style.paddingRight=18*t.childNodes.length+
-"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),g.style.paddingRight=18*t.childNodes.length+"px")})):null==m&&(m=l.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),t.insertBefore(m,t.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||
-(g.style.paddingRight=18*t.childNodes.length+"px",m.parentNode.removeChild(m),m=null)});mxEvent.consume(c)})),g.style.paddingRight=18*t.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,h){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var e=0;e<a.length;e++){var g=n.getCellGeometry(a[e]);null!=g&&g.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,h||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=h&&(a.title=h);b.push(a);E(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),c=n.view.getBounds(b),d=n.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=n.view.translate.x;
-c.y-=n.view.translate.y;G(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.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",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),
-null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&
-null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.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,e,g,t,l,m,q,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,t,l),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,t,l),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var e=mxUtils.parseXml(c);if("mxlibrary"==e.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(e.documentElement));h(g,k);b=b.concat(g);E(a);
-this.spinner.stop();v=!0}catch(X){}else if("mxfile"==e.documentElement.nodeName)try{for(var t=e.documentElement.getElementsByTagName("diagram"),e=0;e<t.length;e++){var g=mxUtils.getTextContent(t[e]),l=this.stringToCells(this.editor.graph.decompress(g)),m=this.editor.graph.getBoundingBoxFromGeometry(l);G(l,new mxRectangle(0,0,m.width,m.height),a)}v=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}}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!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?this.importVisio(n,function(a){u(a,"text/xml")},null,m):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,m)&&null!=n?this.parseFile(n,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(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()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));t.insertBefore(l,t.firstChild);mxEvent.addListener(l,"click",F);mxEvent.addListener(k,
-"dblclick",function(a){mxEvent.getSource(a)==k&&F(a)});c=l.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.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)})),t.insertBefore(c,t.firstChild))}g.appendChild(t);g.style.paddingRight=18*t.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+
+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,e,g,k){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),
+h=f+"."+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,e));this.saveData(h,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(h,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?h=f+".png":"jpeg"==a&&(h=f+".jpg"),this.saveRequest(h,a,mxUtils.bind(this,function(b,c){try{var f=
+this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var e=this.createDownloadRequest(b,a,d,c,k);this.editor.graph.pageVisible=f;return e}catch(A){this.handleError(A)}}));else{var l=null,p=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(h,"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 u=this.editor.graph.background;if(k||u==
+mxConstants.NONE)u=null;var v=this.editor.graph.getSvg(u,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();p('<?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 h=f+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),d)}}catch(F){this.handleError(F)}};
+EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var h="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(var n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){h="&from="+n;break}n=this.editor.graph.background;"png"==b&&e&&(n=mxConstants.NONE);
+return new mxXmlRequest(EXPORT_URL,"format="+b+h+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&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,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,
+null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,h=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()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(h);h=window.setTimeout(n,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();n()}));g();n()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
+!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){editorUi.alert(a.tooltip)});return b}var c=null;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,
+null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,f=d.getModel();f.beginUpdate();var e=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var g=f.getCell(a.getAttribute("id"));if(null!=g){try{var k=a.getAttribute("value");if(null!=k){var l=mxUtils.parseXml(k).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))f.setValue(g,l);else for(var t=l.attributes,m=0;m<t.length;m++)d.setAttributeForCell(g,t[m].nodeName,0<t[m].nodeValue.length?t[m].nodeValue:null)}}catch(A){null!=
+window.console&&console.log("Error in value for "+g.id+": "+A)}try{var x=a.getAttribute("style");null!=x&&d.model.setStyle(g,x)}catch(A){null!=window.console&&console.log("Error in style for "+g.id+": "+A)}try{var C=a.getAttribute("icon");if(null!=C){var z=0<C.length?JSON.parse(C):null;null!=z&&z.append||d.removeCellOverlays(g);null!=z&&d.addCellOverlay(g,b(z))}}catch(A){null!=window.console&&console.log("Error in icon for "+g.id+": "+A)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),
+E=d.getCellGeometry(g);if(null!=E){E=E.clone();for(key in F){var G=parseFloat(F[key]);"dx"==key?E.x+=G:"dy"==key?E.y+=G:"dw"==key?E.width+=G:"dh"==key?E.height+=G:E[key]=parseFloat(F[key])}d.model.setGeometry(g,E)}}}catch(A){null!=window.console&&console.log("Error in icon for "+g.id+": "+A)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(e=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=e&&this.chromelessResize&&this.chromelessResize(!0,e)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
+d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),h=e.getMonth()+1,g=e.getDate(),k=e.getHours(),t=e.getMinutes(),e=e.getSeconds(),c=c+("-"+(f+"-"+h+"-"+g+"-"+k+"-"+t+"-"+e));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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){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(q){}this.handleError(p,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?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,g,k){};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 b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};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 b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=
+null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());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 f=null,e=mxUtils.bind(this,function(b,c){0==b.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"))),c.appendChild(f)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var h=0;h<b.length;h++)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[h]);c=null!=c&&0<c.length?c:a.getTitle();var n=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var g=n.parentNode.previousSibling;c=g.getAttribute("title");null!=
+c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");g.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");
+k.setAttribute("border","0");k.style.margin="0 3px";var l=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,z=null,F=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
+n,b,a,a.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=k.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",t.insertBefore(z,t.firstChild),g.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=
+z.parentNode&&(z.parentNode.removeChild(z),g.style.paddingRight=18*t.childNodes.length+"px")})):null==l&&(l=k.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),t.insertBefore(l,t.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(g.style.paddingRight=18*t.childNodes.length+"px",l.parentNode.removeChild(l),
+l=null)});mxEvent.consume(c)})),g.style.paddingRight=18*t.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var h=0;h<a.length;h++){var g=m.getCellGeometry(a[h]);null!=g&&g.translate(-c.x,-c.y)}n.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);
+E(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;G(b,c)}mxEvent.consume(a)});
+n.style.border="3px solid transparent";mxEvent.addGestureListeners(n,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)",n.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(n.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),n.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility=
+"visible",n.style.border="3px solid transparent",n.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(a){null!=f?f.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!=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,g,t,k,l,m,u){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,t,k),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,t,k),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var p=!1,v=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(h.documentElement));e(g,n);b=b.concat(g);E(a);this.spinner.stop();
+p=!0}catch(X){}else if("mxfile"==h.documentElement.nodeName)try{for(var t=h.documentElement.getElementsByTagName("diagram"),h=0;h<t.length;h++){var g=mxUtils.getTextContent(t[h]),k=this.stringToCells(this.editor.graph.decompress(g)),l=this.editor.graph.getBoundingBoxFromGeometry(k);G(k,new mxRectangle(0,0,l.width,l.height),a)}p=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&
+null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(u,function(a){v(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=u?this.parseFile(u,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!=f?f.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",n.style.cursor="");a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",Editor.editImage);k.setAttribute("title",mxResources.get("edit"));t.insertBefore(k,t.firstChild);mxEvent.addListener(k,"click",F);mxEvent.addListener(n,
+"dblclick",function(a){mxEvent.getSource(a)==n&&F(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.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)})),t.insertBefore(c,t.firstChild))}g.appendChild(t);g.style.paddingRight=18*t.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(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};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=
760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});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=
@@ -7670,142 +7674,142 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);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.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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){var d=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 e=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),h=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
-else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" 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,e,c,h)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,g,l,m,n,t,w,x){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,l,x,m,n);this.showDialog(a.container,t||340,w||150,!0,!1);a.init()};EditorUi.prototype.alert=
+else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var n=window.location.hash;null!=n&&"#G"==n.substring(0,2)&&(n=n.substring(2),a+=' <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,e,c,h)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,g,k,l,m,t,w,x){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,g,k,x,l,m);this.showDialog(a.container,t||340,w||150,!0,!1);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,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,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.doSaveLocalFile=function(a,b,c,d,e){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 if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
-"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a"),h=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),h=65==(k?parseInt(k[2],10):!1)?!1:h;if(h||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));h?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);
-try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(A){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
-b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),h=0;h<f;++h){for(var g=1024*h,l=Math.min(g+1024,d),t=Array(l-g),m=0;g<l;++m,++g)t[m]=c[g].charCodeAt(0);e[h]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||
+"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a"),h=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),h=65==(g?parseInt(g[2],10):!1)?!1:h;if(h||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));h?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);
+try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(B){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
+b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),h=0;h<f;++h){for(var g=1024*h,k=Math.min(g+1024,d),t=Array(k-g),l=0;g<k;++l,++g)t[l]=c[g].charCodeAt(0);e[h]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||
"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write(mxUtils.htmlEntities(a,!1)),e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(x){this.handleError(x)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
-mxResources.get("download"),!1,g,l,null,1<e,4<e&&(!g||6>e)?3:4,a,c,d);this.showDialog(b.container,420,e==(mxClient.IS_IOS?0:1)?160:4<e?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))+
+mxResources.get("download"),!1,g,k,null,1<e,4<e&&(!g||6>e)?3:4,a,c,d);this.showDialog(b.container,420,e==(mxClient.IS_IOS?0:1)?160:4<e?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 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 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,
-c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=e&&(f==
-App.MODE_DEVICE||"download"==f||"_blank"==f?e.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,f,c)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,f,c)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,f==(mxClient.IS_IOS?0:1)?160:4<f?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,
-b,c,d,e,g,l,m,n,t){if(this.spinner.spin(document.body,mxResources.get("export"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var h=this.editor.graph.getSvg(f,a,l,m,null,c,null,null,"blank"==t?"_blank":"self"==t?"_top":null);d&&this.editor.graph.addSvgShadow(h);var k=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,
-null,null,null,c,n));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(k,"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,h,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,q,this.thumbImageCache)):q(h)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",
+c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var f=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=f&&(e==
+App.MODE_DEVICE||"download"==e||"_blank"==e?f.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(C){this.handleError(C)}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,g,!0,e,c)}catch(C){this.handleError(C)}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<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,f==(mxClient.IS_IOS?0:1)?160:4<f?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,
+b,c,d,e,g,k,l,m,t){if(this.spinner.spin(document.body,mxResources.get("export"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var h=this.editor.graph.getSvg(f,a,k,l,null,c,null,null,"blank"==t?"_blank":"self"==t?"_top":null);d&&this.editor.graph.addSvgShadow(h);var n=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,
+null,null,null,c,m));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,h,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,u,this.thumbImageCache)):u(h)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",
"checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),e||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=f.getAttribute("disabled")&&(f.checked=!f.checked,mxEvent.consume(a))})));return f};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft=
-"24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+
-"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));
-mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}
+"24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=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,e,mxResources.get("ok"),function(a){null!=a?e=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":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}
mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value",
"self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=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 e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,l,m){var f=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+a),null!=
-b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&h.push("edit="+encodeURIComponent(e)),g&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));c&&(a=this.getSelectedPageIndex(),0<a&&h.push("page="+a));a=!0;null!=l?c="#U"+encodeURIComponent(l):(f=this.getCurrentFile(),m||null==f||f.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="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<h.length?"?"+h.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,l,m,n,t,w){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);
-n||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];l&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=t&&0<t.length&&(f.edit=t);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":
+"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 e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,k,l){var f=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+a),null!=
+b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&h.push("edit="+encodeURIComponent(e)),g&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));c&&(a=this.getSelectedPageIndex(),0<a&&h.push("page="+a));a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),l||null==f||f.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="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<h.length?"?"+h.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,l,m,t,w){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);
+m||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);l&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),f.toolbar=c.join(" "));null!=t&&0<t.length&&(f.edit=t);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":
"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";w(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 f=document.createElement("div");
f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name",
-"type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");h.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var t=this.getCurrentFile();null==c&&null!=t&&t.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(t.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(h);var l=this.addLinkSection(f),m=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";
-n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";f.appendChild(n);var q=this.addCheckbox(f,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(f,mxResources.get("allPages"),h,!h),E=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,G),B=I.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?B.removeAttribute("disabled"):
-B.setAttribute("disabled","disabled");B.checked&&G.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,m.checked,n.value,l.getTarget(),l.getColor(),q.checked,F.checked,E.checked,G.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
-"nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var k=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));t.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));l.style.marginTop="12px";l.className="geBtn";t.appendChild(l);f.appendChild(t);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));
-t.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,n=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,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%",f.appendChild(m),mxUtils.write(f,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",f.appendChild(n),mxUtils.br(f);var q=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var p=null;
-if(null==k||k.constructor!=window.DriveFile||b)p=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var u=this.addCheckbox(f,mxResources.get("lightbox"),!0),G=this.addEditButton(f,u),I=G.getEditInput(),B=this.addCheckbox(f,mxResources.get("layers"),!0);B.style.marginLeft=I.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(B.removeAttribute("disabled"),I.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),I.setAttribute("disabled",
-"disabled"));I.checked&&u.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(q.getTarget(),q.getColor(),null==p?!0:p.checked,u.checked,G.getLink(),B.checked,null!=m?m.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),h);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)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(e);var h=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
-!0),e=this.editor.graph,k=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){c(!h.checked,null!=g?g.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,l,m){l=null!=l?l:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=
-this.editor.graph,k="jpeg"==m?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(n);mxUtils.write(f,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,mxResources.get("borderWidth")+":");
-var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";f.appendChild(v);mxUtils.br(f);var p=this.addCheckbox(f,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=m),u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,h.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");g&&(f.appendChild(y),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),k+=26,mxEvent.addListener(u,"change",function(){u.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var I=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible),B=document.createElement("input");B.style.marginTop=
-"16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");b&&(f.appendChild(B),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),k+=26);var D=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=m),H=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=m);M.style.marginLeft="24px";M.style.marginBottom="16px";H||(M.style.display=
-"none");mxEvent.addListener(D,"change",function(){D.checked&&H?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});l&&H||M.setAttribute("disabled","disabled");var K=document.createElement("select");K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginRight="10px";K.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");
-mxUtils.write(a,mxResources.get("openInNewWindow"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));K.appendChild(a);"svg"==m&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(K),mxUtils.br(f),mxUtils.br(f),k+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;e(q.value,p.checked,!u.checked,I.checked,D.checked,B.checked,v.value,y.checked,
-!M.checked,K.value)}),null,c,d);this.showDialog(c.container,340,k,!0,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),l=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),!0),q=this.addEditButton(f,n),u=q.getEditInput(),F=1<h.model.getChildCount(h.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),F,!F);E.style.marginLeft=u.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?
-(F&&E.removeAttribute("disabled"),u.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(k.checked,l.checked,m.checked,n.checked,q.getLink(),E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(a,b,c,d,e,g,l,m){function f(b){var f=" ",k="";d&&(f=" 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"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;");
-a&&(k+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');l('<img src="'+b+'"'+m+(""!=k?' style="'+k+'"':"")+f+"/>")}var h=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");f(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),
-h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var k="";c&&(k="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+k+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?f("data:image/png;base64,"+n.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
-b,c,d,e,g,l){var f=this.editor.graph.getSvg(),h=f.getElementsByTagName("a");if(null!=h)for(var k=0;k<h.length;k++){var m=h[k].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==h[k].getAttribute("target")&&h[k].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var n=" ",q="";d&&(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"+
-(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(f.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"+
-(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=q&&f.setAttribute("style",q),l(mxUtils.getXml(f))};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+
+"type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");h.appendChild(e);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(n);mxUtils.br(h);h.appendChild(g);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));h.appendChild(n);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),h.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(h);var k=this.addLinkSection(f),l=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";
+m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value="100%";f.appendChild(m);var u=this.addCheckbox(f,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(f,mxResources.get("allPages"),h,!h),E=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,G),A=I.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?A.removeAttribute("disabled"):
+A.setAttribute("disabled","disabled");A.checked&&G.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,l.checked,m.value,k.getTarget(),k.getColor(),u.checked,F.checked,E.checked,G.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
+"nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var n=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",t=document.createElement("div");t.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"));t.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));k.style.marginTop="12px";k.className="geBtn";t.appendChild(k);f.appendChild(t);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"));
+t.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 l=null,m=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),l=document.createElement("input"),
+l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",f.appendChild(l),mxUtils.write(f,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",f.appendChild(m),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var p=null;
+if(null==n||n.constructor!=window.DriveFile||b)p=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var q=this.addCheckbox(f,mxResources.get("lightbox"),!0),G=this.addEditButton(f,q),I=G.getEditInput(),A=this.addCheckbox(f,mxResources.get("layers"),!0);A.style.marginLeft=I.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(A.removeAttribute("disabled"),I.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),I.setAttribute("disabled",
+"disabled"));I.checked&&q.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==p?!0:p.checked,q.checked,G.getLink(),A.checked,null!=l?l.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),h);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
+document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(e);var h=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
+!0),e=this.editor.graph,n=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){c(!h.checked,null!=g?g.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,e,g,k,l){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=
+this.editor.graph,n="jpeg"==l?196:300,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(m);mxUtils.write(f,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%";f.appendChild(u);mxUtils.write(f,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";f.appendChild(p);mxUtils.br(f);var q=this.addCheckbox(f,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=l),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,h.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");g&&(f.appendChild(y),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),n+=26,mxEvent.addListener(v,"change",function(){v.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var I=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible),A=document.createElement("input");A.style.marginTop=
+"16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||A.setAttribute("disabled","disabled");b&&(f.appendChild(A),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),n+=26);var D=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),H=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=l);M.style.marginLeft="24px";M.style.marginBottom="16px";H||(M.style.display=
+"none");mxEvent.addListener(D,"change",function(){D.checked&&H?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});k&&H||M.setAttribute("disabled","disabled");var K=document.createElement("select");K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginRight="10px";K.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");
+mxUtils.write(a,mxResources.get("openInNewWindow"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));K.appendChild(a);"svg"==l&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(K),mxUtils.br(f),mxUtils.br(f),n+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=u.value;e(u.value,q.checked,!v.checked,I.checked,D.checked,A.checked,p.value,y.checked,
+!M.checked,K.value)}),null,c,d);this.showDialog(c.container,340,n,!0,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+f.appendChild(g)}var n=this.addCheckbox(f,mxResources.get("fit"),!0),k=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible&&d,!d),l=this.addCheckbox(f,c),m=this.addCheckbox(f,mxResources.get("lightbox"),!0),u=this.addEditButton(f,m),p=u.getEditInput(),F=1<h.model.getChildCount(h.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),F,!F);E.style.marginLeft=p.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?
+(F&&E.removeAttribute("disabled"),p.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"));p.checked&&m.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(n.checked,k.checked,l.checked,m.checked,u.getLink(),E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(a,b,c,d,e,g,k,l){function f(b){var f=" ",n="";d&&(f=" 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"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");
+a&&(n+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+t+(""!=n?' style="'+n+'"':"")+f+"/>")}var h=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");f(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),
+h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?f("data:image/png;base64,"+m.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
+b,c,d,e,g,k){var f=this.editor.graph.getSvg(),h=f.getElementsByTagName("a");if(null!=h)for(var n=0;n<h.length;n++){var l=h[n].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==h[n].getAttribute("target")&&h[n].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var m=" ",u="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");a&&(u+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=u?' style="'+u+'"':"")+m+"/>")}))}else u="",d&&(f.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"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+a+" "+b),u+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=u&&f.setAttribute("style",u),k(mxUtils.getXml(f))};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],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(p){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,f=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),f=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(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,f=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),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),
e=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=
-b&&b(t)}}),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,e,g,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((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,e,g,l,m,n){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,n)}catch(x){"Invalid image"==x.message?this.downloadFile(n):this.handleError(x)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,l)}catch(w){this.spinner.stop(),this.handleError(w)}}};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,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],h=1;h<c.length;h++){var g=c[h].indexOf(")");e.push('url("');e.push(f[b(c[h].substring(0,g))]);e.push('"'+c[h].substring(g))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),m=null,t=c[g].indexOf("format(",l);0<t&&(m=b(c[g].substring(t+7,c[g].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==
-f[a]){f[a]=a;d++;var b="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.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){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,l)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,l,m,n,t,w,x,C,z){g=null!=g?g:!0;x=null!=x?x:this.editor.graph;C=null!=C?C:0;var f=n?null:x.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==n&&
-(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(f,null,null,z,null,null!=l?l:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var h=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*l),b/k)):b/k);k=Math.ceil(m*k)+2*C;l=Math.ceil(m*l)+2*C;h.setAttribute("width",k);h.setAttribute("height",l);var t=h.getContext("2d");null!=
-f&&(t.beginPath(),t.rect(0,0,k,l),t.fillStyle=f,t.fill());t.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(d,C/m,C/m);a(h)},0):(t.drawImage(d,C/m,C/m),a(h))}catch(K){null!=e&&e(K)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);var h=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(x,
-c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(B){null!=e&&e(B)}}),c,w)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||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 f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c),k=0;k<h.length;k++)mxUtils.bind(this,function(c){var h=d.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var k=e[h];null==k?(f++,this.convertImageToDataUri(h,function(d){null!=d&&(e[h]=d,c.setAttribute(g,
-d));f--;0==f&&b(a)})):c.setAttribute(g,k)}else null!=h&&c.setAttribute(g,h)})(h[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g){try{var f=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var h=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(f){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(A){null!=c&&c(A)}};EditorUi.prototype.isCorsEnabledForUrl=
+b&&b(t)}}),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,e,g,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((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,e,g,k,l,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,m)}catch(x){"Invalid image"==x.message?this.downloadFile(m):this.handleError(x)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k)}catch(w){this.spinner.stop(),this.handleError(w)}}};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,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],g=1;g<c.length;g++){var h=c[g].indexOf(")");e.push('url("');e.push(f[b(c[g].substring(0,h))]);e.push('"'+c[g].substring(h))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var k=c[g].indexOf(")"),l=null,t=c[g].indexOf("format(",k);0<t&&(l=b(c[g].substring(t+7,c[g].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==
+f[a]){f[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.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){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,l,m,t,w,x,C,z){g=null!=g?g:!0;x=null!=x?x:this.editor.graph;C=null!=C?C:0;var f=m?null:x.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==m&&
+(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(f,null,null,z,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var h=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*k),b/n)):b/n);n=Math.ceil(l*n)+2*C;k=Math.ceil(l*k)+2*C;h.setAttribute("width",n);h.setAttribute("height",k);var t=h.getContext("2d");null!=
+f&&(t.beginPath(),t.rect(0,0,n,k),t.fillStyle=f,t.fill());t.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(d,C/l,C/l);a(h)},0):(t.drawImage(d,C/l,C/l),a(h))}catch(K){null!=e&&e(K)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);var h=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(x,
+c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(A){null!=e&&e(A)}}),c,w)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||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 e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c),n=0;n<h.length;n++)mxUtils.bind(this,function(c){var h=d.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var n=f[h];null==n?(e++,this.convertImageToDataUri(h,function(d){null!=d&&(f[h]=d,c.setAttribute(g,
+d));e--;0==e&&b(a)})):c.setAttribute(g,n)}else null!=h&&c.setAttribute(g,h)})(h[n])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g){try{var f=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var h=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(f){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(B){null!=c&&c(B)}};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"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
-function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),k=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var l=k.getElementsByTagName("diagram");if(1==l.length)k=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){g.model.beginUpdate();try{for(a=0;a<l.length;a++){l[a].removeAttribute("id");var m=this.updatePageRoot(new DiagramPage(l[a])),
-n=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[n+1]));g.model.execute(new ChangePage(this,m,m,n))}}finally{g.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}}catch(C){throw e||this.handleError(C,mxResources.get("invalidOrMissingFile")),C;}return f};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 f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var f=new FormData;f.append("file1",a,d);var e=new XMLHttpRequest;e.open("POST",VSD_CONVERT_URL);e.responseType="blob";e.onreadystatechange=mxUtils.bind(this,function(){if(4==e.readyState)if(200<=e.status&&299>=e.status)try{e.response.name=d,this.doImportVisio(e.response,b,c)}catch(y){c(y)}else c({})});
-e.send(f)}else try{this.doImportVisio(a,b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});"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,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,g,l){g=null!=g?g:!0;l=null!=l?l:!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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),k=this.importXml(h,b,c,g,!0);if(0<k.length)return k}if("data:image/svg+xml;"==a.substring(0,
-19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+1)),k=this.importXml(h,b,c,g,!0),0<k.length)return k}catch(w){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),g=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),
-null,a,f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,g);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,g))}),mxUtils.bind(this,function(a){this.handleError(a)}));
-else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),e.value=a,f.updateCellSize(e),/\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(e.value)&&
+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"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
+function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),n=this.editor.extractGraphModel(h.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(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 l=this.updatePageRoot(new DiagramPage(k[a])),
+m=this.pages.length;null==l.getName()&&(l.setName(mxResources.get("pageWithNumber",[m+1])),l.needsUpdate=!0);g.model.execute(new ChangePage(this,l,l,m))}}finally{g.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(f=g.importGraphModel(n,b,c,d))}}catch(C){throw e||this.handleError(C,mxResources.get("invalidOrMissingFile")),C;}return f};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 e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.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(e)}else try{this.doImportVisio(a,b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});"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(p){c(p)}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,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,g,k){g=null!=g?g:!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()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),n=this.importXml(h,b,
+c,g,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+1)),n=this.importXml(h,b,c,g,!0),0<n.length)return n}catch(w){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,
+null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),g=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,a,f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,g);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,g))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),e.value=a,f.updateCellSize(e),/\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(e.value)&&
f.setLinkForCell(e,e.value),e.geometry.width+=f.gridSize,e.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[e]}}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 f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,e,g,l,m,n,t,w){t=null!=t?t:!0;var f=!1,h=null,k=mxUtils.bind(this,function(a){var b=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,c,d,t);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,t),n=!0)),n||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,t);null!=m&&m(a)})):null!=n&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(f=!0,this.importVisio(n,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(f=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=
-a.status&&299>=a.status?k(a.responseText):null!=m&&m(null))}),l)):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(h=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));f||null==m||m(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);
-b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
-3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,l,m,n,t,w,x){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var f=null!=b&&null!=c,h=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=w||this.resampleThreshold,v=0;v<a.length;v++)if("image/"==a[v].type.substring(0,
-6)&&a[v].size>q){k=!0;break}var p=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,h,k,l){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,e,g,h,k,l,f,x)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,v=q,p=[],u=mxUtils.bind(this,function(a,
-b){p[a]=b;if(0==--v){this.spinner.stop();if(null!=m)m(p);else{var c=[];k.getModel().beginUpdate();try{for(var d=0;d<p.length;d++){var f=p[d]();null!=f&&(c=c.concat(f))}}finally{k.getModel().endUpdate()}}g(c)}}),A=0;A<q;A++)mxUtils.bind(this,function(f){var g=a[f],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var m=a.target.result,q=m.indexOf(","),v=decodeURIComponent(escape(atob(m.substring(q+1)))),
-p=mxUtils.parseXml(v),v=p.getElementsByTagName("svg");if(0<v.length){var v=v[0],B=x?null:v.getAttribute("content");null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?u(f,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=p){var a=p.getElementsByTagName("svg");if(0<a.length){var h=a[0],l=parseFloat(h.getAttribute("width")),
-t=parseFloat(h.getAttribute("height")),v=h.getAttribute("viewBox");if(null==v||0==v.length)h.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var w=v.split(" ");3<w.length&&(l=parseFloat(w[2]),t=parseFloat(w[3]))}m=this.createSvgDataUri(mxUtils.getXml(h));var u=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,t)),x=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(l*u)),Math.max(1,Math.round(t*u)),g.name);if(isNaN(l)||isNaN(t)){var B=new Image;B.onload=mxUtils.bind(this,function(){l=
-Math.max(1,B.width);t=Math.max(1,B.height);x[0].geometry.width=l;x[0].geometry.height=t;h.setAttribute("viewBox","0 0 "+l+" "+t);m=this.createSvgDataUri(mxUtils.getXml(h));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));k.setCellStyles("image",m,[x[0]])});B.src=this.createSvgDataUri(mxUtils.getXml(h))}return x}}}catch(fa){}return null})):u(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else u(f,mxUtils.bind(this,function(){return null}))}else{v=
-!1;if("image/png"==g.type){var A=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=new Image;y.src=a.target.result;u(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*n,c+f*n,y.width,y.height,g.name)}));v=!0}}v||(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,l,m){u(f,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var q=h&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(d/l,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(l*q),Math.round(m*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,
-g.type,b+f*n,c+f*n,240,160,g.name,function(a){u(f,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){u(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)})(A)});k?this.confirmImageResize(function(a){h=a;p()},n):p()};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,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),
-h=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var k=Math.max(f/e,h/e);if(1<k){var l=Math.round(f/k),m=Math.round(h/k),n=document.createElement("canvas");n.width=l;n.height=m;n.getContext("2d").drawImage(a,0,0,l,m);var q=n.toDataURL();if(q.length<b.length){var p=document.createElement("canvas");p.width=l;p.height=m;var u=p.toDataURL();q!==u&&(b=q,f=l,h=m)}}}catch(E){}c(b,f,h)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var d=c,e=0;8>e;e++)d=1==(d&1)?3988292384^d>>>1:d>>>
-1,EditorUi.prototype.crcTable[c]=d;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b[c+f])&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,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(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 k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=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);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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 g=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(B){a.handleError(B)}return c};var c=this.clearDefaultStyle;
+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 e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,e,g,k,l,m,t,w){t=null!=t?t:!0;var f=!1,h=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,t);null!=l&&l(b)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,t),m=!0)),m||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,t);null!=l&&l(a)})):null!=m&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(m,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(f=!0,this.parseFile(null!=m?m: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!=l&&l(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));f||null==l||l(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);
+b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,l,m,t,w,x){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var f=null!=b&&null!=c,h=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var u=w||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,
+6)&&a[p].size>u){n=!0;break}var q=mxUtils.bind(this,function(){var n=this.editor.graph,m=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,h,n,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,e,g,h,n,k,f,x)});g=null!=g?g:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var u=a.length,p=u,q=[],v=mxUtils.bind(this,function(a,
+b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=l)l(q);else{var c=[];n.getModel().beginUpdate();try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{n.getModel().endUpdate()}}g(c)}}),B=0;B<u;B++)mxUtils.bind(this,function(f){var g=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,u=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(u+1)))),
+q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],A=x?null:p.getAttribute("content");null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null==A||"<mxfile "!==A.substring(0,8)&&"<mxGraphModel "!==A.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(l.substring(0,u+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var h=a[0],k=parseFloat(h.getAttribute("width")),
+t=parseFloat(h.getAttribute("height")),p=h.getAttribute("viewBox");if(null==p||0==p.length)h.setAttribute("viewBox","0 0 "+k+" "+t);else if(isNaN(k)||isNaN(t)){var w=p.split(" ");3<w.length&&(k=parseFloat(w[2]),t=parseFloat(w[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var v=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,t)),x=e(l,g.type,b+f*m,c+f*m,Math.max(1,Math.round(k*v)),Math.max(1,Math.round(t*v)),g.name);if(isNaN(k)||isNaN(t)){var A=new Image;A.onload=mxUtils.bind(this,function(){k=
+Math.max(1,A.width);t=Math.max(1,A.height);x[0].geometry.width=k;x[0].geometry.height=t;h.setAttribute("viewBox","0 0 "+k+" "+t);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));n.setCellStyles("image",l,[x[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(h))}return x}}}catch(fa){}return null})):v(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*m,c+f*m,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{p=
+!1;if("image/png"==g.type){var B=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var y=new Image;y.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*m,c+f*m,y.width,y.height,g.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(n){this.resizeImage(n,a.target.result,mxUtils.bind(this,function(n,k,l){v(f,mxUtils.bind(this,function(){if(null!=n&&n.length<t){var u=h&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(d/k,d/l)):1;return e(n,g.type,b+f*m,c+f*m,Math.round(k*u),Math.round(l*u),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,
+g.type,b+f*m,c+f*m,240,160,g.name,function(a){v(f,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*m,c+f*m,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(B)});n?this.confirmImageResize(function(a){h=a;q()},m):q()};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,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(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):e(!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 e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.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,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),
+h=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var n=Math.max(f/e,h/e);if(1<n){var k=Math.round(f/n),l=Math.round(h/n),m=document.createElement("canvas");m.width=k;m.height=l;m.getContext("2d").drawImage(a,0,0,k,l);var u=m.toDataURL();if(u.length<b.length){var p=document.createElement("canvas");p.width=k;p.height=l;var q=p.toDataURL();u!==q&&(b=u,f=k,h=l)}}}catch(E){}c(b,f,h)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var d=c,e=0;8>e;e++)d=1==(d&1)?3988292384^d>>>1:d>>>
+1,EditorUi.prototype.crcTable[c]=d;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&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,e){function f(a,b){var c=n;n+=b;return a.substring(c,n)}function g(a){a=f(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 n=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,n);do{var k=g(a);if("IDAT"==f(a,4)){e=a.substring(0,n-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);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(n-8,a.length);break}e+=a.substring(n-8,n-4+k);f(a,k);f(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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,e){a=d.substring(a+
+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+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,c){var d=
+new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var g=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 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 e=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)};e.call(this,a,c,d)};g.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 l=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:l.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||
-!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),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 n=this.actions.get("print");n.setEnabled(!mxClient.IS_IOS||!navigator.standalone);n.visible=n.isEnabled();if(!this.editor.chromeless||
-this.editor.editable){var A=function(){window.setTimeout(function(){t.innerHTML="&nbsp;";t.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_IE||
+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 l=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||
+!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))l.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),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 m=this.actions.get("print");m.setEnabled(!mxClient.IS_IOS||!navigator.standalone);m.visible=m.isEnabled();if(!this.editor.chromeless||
+this.editor.editable){var B=function(){window.setTimeout(function(){t.innerHTML="&nbsp;";t.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_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,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(P){}}),!1);var t=document.createElement("div");t.style.position="absolute";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.display="block";t.contentEditable=!0;mxUtils.setOpacity(t,0);t.style.width="1px";t.style.height="1px";t.innerHTML="&nbsp;";var w=!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)||w||(t.style.left=b.container.scrollLeft+10+"px",t.style.top=b.container.scrollTop+10+"px",b.container.appendChild(t),
w=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){t.focus();document.execCommand("selectAll",!1,null)},0):(t.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(){!w||224!=c&&17!=c&&91!=c||(w=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),t.parentNode.removeChild(t),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(t,
-"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t),A())}));mxEvent.addListener(t,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t,!0),A())}));mxEvent.addListener(t,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(t.innerHTML="&nbsp;",t.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,t);t.innerHTML="&nbsp;"}),0))}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=
+"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t),B())}));mxEvent.addListener(t,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(t,!0),B())}));mxEvent.addListener(t,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(t.innerHTML="&nbsp;",t.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,t);t.innerHTML="&nbsp;"}),0))}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=
function(a){return mxEvent.getSource(a)==t?!0:x.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,e,f,g){b.insertImage(a,f,g)},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 e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):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){n=document.createElement("div");n.style.position="absolute";n.style.top="95px";n.style.left="250px";n.style.width="2000px";n.style.height="30px";n.style.background=
-"whiteSmoke";document.body.appendChild(n);var C=document.createElement("div");C.style.position="absolute";C.style.top="125px";C.style.left="220px";C.style.width="30px";C.style.height="1000px";C.style.background="whiteSmoke";document.body.appendChild(C);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,
-C,!0);this.hRuler=new mxRuler(this.editor.graph,n,!1)}if("1"==urlParams.styledev){n=document.getElementById("geFooter");null!=n&&(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)})),n.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 F=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:F.apply(this,arguments)}}n=document.getElementById("geInfo");null!=n&&n.parentNode.removeChild(n);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==
+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){m=document.createElement("div");m.style.position="absolute";m.style.top="95px";m.style.left="250px";m.style.width="2000px";m.style.height="30px";m.style.background=
+"whiteSmoke";document.body.appendChild(m);var C=document.createElement("div");C.style.position="absolute";C.style.top="125px";C.style.left="220px";C.style.width="30px";C.style.height="1000px";C.style.background="whiteSmoke";document.body.appendChild(C);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,
+C,!0);this.hRuler=new mxRuler(this.editor.graph,m,!1)}if("1"==urlParams.styledev){m=document.getElementById("geFooter");null!=m&&(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)})),m.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 F=this.isSelectionAllowed;
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:F.apply(this,arguments)}}m=document.getElementById("geInfo");null!=m&&m.parentNode.removeChild(m);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,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=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,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var l=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var m=!0,t=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,m))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;t()},mxEvent.isControlDown(a)):t()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,
+f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=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,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var 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 l=!0,t=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,l))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;t()},mxEvent.isControlDown(a)):t()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),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,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"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();
@@ -7813,9 +7817,9 @@ this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]
function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);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())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,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,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(A){}try{var c=b.getElementsByTagName("span"),
-h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(f=!0,e=h)}catch(A){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,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(A){}}}}};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()||
+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,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(B){}try{var c=b.getElementsByTagName("span"),
+h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(f=!0,e=h)}catch(B){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,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(B){}}}}};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&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&
@@ -7840,12 +7844,12 @@ k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okK
result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.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();g.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(H){g.postMessage(JSON.stringify({event:"draft",error:H.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?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,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;g.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;g.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){g.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 n=m;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(m.getStylesheet()),n.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else k=m.getIndexableText();this.editor.graph.setEnabled(!0);
+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 n=this.editor.graph,k="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var m=n;this.currentPage!=this.pages[l]&&(m=this.createTemporaryGraph(n.getStylesheet()),m.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+m.getIndexableText()+" "}else k=n.getIndexableText();this.editor.graph.setEnabled(!0);
g.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 v=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,v):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 q=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,p=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(q);g.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(q))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);p(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),y=m.getGlobalVariable,B=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:y.apply(this,
-arguments)};document.body.appendChild(m.container);m.model.setRoot(B.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(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?p("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);v=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),v.xml=mxUtils.getXml(k),v.data=this.getFileData(null,null,!0,null,null,null,k),v.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),v.data=this.getHtml(q,this.editor.graph),v.xml=mxUtils.getXml(q),v.format=h.format;
+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 q=null!=h.xml?h.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=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(q);g.postMessage(JSON.stringify(b),"*")}),p=
+mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));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()),y=n.getGlobalVariable,A=this.pages[0];n.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:y.apply(this,
+arguments)};document.body.appendChild(n.container);n.model.setRoot(A.root)}this.exportToCanvas(mxUtils.bind(this,function(a){p(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){p(null)}),null,null,null,null,null,null,n)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):
+p(null)}),mxUtils.bind(this,function(){p(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);v=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),v.xml=mxUtils.getXml(k),v.data=this.getFileData(null,null,!0,null,null,null,k),v.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),v.data=this.getHtml(q,this.editor.graph),v.xml=mxUtils.getXml(q),v.format=h.format;
else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);v.xml=this.getFileData(!0);v.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(v.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);
g.postMessage(JSON.stringify(v),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(v),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));v.data=this.createSvgDataUri(k)}g.postMessage(JSON.stringify(v),"*")}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"),
@@ -7857,19 +7861,19 @@ b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChang
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="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 e={},f=null,g=null,h=null,l=null,m="",n="auto",x="auto",C=null,z=null,F=40,E=40,G=100,I=0,B=this.editor.graph;B.getGraphBounds();for(var D=
-function(){null!=b?b(ea):(B.setSelectionCells(ea),B.scrollCellToVisible(B.getSelectionCell()))},H=B.getFreeInsertPoint(),M=H.x,K=H.y,H=K,T=null,P="auto",l=null,S=[],aa=null,Z=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var Q=mxUtils.trim(a.substring(1,Y)),L=mxUtils.trim(a.substring(Y+1));"label"==Q?T=B.sanitizeHtml(L):
-"style"==Q?f=L:"parentstyle"==Q?g=L:"identity"==Q&&0<L.length&&"-"!=L?h=L:"parent"==Q&&0<L.length&&"-"!=L?l=L:"namespace"==Q&&0<L.length&&"-"!=L?m=L:"width"==Q?n=L:"height"==Q?x=L:"left"==Q&&0<L.length?C=L:"top"==Q&&0<L.length?z=L:"ignore"==Q?Z=L.split(","):"connect"==Q?S.push(JSON.parse(L)):"link"==Q?aa=L:"padding"==Q?I=parseFloat(L):"edgespacing"==Q?F=parseFloat(L):"nodespacing"==Q?E=parseFloat(L):"levelspacing"==Q?G=parseFloat(L):"layout"==Q&&(P=L)}}}var U=this.editor.csvToArray(c[N]),Q=Y=null;
-if(null!=h||null!=l)for(var R=0;R<U.length;R++)h==U[R]&&(Y=R),l==U[R]&&(Q=R);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var O=0;O<S.length;O++)null==e[S[O].to]&&(e[S[O].to]={});B.model.beginUpdate();try{for(R=N+1;R<c.length;R++){var V=this.editor.csvToArray(c[R]);if(V.length==U.length){var J=null,X=null!=Y?m+V[Y]:null;null!=X&&(J=B.model.getCell(X));null==J&&(J=new mxCell(T,new mxGeometry(M,H,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=X);for(var W=0;W<V.length;W++)B.setAttributeForCell(J,U[W],
-V[W]);B.setAttributeForCell(J,"placeholders","1");J.style=B.replacePlaceholders(J,J.style);for(O=0;O<S.length;O++)e[S[O].to][J.getAttribute(S[O].to)]=J;null!=aa&&"link"!=aa&&(B.setLinkForCell(J,J.getAttribute(aa)),B.setAttributeForCell(J,aa,null));B.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=C&&null!=J.getAttribute(C)&&(J.geometry.x=M+parseFloat(J.getAttribute(C))),null!=z&&null!=J.getAttribute(z)&&(J.geometry.y=K+
-parseFloat(J.getAttribute(z))),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.width=parseFloat(J.getAttribute(n.substring(1))):J.geometry.width="auto"==n?da.width+I:parseFloat(n),"@"==x.charAt(0)&&null!=J.getAttribute(x.substring(1))?J.geometry.height=parseFloat(J.getAttribute(x.substring(1))):J.geometry.height="auto"==x?da.height+I:parseFloat(x),H+=J.geometry.height+E);l=null!=Q?B.model.getCell(m+V[Q]):null;null!=l?(l.style=B.replacePlaceholders(l,g),B.addCell(J,l)):d.push(B.addCell(J))}}for(var ba=
-d.slice(),ea=d.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<d.length;R++){var J=d[R],la=J.getAttribute(ca.from);if(null!=la){B.setAttributeForCell(J,ca.from,null);for(var ma=la.split(","),W=0;W<ma.length;W++){var fa=e[ca.to][ma[W]];null!=fa&&(T=ca.label,null!=ca.fromlabel&&(T=(J.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(fa.getAttribute(ca.tolabel)||"")),ea.push(B.insertEdge(null,null,T||"",ca.invert?fa:J,ca.invert?J:fa,ca.style||B.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?
-J:fa,ba))}}}if(null!=Z)for(R=0;R<d.length;R++)for(J=d[R],W=0;W<Z.length;W++)B.setAttributeForCell(J,mxUtils.trim(Z[W]),null);var ia=new mxParallelEdgeLayout(B);ia.spacing=F;var na=function(){ia.execute(B.getDefaultParent());for(var a=0;a<d.length;a++){var b=B.getCellGeometry(d[a]);b.x=Math.round(B.snap(b.x));b.y=Math.round(B.snap(b.y));"auto"==n&&(b.width=Math.round(B.snap(b.width)));"auto"==x&&(b.height=Math.round(B.snap(b.height)))}};if("circle"==P){var ja=new mxCircleLayout(B);ja.resetEdges=!1;
-var oa=ja.isVertexIgnored;ja.isVertexIgnored=function(a){return oa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ja.execute(B.getDefaultParent());na()},!0,D);D=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ea.length==2*d.length-1&&1==ba.length){B.view.validate();var ka=new mxCompactTreeLayout(B,"horizontaltree"==P);ka.levelDistance=E;ka.edgeRouting=!1;ka.resetEdges=!1;this.executeLayout(function(){ka.execute(B.getDefaultParent(),0<ba.length?ba[0]:null)},
-!0,D);D=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ba.length){B.view.validate();var ga=new mxHierarchicalLayout(B,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.parallelEdgeSpacing=F;ga.interRankCellSpacing=G;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(B.getDefaultParent(),ea);B.moveCells(ea,M,K)},!0,D);D=null}else if("organic"==P||"auto"==P&&ea.length>d.length){B.view.validate();var ha=new mxFastOrganicLayout(B);
-ha.forceConstant=3*E;ha.resetEdges=!1;var pa=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ia=new mxParallelEdgeLayout(B);ia.spacing=F;this.executeLayout(function(){ha.execute(B.getDefaultParent());na()},!0,D);D=null}this.hideDialog()}finally{B.model.endUpdate()}null!=D&&D()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c=
+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 e={},f=null,g=null,h=null,k=null,l="",m="auto",x="auto",C=null,z=null,F=40,E=40,G=100,I=0,A=this.editor.graph;A.getGraphBounds();for(var D=
+function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},H=A.getFreeInsertPoint(),M=H.x,K=H.y,H=K,T=null,P="auto",k=null,S=[],aa=null,Z=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var Q=mxUtils.trim(a.substring(1,Y)),L=mxUtils.trim(a.substring(Y+1));"label"==Q?T=A.sanitizeHtml(L):
+"style"==Q?f=L:"parentstyle"==Q?g=L:"identity"==Q&&0<L.length&&"-"!=L?h=L:"parent"==Q&&0<L.length&&"-"!=L?k=L:"namespace"==Q&&0<L.length&&"-"!=L?l=L:"width"==Q?m=L:"height"==Q?x=L:"left"==Q&&0<L.length?C=L:"top"==Q&&0<L.length?z=L:"ignore"==Q?Z=L.split(","):"connect"==Q?S.push(JSON.parse(L)):"link"==Q?aa=L:"padding"==Q?I=parseFloat(L):"edgespacing"==Q?F=parseFloat(L):"nodespacing"==Q?E=parseFloat(L):"levelspacing"==Q?G=parseFloat(L):"layout"==Q&&(P=L)}}}var U=this.editor.csvToArray(c[N]),Q=Y=null;
+if(null!=h||null!=k)for(var R=0;R<U.length;R++)h==U[R]&&(Y=R),k==U[R]&&(Q=R);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var O=0;O<S.length;O++)null==e[S[O].to]&&(e[S[O].to]={});A.model.beginUpdate();try{for(R=N+1;R<c.length;R++){var V=this.editor.csvToArray(c[R]);if(V.length==U.length){var J=null,X=null!=Y?l+V[Y]:null;null!=X&&(J=A.model.getCell(X));null==J&&(J=new mxCell(T,new mxGeometry(M,H,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=X);for(var W=0;W<V.length;W++)A.setAttributeForCell(J,U[W],
+V[W]);A.setAttributeForCell(J,"placeholders","1");J.style=A.replacePlaceholders(J,J.style);for(O=0;O<S.length;O++)e[S[O].to][J.getAttribute(S[O].to)]=J;null!=aa&&"link"!=aa&&(A.setLinkForCell(J,J.getAttribute(aa)),A.setAttributeForCell(J,aa,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=C&&null!=J.getAttribute(C)&&(J.geometry.x=M+parseFloat(J.getAttribute(C))),null!=z&&null!=J.getAttribute(z)&&(J.geometry.y=K+
+parseFloat(J.getAttribute(z))),"@"==m.charAt(0)&&null!=J.getAttribute(m.substring(1))?J.geometry.width=parseFloat(J.getAttribute(m.substring(1))):J.geometry.width="auto"==m?da.width+I:parseFloat(m),"@"==x.charAt(0)&&null!=J.getAttribute(x.substring(1))?J.geometry.height=parseFloat(J.getAttribute(x.substring(1))):J.geometry.height="auto"==x?da.height+I:parseFloat(x),H+=J.geometry.height+E);k=null!=Q?A.model.getCell(l+V[Q]):null;null!=k?(k.style=A.replacePlaceholders(k,g),A.addCell(J,k)):d.push(A.addCell(J))}}for(var ba=
+d.slice(),ea=d.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<d.length;R++){var J=d[R],la=J.getAttribute(ca.from);if(null!=la){A.setAttributeForCell(J,ca.from,null);for(var ma=la.split(","),W=0;W<ma.length;W++){var fa=e[ca.to][ma[W]];null!=fa&&(T=ca.label,null!=ca.fromlabel&&(T=(J.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(fa.getAttribute(ca.tolabel)||"")),ea.push(A.insertEdge(null,null,T||"",ca.invert?fa:J,ca.invert?J:fa,ca.style||A.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?
+J:fa,ba))}}}if(null!=Z)for(R=0;R<d.length;R++)for(J=d[R],W=0;W<Z.length;W++)A.setAttributeForCell(J,mxUtils.trim(Z[W]),null);var ia=new mxParallelEdgeLayout(A);ia.spacing=F;var na=function(){ia.execute(A.getDefaultParent());for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==m&&(b.width=Math.round(A.snap(b.width)));"auto"==x&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==P){var ja=new mxCircleLayout(A);ja.resetEdges=!1;
+var oa=ja.isVertexIgnored;ja.isVertexIgnored=function(a){return oa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ja.execute(A.getDefaultParent());na()},!0,D);D=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ea.length==2*d.length-1&&1==ba.length){A.view.validate();var ka=new mxCompactTreeLayout(A,"horizontaltree"==P);ka.levelDistance=E;ka.edgeRouting=!1;ka.resetEdges=!1;this.executeLayout(function(){ka.execute(A.getDefaultParent(),0<ba.length?ba[0]:null)},
+!0,D);D=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ba.length){A.view.validate();var ga=new mxHierarchicalLayout(A,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.parallelEdgeSpacing=F;ga.interRankCellSpacing=G;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,D);D=null}else if("organic"==P||"auto"==P&&ea.length>d.length){A.view.validate();var ha=new mxFastOrganicLayout(A);
+ha.forceConstant=3*E;ha.resetEdges=!1;var pa=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ia=new mxParallelEdgeLayout(A);ia.spacing=F;this.executeLayout(function(){ha.execute(A.getDefaultParent());na()},!0,D);D=null}this.hideDialog()}finally{A.model.endUpdate()}null!=D&&D()}}catch(qa){this.handleError(qa)}};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,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.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;
+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.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 e=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 e.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 f=b.init;b.init=function(){f.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"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;
@@ -7881,12 +7885,12 @@ if(this.isAppCache()){var d=applicationCache;if(null!=d&&null==this.offlineStatu
"";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 d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b="";break;case d.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+
'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.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!=e&&(this.offlineStatus.innerHTML=
b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"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 m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.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);
+return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),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 n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=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(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),l=f.getGraphBounds(),m=Math.floor(l.width*e/f.view.scale),k=Math.floor(l.height*
-e/f.view.scale);h.length<=MAX_REQUEST_SIZE&&m*k<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="+k+"&border="+g+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();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},
+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 m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
+null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=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(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=f.getGraphBounds(),l=Math.floor(k.width*e/f.view.scale),n=Math.floor(k.height*
+e/f.view.scale);h.length<=MAX_REQUEST_SIZE&&l*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="+l+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();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=
@@ -7899,29 +7903,29 @@ Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as=
mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,b,c,d,e){};
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,b,c,d){};mxAsyncCanvas.prototype.roundrect=function(a,b,c,d,e,g){};mxAsyncCanvas.prototype.ellipse=function(a,b,c,d){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxAsyncCanvas.prototype.image=function(a,b,c,d,e,g,l,m){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,b,c,d,e,g,l,m,n,f,h,k){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==n&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.image=function(a,b,c,d,e,g,k,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,b,c,d,e,g,k,l,m,f,h,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var u=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[u]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,d,e){return c+c+d+d+e+e});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b;this.ctx.translate(a,b)};
mxJsCanvas.prototype.rotate=function(a,b,c,d,e){d-=this.state.dx;e-=this.state.dy;this.ctx.translate(d,e);(b||c)&&this.ctx.scale(b?-1:1,c?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-d,-e)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
-mxJsCanvas.prototype.setGradient=function(a,b,c,d,e,g,l,m,n){c=this.ctx.createLinearGradient(0,d,0,d+g);d=this.state;d.fillColor=a;d.fillAlpha=null!=m?m:1;d.gradientColor=b;d.gradientAlpha=null!=n?n:1;d.gradientDirection=l;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&c.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+d.fillAlpha+")");null!=b&&c.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+d.gradientAlpha+")");this.ctx.fillStyle=c};
+mxJsCanvas.prototype.setGradient=function(a,b,c,d,e,g,k,l,m){c=this.ctx.createLinearGradient(0,d,0,d+g);d=this.state;d.fillColor=a;d.fillAlpha=null!=l?l:1;d.gradientColor=b;d.gradientAlpha=null!=m?m:1;d.gradientDirection=k;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&c.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+d.fillAlpha+")");null!=b&&c.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+d.gradientAlpha+")");this.ctx.fillStyle=c};
mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(b){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxJsCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxJsCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxJsCanvas.prototype.setShadow=function(a){(this.state.shadow=a)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(a){if(null==a||a==mxConstants.NONE)a=null,this.ctx.shadowColor="transparent";this.state.shadowColor=a;if(this.state.shadow&&null!=a){var b=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+b+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=b)};mxJsCanvas.prototype.moveTo=function(a,b){this.ctx.moveTo(a,b);this.lastMoveX=a;this.lastMoveY=b};mxJsCanvas.prototype.lineTo=function(a,b){this.ctx.lineTo(a,b);this.lastMoveX=a;this.lastMoveY=b};mxJsCanvas.prototype.quadTo=function(a,b,c,d){this.ctx.quadraticCurveTo(a,b,c,d);this.lastMoveX=c;this.lastMoveY=d};
-mxJsCanvas.prototype.arcTo=function(a,b,c,d,e,g,l){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,c,d,e,g,l);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,c,d,e,g){this.ctx.bezierCurveTo(a,b,c,d,e,g);this.lastMoveX=e;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(a,b,c,d){this.begin();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.close()};
+mxJsCanvas.prototype.arcTo=function(a,b,c,d,e,g,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,c,d,e,g,k);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,c,d,e,g){this.ctx.bezierCurveTo(a,b,c,d,e,g);this.lastMoveX=e;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(a,b,c,d){this.begin();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.close()};
mxJsCanvas.prototype.roundrect=function(a,b,c,d,e,g){this.begin();this.moveTo(a+e,b);this.lineTo(a+c-e,b);this.quadTo(a+c,b,a+c,b+g);this.lineTo(a+c,b+d-g);this.quadTo(a+c,b+d,a+c-e,b+d);this.lineTo(a+e,b+d);this.quadTo(a,b+d,a,b+d-g);this.lineTo(a,b+g);this.quadTo(a,b,a+e,b)};mxJsCanvas.prototype.ellipse=function(a,b,c,d){this.ctx.save();this.ctx.translate(a+c/2,b+d/2);this.ctx.scale(c/2,d/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,b,c,d,e,g,l,m){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var n=this.ctx;n.save();if(g){g=e.width;var f=e.height,h=Math.min(c/g,d/f);a+=(c-g*h)/2;b+=(d-f*h)/2;c=g*h;d=f*h}l&&(n.translate(2*a+c,0),n.scale(-1,1));m&&(n.translate(0,2*b+d),n.scale(1,-1));n.drawImage(e,a,b,c,d);n.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,b,c,d,e,g,k,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(g){g=e.width;var f=e.height,h=Math.min(c/g,d/f);a+=(c-g*h)/2;b+=(d-f*h)/2;c=g*h;d=f*h}k&&(m.translate(2*a+c,0),m.scale(-1,1));l&&(m.translate(0,2*b+d),m.scale(1,-1));m.drawImage(e,a,b,c,d);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,b=this.ctx.shadowOffsetX,c=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=b;this.ctx.shadowOffsetY=c}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,b,c,d,e,g,l,m,n,f,h,k){if(null!=e&&0!=e.length){c=this.state.scale;0!=k&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(k*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==n){e=this.subCanvas[this.canvasIndex++];n=e.height;k=e.width;switch(l){case mxConstants.ALIGN_MIDDLE:b-=n/2/c;break;case mxConstants.ALIGN_BOTTOM:b-=n/c}switch(g){case mxConstants.ALIGN_CENTER:a-=k/2/c;break;case mxConstants.ALIGN_RIGHT:a-=k/c}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,b,c,d,e,g,k,l,m,f,h,n){if(null!=e&&0!=e.length){c=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;n=e.width;switch(k){case mxConstants.ALIGN_MIDDLE:b-=m/2/c;break;case mxConstants.ALIGN_BOTTOM:b-=m/c}switch(g){case mxConstants.ALIGN_CENTER:a-=n/2/c;break;case mxConstants.ALIGN_RIGHT:a-=n/c}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/c),Math.round(e.height/c))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/c),Math.round(e.height/c)));this.ctx.scale(1/c,1/c);this.ctx.drawImage(e,
-Math.round(a*c),Math.round(b*c))}else{this.ctx.save();this.updateFont();k=document.createElement("div");k.innerHTML=e;k.style.position="absolute";k.style.top="-9999px";k.style.left="-9999px";k.style.fontFamily=this.state.fontFamily;k.style.fontWeight="bold";k.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(k);n=[k.offsetWidth,k.offsetHeight];document.body.removeChild(k);e=e.split("\n");k=n[1];this.ctx.textBaseline="top";n=b;switch(l){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";b-=(e.length-1)*k/2;n=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=k*(e.length-1),n=b-this.state.fontSize}l=[];k=[];for(c=0;c<e.length;c++)k[c]=a,l[c]=this.ctx.measureText(e[c]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(k[c]-=l[c],g==mxConstants.ALIGN_CENTER&&(k[c]+=l[c]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=k[0];g=l[0];for(c=1;c<e.length;c++)a=Math.min(a,k[c]),g=Math.max(g,l[c]);this.ctx.save();
-a=Math.round(a)-.5;n=Math.round(n)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,n,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,n,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(c=0;c<e.length;c++)this.ctx.fillText(e[c],k[c],b),b+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(a*c),Math.round(b*c))}else{this.ctx.save();this.updateFont();n=document.createElement("div");n.innerHTML=e;n.style.position="absolute";n.style.top="-9999px";n.style.left="-9999px";n.style.fontFamily=this.state.fontFamily;n.style.fontWeight="bold";n.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(n);m=[n.offsetWidth,n.offsetHeight];document.body.removeChild(n);e=e.split("\n");n=m[1];this.ctx.textBaseline="top";m=b;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";b-=(e.length-1)*n/2;m=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=n*(e.length-1),m=b-this.state.fontSize}k=[];n=[];for(c=0;c<e.length;c++)n[c]=a,k[c]=this.ctx.measureText(e[c]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(n[c]-=k[c],g==mxConstants.ALIGN_CENTER&&(n[c]+=k[c]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];g=k[0];for(c=1;c<e.length;c++)a=Math.min(a,n[c]),g=Math.max(g,k[c]);this.ctx.save();
+a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(c=0;c<e.length;c++)this.ctx.fillText(e[c],n[c],b),b+=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,b){mxEventSource.call(this);this.ui=a;this.cookieName=b;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 b=document.cookie,c=this.cookieName+"=",d=b.indexOf(c);0<=d&&(d+=c.length,a=b.indexOf(";",d),0>a?a=b.length:postCookie=b.substring(a),a=b.substring(d,a),a=0<a.length?a:null,null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie=c+"; expires="+b.toUTCString(),localStorage.setItem("."+this.cookieName,a)))}return a};
@@ -7930,15 +7934,16 @@ this.ui.drive.addListener("disconnected",this.disconnectListener);this.autosaveC
a});this.ui.editor.addListener("autosaveChanged",this.autosaveChangeListener)}DriveRealtime.prototype.logLevel=2;DriveRealtime.prototype.updateStatusInterval=2E4;DriveRealtime.prototype.diagramsKey="diagrams";DriveRealtime.prototype.diagrams=null;DriveRealtime.prototype.rootKey="root";DriveRealtime.prototype.diagramMap=null;DriveRealtime.prototype.chatHistory=null;DriveRealtime.prototype.saving=!1;DriveRealtime.prototype.defaultRealtimeAutosaveDelay=5E3;
DriveRealtime.prototype.defaultRealtimeMaxAutosaveDelay=6E4;DriveRealtime.prototype.realtimeHeartbeat=3E4;DriveRealtime.prototype.ignoreChange=!1;DriveRealtime.prototype.ignorePageFormatChanged=!1;DriveRealtime.prototype.ignoreScaleChanged=!1;DriveRealtime.prototype.ignoreBackgroundColorChanged=!1;DriveRealtime.prototype.ignoreShadowVisibleChanged=!1;DriveRealtime.prototype.ignoreBackgroundImageChanged=!1;DriveRealtime.prototype.ignoreMathEnabledChanged=!1;
DriveRealtime.prototype.getDiagramMap=function(){return null!=this.ui.currentPage?this.ui.currentPage.mapping.diagramMap:this.diagramMap};DriveRealtime.prototype.getCurrentPage=function(){return null!=this.page?this.page:this.ui.currentPage};
-DriveRealtime.prototype.start=function(){"1"==urlParams.reset&&(this.root.clear(),this.log("reset realtime"));var a=this.createPrefix();this.model.prefix=a+"-";this.ui.editor.resetGraph();this.diagrams=this.root.get(this.diagramsKey);a=!1;null==this.diagrams&&(this.diagrams=this.rtModel.createList(),this.root.set(this.diagramsKey,this.diagrams),a=!0,this.log("realtime model initialized"));var b=!1;if(""!=this.file.getData()){this.ui.fileNode=null;this.ui.pages=null;this.ui.setFileData(this.file.getData());
-this.log("xml converted");if(this.root.has("cells")&&a)try{(new Image).src="https://log.draw.io/log?severity=CONFIG&msg=converted-oldrt&v="+encodeURIComponent(EditorUi.VERSION)+"&ts="+(new Date).getTime()}catch(e){}if(null!=this.ui.pages)for(a=0;a<this.ui.pages.length;a++){var c=this.ui.pages[a],d=this.rtModel.createMap();this.diagrams.push(d);this.ui.updatePageRoot(c);c.mapping=new RealtimeMapping(this,d,c);this.file.isEditable()&&(d.set("id",c.getId()),""!=c.getName()?d.set("name",c.getName()):
-d.has("name")||d.set("name",mxResources.get("pageWithNumber",[a+1])));c.setName(d.get("name")||mxResources.get("pageWithNumber",[a+1]));c.mapping.init()}else"0"==urlParams.pages?(this.diagramMap=this.rtModel.createMap(),this.diagrams.push(this.diagramMap),this.page=new DiagramPage(document.createElement("diagram")),this.page.mapping=new RealtimeMapping(this,this.diagramMap,this.page),this.diagramMap.set("name",mxResources.get("pageWithNumber",[1])),this.diagramMap.set("id",this.page.getId()),this.page.setName(this.diagramMap.get("name")),
-this.page.mapping.init()):(this.ui.fileNode=mxUtils.createXmlDocument().createElement("mxfile"),this.ui.pages=[],d=this.rtModel.createMap(),this.diagrams.push(d),c=new DiagramPage(this.ui.fileNode.ownerDocument.createElement("diagram")),c.mapping=new RealtimeMapping(this,d,c),this.ui.currentPage=c,this.file.isEditable()&&!c.mapping.diagramMap.has("name")&&(c.mapping.diagramMap.set("name",mxResources.get("pageWithNumber",[1])),c.mapping.diagramMap.set("id",c.getId())),c.setName(c.mapping.diagramMap.get("name")||
-mxResources.get("pageWithNumber",[1])),this.ui.pages.push(c),c.mapping.init());b=!0}else if(2>this.diagrams.length&&"0"==urlParams.pages)this.ui.fileNode=null,this.ui.pages=null,0==this.diagrams.length?(this.diagramMap=this.rtModel.createMap(),this.diagrams.push(this.diagramMap)):this.diagramMap=this.diagrams.get(0),c=document.createElement("diagram"),this.diagramMap.has("id")&&c.setAttribute("id",this.diagramMap.get("id")),this.page=new DiagramPage(c),this.page.mapping=new RealtimeMapping(this,this.diagramMap,
-this.page),this.diagramMap.has("name")||this.diagramMap.set("name",mxResources.get("pageWithNumber",[1])),this.page.setName(this.page.mapping.diagramMap.get("name")),this.diagramMap.set("id",this.page.getId()),this.page.mapping.init(),this.ui.editor.fireEvent(new mxEventObject("resetGraphView"));else{this.ui.fileNode=mxUtils.createXmlDocument().createElement("mxfile");this.ui.pages=[];0==this.diagrams.length&&this.diagrams.push(this.rtModel.createMap());for(a=0;a<this.diagrams.length;a++)c=this.ui.fileNode.ownerDocument.createElement("diagram"),
-d=this.diagrams.get(a),d.has("id")&&c.setAttribute("id",d.get("id")),c=new DiagramPage(c),c.mapping=new RealtimeMapping(this,d,c),this.file.isEditable()&&!d.has("name")&&d.set("name",mxResources.get("pageWithNumber",[a+1])),c.setName(d.get("name")||mxResources.get("pageWithNumber",[a+1])),this.file.isEditable()&&!d.has("id")&&d.set("id",c.getId()),this.ui.pages.push(c);this.ui.currentPage=this.ui.pages[Math.max(0,Math.min(this.ui.pages.length-1,urlParams.page||0))];for(a=0;a<this.ui.pages.length;a++)this.ui.pages[a].mapping.init()}this.installReadOnlyListener();
-this.installUiChangeListeners();this.installGraphModelListener();this.installPageSelectListener();this.chatHistory=this.root.get("chatHistory");null==this.chatHistory&&this.initializeChat();this.installSelectionModelListener();this.installCollaboratorListener();this.updateCollaborators();this.doc.addEventListener(gapi.drive.realtime.EventType.DOCUMENT_SAVE_STATE_CHANGED,mxUtils.bind(this,function(a){this.documentSaveStateChanged(a,b)}));a=mxUtils.bind(this,function(){this.resetUpdateStatusThread();
-this.ui.resetScrollbars();this.updateStatus();b=!1});b?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.file.save(!1,a,a)):a();null==this.previousUndoListener&&(this.previousUndoListener=this.ui.editor.undoListener,this.ui.editor.undoListener=mxUtils.bind(this,function(a,b){this.ignoreChange||this.previousUndoListener.apply(this,arguments)}))};
+DriveRealtime.prototype.start=function(){"1"==urlParams.reset&&(this.root.clear(),this.log("reset realtime"));this.root.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,mxUtils.bind(this,function(a){"realtimeConverted"==a.property&&this.ui.showRefreshDialog()}));this.root.has("realtimeConverted")&&this.ui.showRefreshDialog();var a=this.createPrefix();this.model.prefix=a+"-";this.ui.editor.resetGraph();this.diagrams=this.root.get(this.diagramsKey);a=!1;null==this.diagrams&&(this.diagrams=
+this.rtModel.createList(),this.root.set(this.diagramsKey,this.diagrams),a=!0,this.log("realtime model initialized"));var b=!1;if(""!=this.file.getData()){this.ui.fileNode=null;this.ui.pages=null;this.ui.setFileData(this.file.getData());this.log("xml converted");if(this.root.has("cells")&&a)try{(new Image).src="https://log.draw.io/log?severity=CONFIG&msg=converted-oldrt&v="+encodeURIComponent(EditorUi.VERSION)+"&ts="+(new Date).getTime()}catch(e){}if(null!=this.ui.pages)for(a=0;a<this.ui.pages.length;a++){var c=
+this.ui.pages[a],d=this.rtModel.createMap();this.diagrams.push(d);this.ui.updatePageRoot(c);c.mapping=new RealtimeMapping(this,d,c);this.file.isEditable()&&(d.set("id",c.getId()),""!=c.getName()?d.set("name",c.getName()):d.has("name")||d.set("name",mxResources.get("pageWithNumber",[a+1])));c.setName(d.get("name")||mxResources.get("pageWithNumber",[a+1]));c.mapping.init()}else"0"==urlParams.pages?(this.diagramMap=this.rtModel.createMap(),this.diagrams.push(this.diagramMap),this.page=new DiagramPage(document.createElement("diagram")),
+this.page.mapping=new RealtimeMapping(this,this.diagramMap,this.page),this.file.isEditable()&&(this.diagramMap.set("name",mxResources.get("pageWithNumber",[1])),this.diagramMap.set("id",this.page.getId())),this.page.setName(this.diagramMap.get("name")||mxResources.get("pageWithNumber",[1])),this.page.mapping.init()):(this.ui.fileNode=mxUtils.createXmlDocument().createElement("mxfile"),this.ui.pages=[],d=this.rtModel.createMap(),this.diagrams.push(d),c=new DiagramPage(this.ui.fileNode.ownerDocument.createElement("diagram")),
+c.mapping=new RealtimeMapping(this,d,c),this.ui.currentPage=c,this.file.isEditable()&&(c.mapping.diagramMap.has("name")||c.mapping.diagramMap.set("name",mxResources.get("pageWithNumber",[1])),c.mapping.diagramMap.has("id")||c.mapping.diagramMap.set("id",c.getId())),c.setName(c.mapping.diagramMap.get("name")||mxResources.get("pageWithNumber",[1])),this.ui.pages.push(c),c.mapping.init());b=!0}else if(2>this.diagrams.length&&"0"==urlParams.pages)this.ui.fileNode=null,this.ui.pages=null,0==this.diagrams.length?
+(this.diagramMap=this.rtModel.createMap(),this.diagrams.push(this.diagramMap)):this.diagramMap=this.diagrams.get(0),c=document.createElement("diagram"),this.diagramMap.has("id")&&c.setAttribute("id",this.diagramMap.get("id")),this.page=new DiagramPage(c),this.page.mapping=new RealtimeMapping(this,this.diagramMap,this.page),this.diagramMap.has("name")||this.diagramMap.set("name",mxResources.get("pageWithNumber",[1])),this.page.setName(this.page.mapping.diagramMap.get("name")),this.diagramMap.set("id",
+this.page.getId()),this.page.mapping.init(),this.ui.editor.fireEvent(new mxEventObject("resetGraphView"));else{this.ui.fileNode=mxUtils.createXmlDocument().createElement("mxfile");this.ui.pages=[];0==this.diagrams.length&&this.diagrams.push(this.rtModel.createMap());for(a=0;a<this.diagrams.length;a++)c=this.ui.fileNode.ownerDocument.createElement("diagram"),d=this.diagrams.get(a),d.has("id")&&c.setAttribute("id",d.get("id")),c=new DiagramPage(c),c.mapping=new RealtimeMapping(this,d,c),this.file.isEditable()&&
+!d.has("name")&&d.set("name",mxResources.get("pageWithNumber",[a+1])),c.setName(d.get("name")||mxResources.get("pageWithNumber",[a+1])),this.file.isEditable()&&!d.has("id")&&d.set("id",c.getId()),this.ui.pages.push(c);this.ui.currentPage=this.ui.pages[Math.max(0,Math.min(this.ui.pages.length-1,urlParams.page||0))];for(a=0;a<this.ui.pages.length;a++)this.ui.pages[a].mapping.init()}this.installReadOnlyListener();this.installUiChangeListeners();this.installGraphModelListener();this.installPageSelectListener();
+this.chatHistory=this.root.get("chatHistory");null==this.chatHistory&&this.initializeChat();this.installSelectionModelListener();this.installCollaboratorListener();this.updateCollaborators();this.doc.addEventListener(gapi.drive.realtime.EventType.DOCUMENT_SAVE_STATE_CHANGED,mxUtils.bind(this,function(a){this.documentSaveStateChanged(a,b)}));a=mxUtils.bind(this,function(){this.resetUpdateStatusThread();this.ui.resetScrollbars();this.updateStatus();b=!1});b?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+
+"..."),this.file.save(!1,a,a)):a();null==this.previousUndoListener&&(this.previousUndoListener=this.ui.editor.undoListener,this.ui.editor.undoListener=mxUtils.bind(this,function(a,b){this.ignoreChange||this.previousUndoListener.apply(this,arguments)}))};
DriveRealtime.prototype.documentSaveStateChanged=function(a,b){!this.saving||a.isPending||a.isSaving||b||(this.ui.isLegacyDriveDomain()&&"1"!=urlParams.ignoremime&&this.ui.drive.verifyMimeType(this.file.getId()),this.file.isAutosave()?this.triggerAutosave():this.file.addAllSavedStatus(),this.saving=!1,this.connected=!0,this.resetUpdateStatusThread(),this.realtimeHeartbeat=DriveRealtime.prototype.realtimeHeartbeat,null!=this.isAliveThread&&(window.clearTimeout(this.isAliveThread),this.isAliveThread=
null));if(this.file.isEditable()){var c=10485760-this.rtModel.bytesUsed;0<c&&5E5>c&&!this.sizeLimitWarningShown&&(this.sizeLimitWarningShown=!0,this.ui.showError(mxResources.get("warning"),mxResources.get("fileNearlyFullSeeFaq"),mxResources.get("close"),mxUtils.bind(this,function(){}),null,mxResources.get("show"),mxUtils.bind(this,function(){window.open("https://desk.draw.io/support/solutions/articles/16000041695")})))}};
DriveRealtime.prototype.triggerAutosave=function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingPreview")));this.file.autosave(this.realtimeAutosaveDelay,this.realtimeMaxAutosaveDelay,mxUtils.bind(this,function(a){this.realtimeAutosaveDelay=this.defaultRealtimeAutosaveDelay+Math.min(1E4,this.file.saveDelay);this.ui.getCurrentFile()!=this.file||this.saving||this.file.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorUpdatingPreview")));
@@ -7952,11 +7957,11 @@ mxUtils.bind(this,function(a,b){if(!this.ignoreBackgroundImageChanged)try{this.s
DriveRealtime.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};
DriveRealtime.prototype.updateStatus=function(){if(!this.saving&&this.connected){var a=this.root.get("modifiedDate");""!=a&&(a=this.ui.timeSince(new Date(a)),null==a&&(a=mxResources.get("lessThanAMinute")),this.ui.editor.setStatus('<span title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("lastChange",[a]))+"</span>"+(this.file.isEditable()?"":'<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>")),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("span"),0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))}};DriveRealtime.prototype.getPageIndexForMap=function(a){for(var b=0;b<this.ui.pages.length;b++)if(this.ui.pages[b].mapping.diagramMap==a)return b;return null};
-DriveRealtime.prototype.installPageSelectListener=function(){this.pageChangeListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("change").relatedPage;null==c.mapping&&(c.mapping=new RealtimeMapping(this,this.rtModel.createMap(),c),c.mapping.init(),this.file.isEditable()&&c.mapping.diagramMap.set("name",c.getName()))});this.ui.editor.addListener("beforePageChange",this.pageChangeListener);this.viewStateListener=mxUtils.bind(this,function(a,b){var c=this.getCurrentPage();null==c.viewState&&
-c.mapping.activate(!0)});this.ui.editor.addListener("setViewState",this.viewStateListener);this.diagrams.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,function(a){if(!this.isLocalEvent(a))if(null==a.movedFromList){this.ignoreChange=!0;null==this.ui.pages&&(this.ui.fileNode=mxUtils.createXmlDocument().createElement("mxfile"),this.ui.pages=[],null!=this.page&&(this.ui.currentPage=this.page,this.ui.pages.push(this.ui.currentPage),this.page=this.diagramMap=null));for(var b=
-0;b<a.values.length;b++){var c=new DiagramPage(document.createElement("diagram"));c.mapping=new RealtimeMapping(this,a.values[b],c);c.setName(c.mapping.diagramMap.get("name")||mxResources.get("pageWithNumber",[this.ui.pages.length+1]));this.ui.pages.splice(a.index+b,0,c);c.mapping.init()}null!=this.ui.pages&&1<this.ui.pages.length&&null!=this.ui.tabContainer&&"0px"==this.ui.tabContainer.style.height&&this.ui.editor.graph.view.validateBackground();this.ui.updateTabContainer();this.ignoreChange=!1}else if(a.movedFromList==
-this.diagrams&&null!=a.movedFromIndex){this.ignoreChange=!0;for(b=0;b<a.values.length;b++)c=this.getPageIndexForMap(a.values[b]),null!=c&&this.ui.movePage(c+b,a.index+b);this.ignoreChange=!1;this.ui.updateTabContainer()}}));this.diagrams.addEventListener(gapi.drive.realtime.EventType.VALUES_REMOVED,mxUtils.bind(this,function(a){if(!this.isLocalEvent(a)&&null==a.movedToList){this.ignoreChange=!0;for(var b=0;b<a.values.length;b++){var c=this.getPageIndexForMap(a.values[b]);null!=c&&(c=this.ui.pages[c],
-null!=c&&(this.ui.removePage(c),c.mapping.destroy()))}this.ignoreChange=!1}}))};
+DriveRealtime.prototype.installPageSelectListener=function(){this.pageChangeListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("change").relatedPage;null==c.mapping&&(c.mapping=new RealtimeMapping(this,this.rtModel.createMap(),c),c.mapping.init(),this.file.isEditable()&&(c.mapping.diagramMap.set("name",c.getName()),c.mapping.diagramMap.set("id",c.getId())))});this.ui.editor.addListener("beforePageChange",this.pageChangeListener);this.viewStateListener=mxUtils.bind(this,function(a,b){var c=
+this.getCurrentPage();null==c.viewState&&c.mapping.activate(!0)});this.ui.editor.addListener("setViewState",this.viewStateListener);this.diagrams.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,function(a){if(!this.isLocalEvent(a))if(null==a.movedFromList){this.ignoreChange=!0;null==this.ui.pages&&(this.ui.fileNode=mxUtils.createXmlDocument().createElement("mxfile"),this.ui.pages=[],null!=this.page&&(this.ui.currentPage=this.page,this.ui.pages.push(this.ui.currentPage),
+this.page=this.diagramMap=null));for(var b=0;b<a.values.length;b++){var c=new DiagramPage(document.createElement("diagram"));c.mapping=new RealtimeMapping(this,a.values[b],c);c.setName(c.mapping.diagramMap.get("name")||mxResources.get("pageWithNumber",[this.ui.pages.length+1]));c.mapping.diagramMap.has("id")&&c.node.setAttribute("id",c.mapping.diagramMap.get("id"));this.ui.pages.splice(a.index+b,0,c);c.mapping.init()}null!=this.ui.pages&&1<this.ui.pages.length&&null!=this.ui.tabContainer&&"0px"==
+this.ui.tabContainer.style.height&&this.ui.editor.graph.view.validateBackground();this.ui.updateTabContainer();this.ignoreChange=!1}else if(a.movedFromList==this.diagrams&&null!=a.movedFromIndex){this.ignoreChange=!0;for(b=0;b<a.values.length;b++)c=this.getPageIndexForMap(a.values[b]),null!=c&&this.ui.movePage(c+b,a.index+b);this.ignoreChange=!1;this.ui.updateTabContainer()}}));this.diagrams.addEventListener(gapi.drive.realtime.EventType.VALUES_REMOVED,mxUtils.bind(this,function(a){if(!this.isLocalEvent(a)&&
+null==a.movedToList){this.ignoreChange=!0;for(var b=0;b<a.values.length;b++){var c=this.getPageIndexForMap(a.values[b]);null!=c&&(c=this.ui.pages[c],null!=c&&(this.ui.removePage(c),c.mapping.destroy()))}this.ignoreChange=!1}}))};
DriveRealtime.prototype.processChange=function(a){if(a instanceof RenamePage)a.page.mapping.diagramMap.set("name",a.page.getName());else if(a instanceof ChangePage)null==a.previousIndex?this.diagrams.removeValue(a.relatedPage.mapping.diagramMap):this.diagrams.insert(a.previousIndex,a.relatedPage.mapping.diagramMap);else if(a instanceof MovePage)this.diagrams.move(a.newIndex,a.oldIndex+(a.newIndex<a.oldIndex?1:0));else if(a instanceof mxRootChange)a.root==this.model.root&&this.getCurrentPage().mapping.initRealtime();
else if(a instanceof mxChildChange){if(a.parent!=a.previous||a.index!=a.previousIndex){var b=a.child.rtCell;null==b&&(b=this.getCurrentPage().mapping.createRealtimeCell(a.child),this.getCurrentPage().mapping.saveRealtimeCell(b.cell));var c=null!=a.parent?a.parent.rtCell:null;if(null!=a.previous){var d=a.previous.rtCell;null!=d&&d.children.removeValue(b)}null!=c&&c.children.insert(Math.min(c.children.length,a.index),b);b.parent=c}}else null!=a.cell&&null!=a.cell.id&&(b=a.cell.rtCell,null!=b&&(a instanceof
mxTerminalChange?b[a.source?"source":"target"]=null!=a.terminal?a.terminal.rtCell:null:a instanceof mxGeometryChange?b.geometry=null!=a.geometry?mxUtils.getXml(this.codec.encode(a.geometry)):null:a instanceof mxStyleChange?b.style=a.style:a instanceof mxValueChange?mxUtils.isNode(a.value)?(b.value=null,b.xmlValue=mxUtils.getXml(a.value)):(b.xmlValue=null,b.value=a.value):a instanceof mxCollapseChange?b.collapsed=a.collapsed?"1":"0":a instanceof mxVisibleChange&&(b.visible=a.visible?"1":"0")))};
@@ -8023,7 +8028,7 @@ RealtimeMapping.prototype.installRealtimeCellListeners=function(a){a.addEventLis
RealtimeMapping.prototype.handleValueChanged=function(a,b){var c=a.cell;if(!this.driveRealtime.isLocalEvent(b)&&null!=c){var d=b.newValue,e=b.property,g=this.beginUpdate();"type"==e?(c.vertex="vertex"==d,c.edge="edge"==d):"connectable"==e?c.connectable="1"==d:"source"==e||"target"==e?null==d?null!=b.oldValue&&g.setTerminal(c,null,"source"==e):null!=d.cell&&this.containsRealtimeCell(d)&&null!=g.getCell(d.cellId)?g.setTerminal(c,d.cell,"source"==e):(null!=a.parent&&(a.parent.children.removeValue(a),a.parent=
null),g.setTerminal(c,null,"source"==e),g.remove(a.cell),a[e]=null):"value"==e?g.setValue(c,d):"xmlValue"==e?g.setValue(c,mxUtils.parseXml(d).documentElement):"style"==e?g.setStyle(c,d):"geometry"==e?(d=null!=d?this.driveRealtime.codec.decode(mxUtils.parseXml(d).documentElement):null,g.setGeometry(c,d)):"collapsed"==e?g.setCollapsed(c,"1"==d):"visible"==e?g.setVisible(c,"1"==d):"parent"==e&&(null!=b.oldValue?b.oldValue.children.removeValue(a):(this.createCell(a),this.restoreCell(a)),null==d?g.remove(c):
(c=d.children.indexOf(a),0<=c&&g.add(d.cell,a.cell,c)))}};
-RealtimeMapping.prototype.handleValuesAdded=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var c=this.beginUpdate(),d=0;d<b.values.length;d++){var e=b.values[d];if(null!=e.parent)if(e.parent!=a)a.children.removeValue(e);else{if(null==e.cell||null==e.cell.parent)this.createCell(e),this.restoreCell(e);for(var g=a.children.indexOf(e),l=a.children.lastIndexOf(e);g!=l;)a.children.remove(l),l=a.children.lastIndexOf(e);e.parent==a&&c.add(a.cell,e.cell,Math.min(g,b.index+d))}}};
+RealtimeMapping.prototype.handleValuesAdded=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var c=this.beginUpdate(),d=0;d<b.values.length;d++){var e=b.values[d];if(null!=e.parent)if(e.parent!=a)a.children.removeValue(e);else{if(null==e.cell||null==e.cell.parent)this.createCell(e),this.restoreCell(e);for(var g=a.children.indexOf(e),k=a.children.lastIndexOf(e);g!=k;)a.children.remove(k),k=a.children.lastIndexOf(e);e.parent==a&&c.add(a.cell,e.cell,Math.min(g,b.index+d))}}};
RealtimeMapping.prototype.handleValuesRemoved=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var c=this.beginUpdate(),d=0;d<b.values.length;d++){var e=b.values[d];if(null!=e.cell)if(null!=e.parent&&e.parent!=a&&e.cell.parent!=e.parent.cell){var g=e.parent.children.indexOf(e);c.add(e.parent.cell,e.cell,g)}else g=a.children.indexOf(e),0<=g&&c.add(a.cell,e.cell,g)}};
RealtimeMapping.prototype.realtimePageFormatChanged=function(a,b){if(null!=a){var c=a.split(",");1<c.length&&(this.isActive()?b?this.graph.pageFormat=new mxRectangle(0,0,parseInt(c[0]),parseInt(c[1])):(this.driveRealtime.ignorePageFormatChanged=!0,this.ui.setPageFormat(new mxRectangle(0,0,parseInt(c[0]),parseInt(c[1]))),this.driveRealtime.ignorePageFormatChanged=!1):null!=this.page.viewState&&(this.page.viewState.pageFormat=new mxRectangle(0,0,parseInt(c[0]),parseInt(c[1]))))}};
RealtimeMapping.prototype.realtimePageScaleChanged=function(a,b){null!=a&&(this.isActive()?b?this.graph.pageScale=parseFloat(a):(this.driveRealtime.ignorePageScaleChanged=!0,this.ui.setPageScale(parseFloat(a)),this.driveRealtime.ignorePageScaleChanged=!1):null!=this.page.viewState&&(this.page.viewState.pageScale=parseFloat(a)))};
@@ -8033,17 +8038,30 @@ RealtimeMapping.prototype.realtimePageVisibleChanged=function(a,b){this.isActive
RealtimeMapping.prototype.realtimeShadowVisibleChanged=function(a,b){this.isActive()?(this.driveRealtime.ignoreShadowVisibleChanged=!0,this.ui.editor.graph.setShadowVisible("1"==a),this.driveRealtime.ignoreShadowVisibleChanged=!1):null!=this.page.viewState&&(this.page.viewState.shadowVisible="1"==a)};
RealtimeMapping.prototype.realtimeBackgroundImageChanged=function(a,b){var c=null!=a&&0<a.length?JSON.parse(a):null;this.isActive()?b?this.graph.setBackgroundImage(null!=c?new mxImage(c.src,c.width,c.height):null):(this.driveRealtime.ignoreBackgroundImageChanged=!0,this.ui.setBackgroundImage(null!=c?new mxImage(c.src,c.width,c.height):null),this.driveRealtime.ignoreBackgroundImageChanged=!1):null!=this.page.viewState&&(this.page.viewState.backgroundImage=null!=c?new mxImage(c.src,c.width,c.height):
null)};RealtimeMapping.prototype.realtimeMathEnabledChanged=function(a,b){this.isActive()?b?this.graph.mathEnabled="1"==urlParams.math||"1"==a:(this.driveRealtime.ignoreMathEnabledChanged=!0,this.ui.setMathEnabled("1"==urlParams.math||"1"==a),this.driveRealtime.ignoreMathEnabledChanged=!1):null!=this.page.viewState&&(this.page.viewState.mathEnabled="1"==urlParams.math||"1"==a)};
-RealtimeMapping.prototype.removeAllRealtimeCellListeners=function(a){if(null!=a){a.removeAllEventListeners();a.children.removeAllEventListeners();for(var b=0;b<a.children.length;b++)this.removeAllRealtimeCellListeners(a.children.get(b))}};RealtimeMapping.prototype.destroy=function(){this.diagramMap.removeAllEventListeners();this.selectionMap.removeAllEventListeners();this.removeAllRealtimeCellListeners(this.diagramMap.get(this.driveRealtime.rootKey))};DriveFile=function(a,b,c,d){DrawioFile.call(this,a,b);this.desc=c;null!=d&&null!=d.getModel()&&null!=d.getModel().getRoot()&&(this.realtime=new DriveRealtime(this,d))};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};DriveFile.prototype.saveDelay=0;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(b){if(null!=b&&null!=b.items)for(var c=0;c<b.items.length;c++)if("anyoneWithLink"===b.items[c].id||"anyone"===b.items[c].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isAutosave=function(){return this.ui.editor.autosave||this.isAutosaveRevision()};
-DriveFile.prototype.isAutosaveNow=function(){if(null!=this.realtime&&null!=this.realtime.root){var a=parseInt(this.realtime.root.get("backupDate")),b=parseInt(this.realtime.root.get("modifiedDate"));return isNaN(a)||isNaN(b)||a<b}return!0};DriveFile.prototype.autosaveCompleted=function(){null!=this.realtime&&null!=this.realtime.root&&this.realtime.root.set("backupDate",(new Date).getTime())};
-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,b,c,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(null,a,b,c,d)};
-DriveFile.prototype.saveFile=function(a,b,c,d,e){if(!this.isEditable())null!=c&&c();else if(!this.savingFile){this.savingFile=!0;var g=this.isModified,l=this.isModified();this.setModified(!1);this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;0!=a?(b&&(this.lastAutosaveRevision=(new Date).getTime()),this.desc=a,this.contentChanged(),null!=c&&c(a)):(this.setModified(l||this.isModified()),null!=d&&d())}),mxUtils.bind(this,function(a){this.savingFile=!1;
-this.isModified=g;this.setModified(l||this.isModified());null!=d&&d(a)}),e,e)}};DriveFile.prototype.saveAs=function(a,b,c){this.ui.drive.copyFile(this.getId(),a,b,c)};DriveFile.prototype.rename=function(a,b,c){this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(d){this.hasSameExtension(a,this.getTitle())?(this.desc=d,this.descriptorChanged(),null!=b&&b(d)):(this.desc=d,this.save(!0,b,c))}),c)};
-DriveFile.prototype.move=function(a,b,c){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=b&&b(a)}),c)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
-DriveFile.prototype.isEditable=function(){var a=DrawioFile.prototype.isEditable.apply(this,arguments);return null!=this.realtime?a&&!this.realtime.rtModel.isReadOnly:a&&this.desc.editable};DriveFile.prototype.open=function(){null!=this.realtime?this.realtime.start():DrawioFile.prototype.open.apply(this,arguments)};DriveFile.prototype.close=function(a){a=null!=a?a:!1;DrawioFile.prototype.close.apply(this,arguments);null!=this.realtime&&(this.realtime.destroy(a),this.realtime=null)};DriveLibrary=function(a,b,c){DriveFile.call(this,a,b);this.desc=c};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,b,c){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=b&&b(a)}),c)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.ui.editor.isChromelessView()&&"1"!=urlParams.rt?(this.appId="850530949725",this.clientId="850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","openid"],this.mimeType="all_types_supported"):this.ui.isDriveDomain()?(this.appId="671128082532",this.clientId="671128082532.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.realtime"):(this.appId="420247213240",this.clientId=
-"420247213240-hnbju1pt13seqrc1hhd5htpotk4g9q7u.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.rtlegacy");this.mimeTypes="application/mxe,application/vnd.jgraph.mxfile,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy"};mxUtils.extend(DriveClient,mxEventSource);
-DriveClient.prototype.scopes="1"==urlParams.photos?["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/photos","https://www.googleapis.com/auth/photos.upload","https://www.googleapis.com/auth/userinfo.profile"]:["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];DriveClient.prototype.enableThumbnails=!0;
-DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;
+RealtimeMapping.prototype.removeAllRealtimeCellListeners=function(a){if(null!=a){a.removeAllEventListeners();a.children.removeAllEventListeners();for(var b=0;b<a.children.length;b++)this.removeAllRealtimeCellListeners(a.children.get(b))}};RealtimeMapping.prototype.destroy=function(){this.diagramMap.removeAllEventListeners();this.selectionMap.removeAllEventListeners();this.removeAllRealtimeCellListeners(this.diagramMap.get(this.driveRealtime.rootKey))};DriveFile=function(a,b,c,d){DrawioFile.call(this,a,b);this.desc=c;null!=d&&null!=d.getModel()&&null!=d.getModel().getRoot()&&(this.realtime=new DriveRealtime(this,d))};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;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.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(b){if(null!=b&&null!=b.items)for(var c=0;c<b.items.length;c++)if("anyoneWithLink"===b.items[c].id||"anyone"===b.items[c].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
+DriveFile.prototype.isAutosave=function(){return this.ui.editor.autosave||null!=this.realtime&&this.isAutosaveRevision()};DriveFile.prototype.isAutosaveNow=function(){if(null!=this.realtime&&null!=this.realtime.root){var a=parseInt(this.realtime.root.get("backupDate")),b=parseInt(this.realtime.root.get("modifiedDate"));return isNaN(a)||isNaN(b)||a<b}return!0};DriveFile.prototype.autosaveCompleted=function(){null!=this.realtime&&null!=this.realtime.root&&this.realtime.root.set("backupDate",(new Date).getTime())};
+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,b,c,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(null,a,b,c,d,e)};
+DriveFile.prototype.saveFile=function(a,b,c,d,e,g){if(!this.isEditable())null!=c&&c();else if(!this.savingFile){var k=this.isModified,l=this.isModified();this.setModified(!1);this.isModified=function(){return!0};var m=mxUtils.bind(this,function(a,g){this.savingFile=!0;this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(a){this.isModified=k;this.savingFile=!1;0!=a?(b&&(this.lastAutosaveRevision=(new Date).getTime()),this.desc=a,this.contentChanged(),null!=c&&c(a)):(this.setModified(l||this.isModified()),
+null!=d&&d(a))}),mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){this.setModified(l||this.isModified());this.isModified=k;this.savingFile=!1;null!=d&&d(a)});this.isConflict(a)?this.showConflictDialog(function(){m(!0,!0)},function(){a=null;b()}):b()}),e,e,a)});m(g,b)}};
+DriveFile.prototype.makeCopy=function(a,b,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.ui.spinner.stop();this.desc=b;a();this.setModified(!1)}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}))};DriveFile.prototype.saveAs=function(a,b,c){this.ui.drive.copyFile(this.getId(),a,b,c)};
+DriveFile.prototype.rename=function(a,b,c){this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(d){this.hasSameExtension(a,this.getTitle())?(this.desc=d,this.descriptorChanged(),null!=b&&b(d)):(this.desc=d,this.save(!0,b,c))}),c)};DriveFile.prototype.move=function(a,b,c){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=b&&b(a)}),c)};DriveFile.prototype.getTitle=function(){return this.desc.title};
+DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};DriveFile.prototype.isEditable=function(){var a=DrawioFile.prototype.isEditable.apply(this,arguments);return null!=this.realtime?a&&!this.realtime.rtModel.isReadOnly:a&&this.desc.editable};DriveFile.prototype.open=function(){null!=this.realtime?this.realtime.start():DrawioFile.prototype.open.apply(this,arguments)};
+DriveFile.prototype.close=function(a){a=null!=a?a:!1;DrawioFile.prototype.close.apply(this,arguments);null!=this.realtime&&(this.realtime.destroy(a),this.realtime=null)};
+DriveFile.prototype.showConflictDialog=function(a,b){if(!this.showingConflictDialog){var c=null!=this.ui.spinner&&null!=this.ui.spinner.pause?this.ui.spinner.pause():function(){},d=this.changeListenerEnabled;this.changeListenerEnabled=!1;this.showingConflictDialog=!0;this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwrite"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.showingConflictDialog=!1;this.changeListenerEnabled=d;this.makeCopy(a,b,!0)}),
+null,mxResources.get("overwrite"),mxUtils.bind(this,function(){this.showingConflictDialog=!1;this.changeListenerEnabled=d;c();a()}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.showingConflictDialog=!1;this.changeListenerEnabled=d;this.ui.hideDialog();c();b()}),360,180);if(null!=this.ui.dialog&&null!=this.ui.dialog.container){var e=document.createElement("a");e.className="geStatusAlert";e.style.display="block";e.style.position="absolute";e.style.cursor="pointer";e.style.bottom="0";
+e.style.padding="8px 0 8px 0";e.style.marginBottom="26px";e.style.left="0";e.style.right="0";e.style.textAlign="center";e.style.borderRadius="0";e.style.borderLeftStyle="none";e.style.borderRightStyle="none";e.style.textDecoration="none";e.style.fontWeight="bold";e.setAttribute("href","https://desk.draw.io/support/solutions/articles/16000087215");e.setAttribute("target","_blank");mxUtils.write(e,mxResources.get("collaborativeEditingNotice"));this.ui.dialog.container.appendChild(e)}}};
+DriveFile.prototype.checkConvert=function(){var a=mxUtils.bind(this,function(a){try{this.ui.getCurrentFile()!=this||this.isModified()||this.ui.drive.getXmlFile(this.desc,null,mxUtils.bind(this,function(b){try{var c=b.getData(),e=null!=c?mxUtils.parseXml(c).documentElement:null;if(null!=e){var g=this.ui.editor.extractGraphModel(e,!0);null!=g&&(e=g)}null!=this.runCheck&&this.runCheck(a,e,c)}catch(k){this.log("CATCH-PARSEFILE-"+k.stack),this.runCheck(a,null,"CATCH-PARSEFILE-"+k.stack)}}),mxUtils.bind(this,
+function(b){this.log("ERROR-GETFILE");this.runCheck(a,null,"ERROR-GETFILE")}),!0)}catch(c){this.log("CATCH-GETFILE-"+c.stack),this.runCheck(a,null,"CATCH-GETFILE-"+c.stack)}});try{this.ui.drive.getRealtimeData(this.desc.id,a,a)}catch(b){this.log("CATCH-GETJSON-"+b.stack,!0)}};
+DriveFile.prototype.getComparableFile=function(a){for(;0<a.attributes.length;)a.removeAttribute(a.attributes[0].name);for(var b=a.getElementsByTagName("diagram"),c=0;c<b.length;c++){b[c].removeAttribute("name");b[c].removeAttribute("id");var d=this.ui.editor.graph.decompress(mxUtils.getTextContent(b[c]));if(null!=d&&0<d.length){for(;null!=b[c].firstChild;)b[c].removeChild(b[c].firstChild);b[c].appendChild(mxUtils.parseXml(d).documentElement)}}b=a.getElementsByTagName("mxGraphModel");for(c=0;c<b.length;c++)for(;0<
+b[c].attributes.length;)b[c].removeAttribute(b[c].attributes[0].name);return a};DriveFile.prototype.getAnonymizedXml=function(a){if(null!=a){for(var b=a.getElementsByTagName("mxCell"),c=0;c<b.length;c++)b[c].removeAttribute("style"),b[c].removeAttribute("value"),null!=b[c].parentNode&&"UserObject"==b[c].parentNode.nodeName&&null!=b[c].parentNode.parentNode&&b[c].parentNode.parentNode.replaceChild(b[c],b[c].parentNode);return mxUtils.getPrettyXml(a)}return"null"};
+DriveFile.prototype.getAnonymizedJson=function(a){if(null!=a){for(var b=a.value.diagrams.value,c=0;c<b.length;c++)null!=b[c].value&&null!=b[c].value.root&&this.anonymizeJsonCell(b[c].value.root.value);return JSON.stringify(a)}return"null"};DriveFile.prototype.anonymizeJsonCell=function(a){if(null!=a&&(delete a.xmlValue,delete a.value,delete a.style,null!=a.children&&null!=a.children.value))for(var b=0;b<a.children.value.length;b++)this.anonymizeJsonCell(a.children.value[b].value)};
+DriveFile.prototype.debug=function(){null!=window.console&&"1"==urlParams.test&&console.log.apply(console,arguments)};
+DriveFile.prototype.log=function(a,b){this.debug(a);try{this.ui.logEvent({category:this.ui.JSON_CHECK,action:a,label:this.desc.id}),b&&this.report("Realtime Log Report "+new Date+"\n\nDescription: "+JSON.stringify({version:this.ui.JSON_CHECK,title:this.desc.title,editable:this.desc.editable,copyable:this.desc.copyable,labels:this.desc.labels,id:this.desc.id,userPermission:this.desc.userPermission,fileSize:this.desc.fileSize,fileExtension:this.desc.fileExtension,modifiedDate:this.desc.modifiedDate,
+mimeType:this.desc.mimeType})+"\n\nMessage:\n"+a)}catch(c){}};DriveFile.prototype.report=function(a){try{3E6<a.length&&(a=a.substring(0,3E6)+"\n...[REPORT SHORTENED]"),this.debug(a),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a),mxUtils.bind(this,function(a){this.debug("report sent")}),mxUtils.bind(this,function(){this.debug("report failed")}))}catch(b){}};DriveLibrary=function(a,b,c){DriveFile.call(this,a,b);this.desc=c};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,b,c){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=b&&b(a)}),c)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";this.ui.editor.isChromelessView()&&"1"!=urlParams.rt?(this.appId="850530949725",this.clientId="850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","openid"],this.mimeType="all_types_supported"):this.ui.isDriveDomain()?(this.appId="671128082532",this.clientId="671128082532.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.realtime"):
+(this.appId="420247213240",this.clientId="420247213240-hnbju1pt13seqrc1hhd5htpotk4g9q7u.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.rtlegacy");this.mimeTypes=this.xmlMimeType+"application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy"};mxUtils.extend(DriveClient,mxEventSource);
+DriveClient.prototype.scopes="1"==urlParams.photos?["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/photos","https://www.googleapis.com/auth/photos.upload","https://www.googleapis.com/auth/userinfo.profile"]:["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,labels,properties,downloadUrl,webContentLink,userPermission";
+DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;
DriveClient.prototype.placeholderThumbnail="iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAACN1BMVEXwhwXvhgX4iwXzhwXgbQzvhgXhbAzocgzqcwzldAoAAADhbgvjcQnmdgrlbgDwhgXsfwXufgjwhgXwgQfziAXxgADibgz4iwX4jAX3iwTpcwr1igXoewjsfgj3igX4iwXqcQv4jAX3iwXtfQnndQrvhAbibArwhwXgbQz//////v39jwX6jQX+/v7fagHfawzdVQDwhADgbhPgbhXwhwPocQ3uvKvwiA/faQDscgzxiAT97+XgciTgcSP6jAXgbQ3gcCHwiRfpcQzwhwfeXQD77ef74NLvhgTvegD66uPgbAf66+TvfADwjCzgcCfwiSD67ObhcjjwiBHhczvwiyrgbxj///777ujgcSHgcB/xiRzgbhveWgDeVwDhdEDgbRDqfgffYgDfXwD97+bvfQDxiz7//vvwiRr118rrcgztggbfZgDfZAD++PT98+3gbBPsgAb99vD33tPgcB7icAvuhAX//Pn66N/00sTyy7vuuqbjekLwhwzkcgr88er449n++vfutp/kh1vgcBvhbwvmdwnwgwDwgADeWQD87eLxxrTssJjqpIf0roHmjWTkhFP759n63czvvanomnjnlHDhczD22cr4y6/wwa/3xKX2wJ3rqpH0tY7qp4vpnoDymlbjf0vxjjntcwzldAroegj/kgX12s7518PzqnnnkWfynmLieUjpewjrdAD40Lj1uZTzpm3idTbiciLydQzzfwnyiQTsfgD3xqnzp3TxlkzgbCrdTwDdSwBLKUlNAAAAJ3RSTlP8/b2X/YH8wb+FAIuIggJbQin5opAM9+a/ubaubyD78NjSyr2WgRp4sjN4AAAI70lEQVR42u2cZ38SQRDGT8WGvfde4E4BxVMRRaKiUURRlJhQRDCCSgQVO/bee++9994+nMt5ywoezFJd/fm8uITi3p9n5mbYkcCpO6rVnVu2YEXd+3dRIySuo7pLv4GjGNKg7j3UHTl1l14PajmG9OFBnx7Ird4PumpYEtf1QXc112l0M7OGKXEfeg3guo3iNIyJG92Jaz61mYYxcaNacs1H/8f6j6X5j1WI/mMVIsawRFEzI49SjwOqAJa43emclk8Rp2c7AFZ+LDGyvXE2kmO2Q1Lq17RSd6ND48QIwFVuLNHTOPbEpTOz8ujMpccHGz0AV5mxIo4TpwUeUPj0YwfAVVYs0Tn7VZjnBUA8v+n6CyfERY8FR/DEJj7MQ6oL85vOvfDUAsuVC8s19s5yXuAppOPnvPk4EeSCsehCeBVTwVzHfE6RcFUQa4an8Qw91kpbw2oz4aoc1sSxniO0WAI/J24wriabmEpizZtM79bc+fr4/tUarEpiLabGElJYRsOGjbJfjGDpJCxtmosRLOEnVpqLESzZLYlLg65H1rAkLo2GESwcROwXI1jELcS1Y6OGQSzEVaupZQJLDiLhYtCtFBcbbslYhOueqKllDwtzwVhTq4RFuBh0C3EdEBl0C3OBWNUrEISLvSD+5GLQLYmLoSqfwcUiFuaqzhYDxiJc981lxqqdVsCGbHPcQLBgrtK3rwLt9tWqhblKxxI9hW3267U5ZHhuBrCKzXl4NIJTS5FrmbmMWGIEDZIouOp0/O6boYQ2jxBXWcdu13fzRILuF/2Ku+aGr96uBbhALHo5Z38+XcfXyVRZVx/+Ed513ldDCCCu0rFE0Xlo2mu5TAj8ki0XV0q6ePHilhi+d/15b9ACQGGusg3AFzc+XSMBCPzu89+CNlnB7zfD8t1z4iaLXUvDVT6sGdMOnv5pi47f6r9Qk9YF3xZ0l8S11UfMArlgLMpZM6bamYy6rWnta9q7TrZrzZPgPgoqg3atubY8WK6D8lQXHfb4p/wSK7vFfxmxSsAPQ96AlZ4LxoLNeompdkUDGQVznL5mLr4ar5ESD3PBWHA9fbpbjlT4pq1Bm6H6w9dwfOd69ePouNDYt3S3ULPGZ96S3YqtAW/Tepz1E8bgAANc+xEXhAX36ut1cslcd6rJq81SIvgEe7lmL3kY5iqxVYvOI9isswp22KeMOcrriJlWai5giwHl+yec73Ma9Mbfz+qOJndKz6hLpR5V1uPxavFuTTt0K1XfpbNeO0wKeUaR2IPBN5sMRlqu1eY8bsFmPeIFUpi0CjIGTLvSZY2EGeYSi3VL9Dgeb0I+SQl9MlcZT4TObZKzfmfS5NZSx1GsLQ5r+8Sxp7ERR/1TtDlUn2qNuGXCrZGM5URlLDiEVzDVkje5fdjXdDsm27XpXChBz4XG0UpYcDOMYaxjGc3wtyJxFtu1PohaI71f2K2imqEONcN4nrMZ9TWbMf81wg9z3VNwC26Gr3enY4ObobLqbccFefuz5AKONpVfzQp2y3NoVvrN32GLNl9orA22lTiM+Nqg5CJY1DueOjkwsdtNgAP7gidR2SWVhFqt3o9QwoKHIuiwDcwX+xT/UWztSlvCaqXGmtQBY1GadQmfh6anuE0XlkhhRFs3tGGkd+tuIVhiJN0M+brj0mlAu46lX0bcbizVLbgZrgwl4JhYA+NQa9TJQUetsSJYHscJvAVct7eJKoUbQudxPYmdirqzsYsIojhjoitD01yadH287J+vpZF1/uGt2K4ttinjshQo2C2XMzI2U64X6WY4tyZq99a7wZS3eA3BpNyrUPn1x00Z0uM1ACzilOfg7EN3VmRo8dN16WYYerYw6G9qCOSDCjQ0jQkufRbalt65LVyapaA/2mClxhK3Rxy3rsyavDxDR/DL5sMLFiyYu/7sXps7z8VldPv2Xl6PnjlTwOOuJQuytH7CXpvXCOQWoZrYeHWd4nw2Q+v22OLGnFSG0Nk1PCi0xjgjpVvTGi8hht9F+ARBGq8dtXmtOSLoDm1FhUSHnihkTecESalHkPAaWVhtFbA8jqvQGBmbt8fWkKtNn0Xw9GvAWK6DX9bBVHjzqtyvvcG9a+jXyC5oKoKV/a4YFG7Yij2ofszlgtaA3ZoRwW+pIOH3w0qZFURNh3oNtKsDsAr9LNvMC0pj93H6hTPpX9ocg8FIgTVvcgFYC03jFLBMi6ix0MDAoi8/lh7Cgt2q0VfNrSX0ayhjTa2IW0tKdotNrMq4NbPkILKZW+xdiSoGgshogfh7Ul7FcIEoFevfrPLC3+XWf6y/CEvHZoFQqlts9sQigqjLxFpQCJauakFcsqhKPXH79rGb6bE2B5Qmu0b91zn0WJtN8Wys9tgtIqfjEf2SWw7XKI8gHuKQ0X0eDsQSI44TaGBN6dYN5dlI/eFj9I7f8GWtoUJYOIgkiq6Ds/gw5T7dZDUqTrfscbLbB9eIB7JmEKsUgiii/4uO8ToBfJlhfif5tEGWEsGTMT4Mr6HDa0BBlP5Y88lcnkdkCtLhnyjMM0+Gcn2WzW6xnd/J8zn+LZq4SUeEvUBaA8LCs6Tk1p1AetXt3JoMWexWZSyr3RK6vSUGrRHbmkRUVgCLpP1HW/L4tgl5tO140mdKKFFhrkTUdxta4xleA8DCXC6n/vCYvPJFa9zAWL4m6qNaA8IiqjW73lreWnJrSj0AJYFZpvwq6RZRzjVUGEtB5tX7DdoqCXaL+PXHuEjdYsuvVqva4Sqv6NdabdW4YLeIKsoFYzHGhYPIGBd2izGuVpPaSVgAV7VEsOQgsuUXdosxLuwWxLVMW0WRK5ExLiiIpN4vq2YYVTiIbPmFgii5xRiXimCBqmIcVSS3WMqvdMqz5VcKqzdKeca4UrnVT/ryR6bi2Opuf64TwYJlfl4FLqu2Zxeux5BRXZnisvZ8103NqTtzoziuGa24+wZVRdVK9W7wyNSX1nYeOmrU6JSmjp6KhH5BR+kGvk++Ld0c/X66rPH4SEQeGl+kpq8a33eAumPqK347durWpzm9hrWhUevi1Hd4ZzVC+gGMHY0TYnDOYwAAAABJRU5ErkJggg==".replace(/\+/g,"-").replace(/\//g,
"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="www.draw.io";DriveClient.prototype.oldAppHostname="legacy.draw.io";DriveClient.prototype.extension=".html";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=4;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=null;
DriveClient.prototype.setUser=function(a){this.user=a;null==this.user&&null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.getUser=function(){return this.user};
@@ -8051,35 +8069,40 @@ DriveClient.prototype.setUserId=function(a,b){if(b)if(isLocalStorage)localStorag
DriveClient.prototype.getUserId=function(){var a=null;null!=this.user&&(a=this.user.id);null==a&&isLocalStorage&&(a=localStorage.getItem(".guid"));if(null==a&&"undefined"!=typeof Storage){for(var b=document.cookie.split(";"),c=0;c<b.length;c++){var d=mxUtils.trim(b[c]);if("GUID="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie="GUID=; expires="+b.toUTCString(),localStorage.setItem(".guid",a))}return a};
DriveClient.prototype.execute=function(a){var b=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.ui.drive.clearUserId();this.ui.drive.setUser(null);gapi.auth.signOut();this.ui.showError(mxResources.get("error"),
b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,b)};
-DriveClient.prototype.executeRequest=function(a,b,c){var d=!0,e=null,g=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){d=!1;null!=c&&c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(m){window.clearTimeout(e);d&&(null!=m&&null==m.error?null!=b&&b(m):null!=c&&null!=m&&null!=m.error&&
-403==m.error.code&&("The requested mime type change is forbidden."==m.error.message||null!=m.error.data&&"domainPolicy"==m.error.data[0].reason)?c(m):null==m||null==m.error||401!=m.error.code&&403!=m.error.code?null!=m&&null!=m.error&&404!=m.error.code&&this.currentRequest==a&&g<this.maxRetries?(g++,this.requestThread=window.setTimeout(l,Math.round(Math.pow(2,g)*(1+.1*(Math.random()-.5))*1E3))):null!=c&&c(m):403==m.error.code&&null!=this.user?null!=c&&c(m):this.execute(l))}))});null==gapi.auth.getToken()?
-this.execute(l):l()};DriveClient.prototype.authorize=function(a,b,c,d){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=c&&c();else{var g={scope:this.scopes,client_id:this.clientId};a&&null!=e?(g.immediate=!0,g.user_id=e):(g.immediate=!1,g.authuser=-1);gapi.auth.authorize(g,mxUtils.bind(this,function(g){null!=g&&null==g.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,c,d):null!=c&&c(g);this.resetTokenRefresh(g)}))}};
+DriveClient.prototype.executeRequest=function(a,b,c){var d=!0,e=null,g=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){d=!1;null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);d&&(null!=l&&null==l.error?null!=b&&b(l):null!=c&&null!=l&&null!=l.error&&
+403==l.error.code&&("The requested mime type change is forbidden."==l.error.message||null!=l.error.data&&"domainPolicy"==l.error.data[0].reason)?c(l):null==l||null==l.error||401!=l.error.code&&403!=l.error.code?null!=l&&null!=l.error&&412!=l.error.code&&404!=l.error.code&&this.currentRequest==a&&g<this.maxRetries?(g++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,g)*(1+.1*(Math.random()-.5))*1E3))):null!=c&&c(l):403==l.error.code&&null!=this.user?null!=c&&c(l):this.execute(k))}))});
+null==gapi.auth.getToken()?this.execute(k):k()};
+DriveClient.prototype.authorize=function(a,b,c,d){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=c&&c();else{var g={scope:this.scopes,client_id:this.clientId};a&&null!=e?(g.immediate=!0,g.user_id=e):(g.immediate=!1,g.authuser=-1);gapi.auth.authorize(g,mxUtils.bind(this,function(g){null!=g&&null==g.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,c,d):null!=c&&c(g);this.resetTokenRefresh(g)}))}};
DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*a.expires_in))};
DriveClient.prototype.checkToken=function(a){var b=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();b&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
DriveClient.prototype.updateUser=function(a,b,c){var d=gapi.auth.getToken().access_token;this.ui.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json&access_token="+d,mxUtils.bind(this,function(d){var e=JSON.parse(d);this.executeRequest(gapi.client.drive.about.get(),mxUtils.bind(this,function(b){this.setUser(new DrawioUser(e.id,b.user.emailAddress,b.user.displayName,null!=b.user.picture?b.user.picture.url:null,e.locale));this.setUserId(e.id,c);null!=a&&a()}),b)}),b)};
-DriveClient.prototype.copyFile=function(a,b,c,d){null!=a&&null!=b&&this.executeRequest(gapi.client.drive.files.copy({fileId:a,resource:{title:b},supportsTeamDrives:!0}),c,d)};DriveClient.prototype.renameFile=function(a,b,c,d){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{title:b}),c,d)};DriveClient.prototype.moveFile=function(a,b,c,d){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:b}]}),c,d)};
+DriveClient.prototype.copyFile=function(a,b,c,d){null!=a&&null!=b&&this.executeRequest(gapi.client.drive.files.copy({fileId:a,fields:this.allFields,supportsTeamDrives:!0,resource:{title:b}}),c,d)};DriveClient.prototype.renameFile=function(a,b,c,d){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{title:b}),c,d)};DriveClient.prototype.moveFile=function(a,b,c,d){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:b}]}),c,d)};
DriveClient.prototype.createDriveRequest=function(a,b){return gapi.client.request({path:"/drive/v2/files/"+a,method:"PUT",params:{uploadType:"multipart",supportsTeamDrives:!0},headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(b)})};DriveClient.prototype.getLibrary=function(a,b,c){return this.getFile(a,b,c,!0,!0)};
-DriveClient.prototype.getFile=function(a,b,c,d,e){d=null!=d?d:!1;e=null!=e?e:!1;null!=urlParams.rev?this.executeRequest(gapi.client.drive.revisions.get({fileId:a,revisionId:urlParams.rev}),mxUtils.bind(this,function(a){this.getXmlFile(a,null,b,c)}),c):this.executeRequest(gapi.client.drive.files.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(a){if(null!=this.user){var g=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
-g?(g=a.downloadUrl+"&access_token="+gapi.auth.getToken().access_token,this.ui.convertFile(g,a.title,a.mimeType,this.extension,b,c)):d||e||a.mimeType==this.libraryMimeType?this.getXmlFile(a,null,b,c,!0,e):this.loadRealtime(a,mxUtils.bind(this,function(d){try{null==d||null==d.getModel()||null==d.getModel().getRoot()||d.getModel().getRoot().isEmpty()||d.getModel().getRoot().has("cells")&&!d.getModel().getRoot().has(DriveRealtime.prototype.diagramsKey)?this.getXmlFile(a,d,b,c):b(new DriveFile(this.ui,
-null,a,d))}catch(n){c(n)}}),c)}else c({message:mxResources.get("loggedOut")})}),c)};
-DriveClient.prototype.loadRealtime=function(a,b,c){if("1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType)if("850530949725"!=this.appId&&(a.editable||"application/mxe"!=a.mimeType&&"application/vnd.jgraph.mxfile"!=a.mimeType)){var d=mxUtils.bind(this,function(){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout);gapi.drive.realtime.load(a.id,mxUtils.bind(this,
-function(a){window.clearTimeout(g);e&&b(a)}))});d()}else b();else this.redirectToNewApp(c,a.id)};
-DriveClient.prototype.getXmlFile=function(a,b,c,d,e,g){var l=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+l,mxUtils.bind(this,function(l){if(null==l)d({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,l,a)):d({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var m=l.lastIndexOf(",");0<m&&(m=this.ui.extractGraphModelFromPng(l.substring(m+
-1)),null!=m&&0<m.length&&(l=m))}var f=new DriveFile(this.ui,l,a,b);!e&&"850530949725"!=this.appId&&f.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(f,!0,mxUtils.bind(this,function(a){f.desc=a;c(f)}),d,!0):c(f)}}),d,"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,b,c,d,e,g){if(a.isEditable()){var l=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;g=null!=g?g:!1;var m=mxUtils.bind(this,function(e,h,k){var f={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};k||(null!=e||g||(e=this.placeholderThumbnail,h=this.placeholderMimeType),null!=e&&null!=h&&(f.thumbnail={image:e,mimeType:h}));var m=function(){a.saveDelay=(new Date).getTime()-l;
-c.apply(this,arguments)},n=mxUtils.bind(this,function(c,e){this.executeRequest(this.createUploadRequest(a.getId(),f,c,b||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,e),m,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(a,!0)}),d,this.ui.getCurrentFile()!=a?a.getData():null):n(a.getData(),!1)}),n=mxUtils.bind(this,function(){!g&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&(null==
-a.realtime||a.realtime.connected)&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(k){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");m(b,"image/png")}))||m(null,null,a.constructor!=DriveLibrary&&(null==a.realtime||a.realtime.connected))});e||!b?n():this.verifyMimeType(a.getId(),n,!0)}else this.ui.editor.graph.reset(),null!=d&&d({message:mxResources.get("readOnly")})};
+DriveClient.prototype.loadDescriptor=function(a,b,c){this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:this.allFields,supportsTeamDrives:!0}),b,c)};DriveClient.prototype.getChannelId=function(a){a=a.properties;var b=null;if(null!=a)for(var c=0;c<a.length;c++)if("channel"==a[c].key){b=a[c].value;break}return b};
+DriveClient.prototype.getFile=function(a,b,c,d,e){d=null!=d?d:!1;e=null!=e?e:!1;null!=urlParams.rev?this.executeRequest(gapi.client.drive.revisions.get({fileId:a,revisionId:urlParams.rev,supportsTeamDrives:!0}),mxUtils.bind(this,function(a){this.getXmlFile(a,null,b,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){if(null!=this.user){var g=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&g?(g=a.downloadUrl+"&access_token="+
+gapi.auth.getToken().access_token,this.ui.convertFile(g,a.title,a.mimeType,this.extension,b,c)):d||e||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,null,b,c,!0,e):App.GOOGLE_REALTIME?this.loadRealtime(a,mxUtils.bind(this,function(d){try{null==d||null==d.getModel()||null==d.getModel().getRoot()||d.getModel().getRoot().isEmpty()||d.getModel().getRoot().has("cells")&&!d.getModel().getRoot().has(DriveRealtime.prototype.diagramsKey)?this.getXmlFile(a,d,b,c):b(new DriveFile(this.ui,
+null,a,d))}catch(m){c(m)}}),c):this.isGoogleRealtimeMimeType(a.mimeType)?this.convertRealtimeFile(a,mxUtils.bind(this,function(a){this.notifyRealtimeConverted(a);b(a)}),c):this.getXmlFile(a,null,b,c)}else c({message:mxResources.get("loggedOut")})}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
+DriveClient.prototype.getRealtimeData=function(a,b,c,d){this.executeRequest(gapi.client.drive.realtime.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(a){a=null!=a.result?a.result.data:null;null!=a&&null!=a.value&&null!=a.value.diagrams?b(a):null!=c&&c()}),mxUtils.bind(this,function(e){null==d&&(d=0);3>d?this.getRealtimeData(a,b,c,d+1):null!=c&&c()}))};
+DriveClient.prototype.loadRealtime=function(a,b,c){if("1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType)if("850530949725"!=this.appId&&(a.editable||"application/mxe"!=a.mimeType&&"application/vnd.jgraph.mxfile"!=a.mimeType)&&null!=gapi.drive.realtime){var d=mxUtils.bind(this,function(){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout);gapi.drive.realtime.load(a.id,
+mxUtils.bind(this,function(a){window.clearTimeout(g);e&&b(a)}))});d()}else b();else this.redirectToNewApp(c,a.id)};
+DriveClient.prototype.getXmlFile=function(a,b,c,d,e,g){var k=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+k,mxUtils.bind(this,function(k){if(null==k)d({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,k,a)):d({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var l=k.lastIndexOf(",");0<l&&(l=this.ui.extractGraphModelFromPng(k.substring(l+
+1)),null!=l&&0<l.length&&(k=l))}var f=new DriveFile(this.ui,k,a,b);App.GOOGLE_REALTIME&&!e&&"850530949725"!=this.appId&&f.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(f,!0,mxUtils.bind(this,function(a){f.desc=a;c(f)}),d,!0):c(f)}}),d,"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,b,c,d,e,g,k,l){if(a.isEditable()){var m=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;g=null!=g?g:!1;var f=mxUtils.bind(this,function(e,f,h){var n={mimeType:a.desc.mimeType,title:a.getTitle()};!App.GOOGLE_REALTIME&&null==a.realtime&&this.isGoogleRealtimeMimeType(a.desc.mimeType)&&(n.mimeType=this.xmlMimeType,b=!0);a.constructor==DriveFile&&null==this.getChannelId(a.desc)&&(null==l&&(l=[]),l.push({key:"channel",
+value:Editor.guid()}));h||(null!=e||g||(e=this.placeholderThumbnail,f=this.placeholderMimeType),null!=e&&null!=f&&(n.thumbnail={image:e,mimeType:f}));var v=function(){a.saveDelay=(new Date).getTime()-m;c.apply(this,arguments)},p=mxUtils.bind(this,function(c,e){null!=l&&(n.properties=l);var f=k||a.constructor!=DriveFile||null!=a.realtime?null:a.desc.etag;this.executeRequest(this.createUploadRequest(a.getId(),n,c,b||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,e,f),v,d)});this.ui.useCanvasForExport&&
+/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){p(a,!0)}),d,this.ui.getCurrentFile()!=a?a.getData():null):p(a.getData(),!1)}),h=mxUtils.bind(this,function(){!g&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&(null==a.realtime||a.realtime.connected)&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(p){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+
+1).replace(/\+/g,"-").replace(/\//g,"_");f(b,"image/png")}))||f(null,null,a.constructor!=DriveLibrary&&(null==a.realtime||a.realtime.connected))});e||!b?h():this.verifyMimeType(a.getId(),h,!0)}else this.ui.editor.graph.reset(),null!=d&&d({message:mxResources.get("readOnly")})};
+DriveClient.prototype.notifyRealtimeConverted=function(a){try{null!=gapi.drive.realtime&&gapi.drive.realtime.load(a.getId(),mxUtils.bind(this,function(b){try{null!=b&&null!=b.getModel()&&null!=b.getModel().getRoot()&&b.getModel().getRoot().set("realtimeConverted",a.desc.headRevisionId)}catch(c){}}))}catch(b){}};
DriveClient.prototype.verifyMimeType=function(a,b,c,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(c||e-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=e,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(c){this.checkingMimeType=!1;null!=c&&"application/vnd.jgraph.mxfile.realtime"==c.mimeType?this.redirectToNewApp(d,a):null!=
b&&b()})))};
DriveClient.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash".split(" "))+"#G"+b;null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=c}),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=c}))}};
-DriveClient.prototype.insertFile=function(a,b,c,d,e,g,l,m){g=null!=g?g:this.mimeType;m=null!=m?m:!0;a={mimeType:g,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,l),mxUtils.bind(this,function(a){g==this.libraryMimeType?d(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):m?this.loadRealtime(a,mxUtils.bind(this,function(c){null!=this.user?(c=new DriveFile(this.ui,b,a,c),c.lastAutosaveRevision=
-(new Date).getTime(),d(c)):null!=e&&e({message:mxResources.get("loggedOut")})}),e):d(a)}),e)};
-DriveClient.prototype.createUploadRequest=function(a,b,c,d,e){e=null!=e?e:!1;a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:{"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'},body:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(b)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=
-c?e?c:Base64.encode(c):"")+"\r\n---------314159265358979323846--"};d||(a.params.newRevision=!1);a.params.supportsTeamDrives=!0;return gapi.client.request(a)};
+DriveClient.prototype.insertFile=function(a,b,c,d,e,g,k,l){g=null!=g?g:App.GOOGLE_REALTIME?this.mimeType:this.xmlMimeType;l=null!=l?l:!0;a={mimeType:g,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,k),mxUtils.bind(this,function(a){g==this.libraryMimeType?d(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):App.GOOGLE_REALTIME&&l&&this.isGoogleRealtimeMimeType(a.mimeType)?this.loadRealtime(a,
+mxUtils.bind(this,function(c){null!=this.user?(c=new DriveFile(this.ui,b,a,c),c.lastAutosaveRevision=(new Date).getTime(),d(c)):null!=e&&e({message:mxResources.get("loggedOut")})}),e,!1):d(new DriveFile(this.ui,b,a))}),e)};
+DriveClient.prototype.createUploadRequest=function(a,b,c,d,e,g){e=null!=e?e:!1;var k={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=g&&(k["If-Match"]=g);a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:k,body:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(b)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+
+(null!=c?e?c:Base64.encode(c):"")+"\r\n---------314159265358979323846--"};d||(a.params.newRevision=!1);a.params.supportsTeamDrives=!0;a.params.fields=this.allFields;return gapi.client.request(a)};
DriveClient.prototype.pickFile=function(a,b){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=b?"genericPicker":"filePicker",e=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==
-mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[d].setVisible(!1))});if(null==this[d]||this[d+"Token"]!=a){this[d+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),g=(new google.picker.DocsView).setIncludeFolders(!0),l=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),m=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),g.setMimeTypes("*/*"),l.setMimeTypes("*/*")):
-(a.setMimeTypes(this.mimeTypes),g.setMimeTypes(this.mimeTypes),l.setMimeTypes(this.mimeTypes));this[d]=(new google.picker.PickerBuilder).setOAuthToken(this[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(g).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED).addView(m).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
+mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[d].setVisible(!1))});if(null==this[d]||this[d+"Token"]!=a){this[d+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),g=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),g.setMimeTypes("*/*"),k.setMimeTypes("*/*")):
+(a.setMimeTypes(this.mimeTypes),g.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[d]=(new google.picker.PickerBuilder).setOAuthToken(this[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(g).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
"click",e);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",e);this[d].setVisible(!0)}))};
DriveClient.prototype.pickFolder=function(a){this.folderPickerCallback=a;var b=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,b=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",b),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=
a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=
@@ -8088,123 +8111,133 @@ a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.View
DriveClient.prototype.pickLibrary=function(a){this.filePickerCallback=a;this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED?this.filePickerCallback(a.docs[0].id):a.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&
(mxEvent.removeListener(document,"click",a),this.libraryPicker.setVisible(!1))}),c=gapi.auth.getToken().access_token;if(null==this.libraryPicker||this.libraryPickerToken!=c){this.libraryPickerToken=c;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),d=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
e=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(d).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g).setCallback(mxUtils.bind(this,
-function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}))};DriveClient.prototype.showPermissions=function(a){this.checkToken(mxUtils.bind(this,function(){var b=new gapi.drive.share.ShareClient(this.appId);b.setOAuthToken(gapi.auth.getToken().access_token);b.setItemIds([a]);b.showSettingsDialog()}))};DropboxFile=function(a,b,c){DrawioFile.call(this,a,b);this.stat=c};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.stat.path_display.substring(1))};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0};
+function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}))};DriveClient.prototype.showPermissions=function(a){this.checkToken(mxUtils.bind(this,function(){var b=new gapi.drive.share.ShareClient(this.appId);b.setOAuthToken(gapi.auth.getToken().access_token);b.setItemIds([a]);b.showSettingsDialog()}))};
+DriveClient.prototype.getRealtimeAge=function(a,b){var c=null!=b&&null!=b.value&&null!=b.value.modifiedDate?b.value.modifiedDate.json:null,d=0;null!=c&&0<c&&(c=new Date(c),d=(new Date(a.modifiedDate)).getTime()-c.getTime());return d};
+DriveClient.prototype.convertRealtimeFile=function(a,b,c){this.getRealtimeData(a.id,mxUtils.bind(this,function(d){var e=this.getRealtimeAge(a,d);if(0>e){var g=this.convertJsonToXml(d);console.log("converted realtime model",e,d,g);b(new DriveFile(this.ui,mxUtils.getXml(g),a))}else console.log("using newer XML file",e,d),this.getXmlFile(a,null,b,c)}),mxUtils.bind(this,function(){console.log("no realtime data, using XML file");this.getXmlFile(a,null,b,c)}))};
+DriveClient.prototype.convertJsonToXml=function(a,b){if(null==a.value||null==a.value.diagrams)throw Error("Invalid JSON: no diagrams in root map");for(var c=mxUtils.createXmlDocument().createElement("mxfile"),d=a.value.diagrams.value,e=0;e<d.length;e++)try{var g=this.decodeJsonPage(d[e].value,c.ownerDocument.createElement("diagram"),b);c.appendChild(g)}catch(k){throw Error("Error on page "+e+": "+k.stack);}return c};
+DriveClient.prototype.decodeJsonPage=function(a,b,c){if(null==a)throw Error("Invalid JSON: json for page is null");var d=new mxCodec,e=this.createJsonCell(a.root,d);if(null==e)throw Error("Invalid JSON: no root cell for page");d=d.encode(new mxGraphModel(e));this.decodeJsonViewState(a,d);c?b.appendChild(d):mxUtils.setTextContent(b,this.ui.editor.graph.compressNode(d));null!=a.id?b.setAttribute("id",a.id.json):this.node.setAttribute("id",Editor.guid());null!=a.name&&b.setAttribute("name",a.name.json);
+return b};
+DriveClient.prototype.decodeJsonViewState=function(a,b){var c=null!=a.pageFormat?a.pageFormat.json:null;null!=c&&0<c.length&&(c=c.split(","),1<c.length&&(b.setAttribute("pageWidth",c[0]),b.setAttribute("pageHeight",c[1])));c=null!=a.backgroundColor?a.backgroundColor.json:null;null!=c&&0<c.length&&b.setAttribute("background",c);c=null!=a.backgroundImage?a.backgroundImage.json:null;null!=c&&0<c.length&&b.setAttribute("backgroundImage",c);b.setAttribute("fold",null!=a.foldingEnabled?a.foldingEnabled.json:"0");
+b.setAttribute("pageScale",null!=a.pageScale?a.pageScale.json:mxGraph.prototype.pageScale);b.setAttribute("math",null!=a.mathEnabled?a.mathEnabled.json:"0");b.setAttribute("shadow",null!=a.shadowVisible?a.shadowVisible.json:"0");return b};
+DriveClient.prototype.createJsonCell=function(a,b){if(null!=a&&null!=a.id){var c=a.value,d=this.jsonToCell(c,b);b.putObject(a.id,d);d.source=null!=c.source?this.createJsonCell(c.source,b):null;d.target=null!=c.target?this.createJsonCell(c.target,b):null;this.createJsonCell(c.parent,b);for(var e=0;e<c.children.value.length;e++){var g=this.createJsonCell(c.children.value[e],b);if(null!=g)d.insert(g);else throw Error("Invalid JSON: no child "+e+" for cell "+a.id);}return d}return null!=a&&null!=a.ref?
+b.objects[a.ref]:null};
+DriveClient.prototype.jsonToCell=function(a,b){var c=new mxCell;c.id=a.cellId.json;c.vertex="vertex"==a.type.json;c.edge="edge"==a.type.json;c.connectable="0"!=a.connectable.json;c.collapsed="1"==a.collapsed.json;c.visible="0"!=a.visible.json;c.style=null!=a.style?a.style.json:null;c.value=null!=a.xmlValue?mxUtils.parseXml(a.xmlValue.json).documentElement:null!=a.value?a.value.json:null;c.geometry=null!=a.geometry?b.decode(mxUtils.parseXml(a.geometry.json).documentElement):null;return c};DropboxFile=function(a,b,c){DrawioFile.call(this,a,b);this.stat=c};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.stat.path_display.substring(1))};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0};
DropboxFile.prototype.save=function(a,b,c){this.doSave(this.getTitle(),b,c)};DropboxFile.prototype.saveAs=function(a,b,c){this.doSave(a,b,c)};DropboxFile.prototype.doSave=function(a,b,c){var d=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,arguments);this.stat.name=d;this.saveFile(a,!1,b,c)};
-DropboxFile.prototype.saveFile=function(a,b,c,d){this.isEditable()?this.savingFile?null!=d&&d({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,l=this.isModified(),m=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return l}});m();var n=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=e;this.stat=a;this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(l||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){m();b()}}d(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=this?this.getData():null):n(this.getData())}else null!=
+DropboxFile.prototype.saveFile=function(a,b,c,d){this.isEditable()?this.savingFile?null!=d&&d({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,k=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});l();var m=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=e;this.stat=a;this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(k||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}d(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!=
d&&d()}),this.getTitle()==a?b(!0):this.ui.dropbox.checkExists(a,b)):null!=c&&c()};DropboxFile.prototype.rename=function(a,b,c){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(d){this.hasSameExtension(a,this.getTitle())?(this.stat=d,this.descriptorChanged(),null!=b&&b()):(this.stat=d,this.descriptorChanged(),this.save(!0,b,c))}),c)};DropboxLibrary=function(a,b,c){DropboxFile.call(this,a,b,c)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,b,c){this.saveFile(a,!1,b,c)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".html";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
DropboxClient.prototype.updateUser=function(a,b,c){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.usersGetCurrentAccount();g.then(mxUtils.bind(this,function(b){window.clearTimeout(e);d&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));g["catch"](mxUtils.bind(this,function(g){window.clearTimeout(e);d&&(null==g||401!==g.status||c?b({message:mxResources.get("accessDenied")}):(this.setUser(null),
this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)))}))};
-DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var c=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(l,m){if(d){window.onDropboxCallback=null;d=!1;try{null==l?b({message:mxResources.get("accessDenied"),retry:c}):(null!=g&&g(),this.client.setAccessToken(l),
-this.setUser(null),e&&this.setPersistentToken(l),a())}catch(n){b(n)}finally{null!=m&&m.close()}}else null!=m&&m.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){d&&(window.onDropboxCallback=null,d=!1,b({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else b({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,b,c){var d=mxUtils.bind(this,function(g){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(m);l&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var c=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,l){if(d){window.onDropboxCallback=null;d=!1;try{null==k?b({message:mxResources.get("accessDenied"),retry:c}):(null!=g&&g(),this.client.setAccessToken(k),
+this.setUser(null),e&&this.setPersistentToken(k),a())}catch(m){b(m)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){d&&(window.onDropboxCallback=null,d=!1,b({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else b({code:App.ERROR_BUSY})};
+DropboxClient.prototype.executePromise=function(a,b,c){var d=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);k&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
g?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},c)})}):this.authenticate(function(){d(!0)},c)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},c,a):d(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},c):e(!1)};DropboxClient.prototype.getLibrary=function(a,b,c){this.getFile(a,b,c,!0)};
-DropboxClient.prototype.getFile=function(a,b,c,d){d=null!=d?d:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var g=mxUtils.bind(this,function(){var d=a.split("/");this.ui.convertFile(a,0<d.length?d[d.length-1]:a,null,this.extension,b,c)});null!=this.token?g():this.authenticate(g,c)}else g={path:"/"+a},null!=urlParams.rev&&(g.rev=urlParams.rev),this.readFile(g,mxUtils.bind(this,function(c,g){var l=e?c.lastIndexOf(","):
--1,f=null;0<l&&(l=this.ui.extractGraphModelFromPng(c.substring(l+1)),null!=l&&0<l.length?c=l:f=new LocalFile(this,c,a,!0));b(null!=f?f:d?new DropboxLibrary(this.ui,c,g):new DropboxFile(this.ui,c,g))}),c,e)};
-DropboxClient.prototype.readFile=function(a,b,c,d){var e=mxUtils.bind(this,function(l){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});f.then(mxUtils.bind(this,function(a){}));f["catch"](function(a){window.clearTimeout(n);m&&null!=a&&409==a.status&&(m=!1,c({message:mxResources.get("fileNotFound")}))});f=this.client.filesDownload(a);f.then(mxUtils.bind(this,
-function(a){window.clearTimeout(n);if(m){m=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(q){c(q)}}}));f["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(m=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},
+DropboxClient.prototype.getFile=function(a,b,c,d){d=null!=d?d:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var g=mxUtils.bind(this,function(){var d=a.split("/");this.ui.convertFile(a,0<d.length?d[d.length-1]:a,null,this.extension,b,c)});null!=this.token?g():this.authenticate(g,c)}else g={path:"/"+a},null!=urlParams.rev&&(g.rev=urlParams.rev),this.readFile(g,mxUtils.bind(this,function(c,g){var k=e?c.lastIndexOf(","):
+-1,f=null;0<k&&(k=this.ui.extractGraphModelFromPng(c.substring(k+1)),null!=k&&0<k.length?c=k:f=new LocalFile(this,c,a,!0));b(null!=f?f:d?new DropboxLibrary(this.ui,c,g):new DropboxFile(this.ui,c,g))}),c,e)};
+DropboxClient.prototype.readFile=function(a,b,c,d){var e=mxUtils.bind(this,function(k){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});f.then(mxUtils.bind(this,function(a){}));f["catch"](function(a){window.clearTimeout(m);l&&null!=a&&409==a.status&&(l=!1,c({message:mxResources.get("fileNotFound")}))});f=this.client.filesDownload(a);f.then(mxUtils.bind(this,
+function(a){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(u){c(u)}}}));f["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},
c)})}):this.authenticate(function(){e(!0)},c)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},c,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},c):g(!1)};
DropboxClient.prototype.checkExists=function(a,b,c){var d=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(d,mxUtils.bind(this,function(d){c?b(!1,!0,d):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b(!0,!0,d)},function(){b(!1,!0,d)})}),function(a){b(!0,!1)})};
-DropboxClient.prototype.renameFile=function(a,b,c,d){if(/[\\\/:\?\*"\|]/.test(b))d({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=b){var e=a.stat.path_display.substring(1),g=e.lastIndexOf("/");0<g&&(b=e.substring(0,g+1)+b)}null!=a&&null!=b&&a.stat.path_lower.substring(1)!==b.toLowerCase()?this.checkExists(b,mxUtils.bind(this,function(e,g,n){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+b,autorename:!1});this.executePromise(e,
-c,d)}),g&&n.path_lower.substring(1)!==b.toLowerCase()?(g=this.client.filesDelete({path:"/"+b.toLowerCase()}),this.executePromise(g,e,d)):e()):d()})):d({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,b,c,d){this.insertFile(a,b,c,d,!0)};
+DropboxClient.prototype.renameFile=function(a,b,c,d){if(/[\\\/:\?\*"\|]/.test(b))d({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=b){var e=a.stat.path_display.substring(1),g=e.lastIndexOf("/");0<g&&(b=e.substring(0,g+1)+b)}null!=a&&null!=b&&a.stat.path_lower.substring(1)!==b.toLowerCase()?this.checkExists(b,mxUtils.bind(this,function(e,g,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+b,autorename:!1});this.executePromise(e,
+c,d)}),g&&m.path_lower.substring(1)!==b.toLowerCase()?(g=this.client.filesDelete({path:"/"+b.toLowerCase()}),this.executePromise(g,e,d)):e()):d()})):d({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,b,c,d){this.insertFile(a,b,c,d,!0)};
DropboxClient.prototype.insertFile=function(a,b,c,d,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(g){g?this.saveFile(a,b,mxUtils.bind(this,function(a){e?c(new DropboxLibrary(this.ui,b,a)):c(new DropboxFile(this.ui,b,a))}),d):d()}))};
DropboxClient.prototype.saveFile=function(a,b,c,d,e){/[\\\/:\?\*"\|]/.test(a)?d({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=b.length?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=e?e:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([b],{type:"text/plain"})}),this.executePromise(a,c,d))};
-DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=b[0].link.indexOf(this.appPath);if(0<d){var e=decodeURIComponent(b[0].link.substring(d+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(d,l){if(null!=l&&l.id==b[0].id)try{this.ui.spinner.stop(),
-a(e.substring(1),new DropboxLibrary(this.ui,d,l))}catch(m){this.ui.handleError(m)}else this.createLibrary(b[0],a,c)}),c)}else this.createLibrary(b[0],a,c)}})})};
+DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=b[0].link.indexOf(this.appPath);if(0<d){var e=decodeURIComponent(b[0].link.substring(d+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(d,k){if(null!=k&&k.id==b[0].id)try{this.ui.spinner.stop(),
+a(e.substring(1),new DropboxLibrary(this.ui,d,k))}catch(l){this.ui.handleError(l)}else this.createLibrary(b[0],a,c)}),c)}else this.createLibrary(b[0],a,c)}})})};
DropboxClient.prototype.createLibrary=function(a,b,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(d){this.insertFile(a.name,d,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),b(a.getHash().substring(1),a)}catch(g){c(g)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
DropboxClient.prototype.pickFile=function(a,b){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(b)this.ui.spinner.stop(),a(c[0].link);else{var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),e=mxUtils.bind(this,
-function(b,c){this.ui.spinner.stop();a(b,c)}),g=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&g)e(c[0].link);else{var l=c[0].link.indexOf(this.appPath);if(0<l){var m=decodeURIComponent(c[0].link.substring(l+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,function(b,f){if(null!=f&&f.id==c[0].id){var h=g?b.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+
-1)),null!=h&&0<h.length?b=h:l=new LocalFile(this,b,m,!0));a(m.substring(1),null!=l?l:new DropboxFile(this.ui,b,f))}else this.createFile(c[0],e,d)}),d,g)}else this.createFile(c[0],e,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+function(b,c){this.ui.spinner.stop();a(b,c)}),g=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&g)e(c[0].link);else{var k=c[0].link.indexOf(this.appPath);if(0<k){var l=decodeURIComponent(c[0].link.substring(k+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(b,f){if(null!=f&&f.id==c[0].id){var h=g?b.lastIndexOf(","):-1;this.ui.spinner.stop();var k=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+
+1)),null!=h&&0<h.length?b=h:k=new LocalFile(this,b,l,!0));a(l.substring(1),null!=k?k:new DropboxFile(this.ui,b,f))}else this.createFile(c[0],e,d)}),d,g)}else this.createFile(c[0],e,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
DropboxClient.prototype.createFile=function(a,b,c){var d=/(\.png)$/i.test(a.name);this.ui.loadUrl(a.link,mxUtils.bind(this,function(e){null!=e&&0<e.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var g=d?e.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(e.substring(g+1)),null!=g&&0<g.length&&(e=g));this.insertFile(a.name,e,mxUtils.bind(this,function(c){b(a.name,c)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,d)};OneDriveFile=function(a,b,c){DrawioFile.call(this,a,b);this.meta=c};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getIdOf=function(a,b){return(a.parentReference.driveId?a.parentReference.driveId+"/":"")+(b?a.parentReference.id:a.id)};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};
OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.save=function(a,b,c){this.doSave(this.getTitle(),b,c)};OneDriveFile.prototype.saveAs=function(a,b,c){this.doSave(a,b,c)};
OneDriveFile.prototype.doSave=function(a,b,c){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,b,c)};
-OneDriveFile.prototype.saveFile=function(a,b,c,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});l();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta=a;this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}d(a)}}))}else this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}));else null!=c&&c()};
+OneDriveFile.prototype.saveFile=function(a,b,c,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});k();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta=a;this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=e;this.setModified(g||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.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}));else null!=c&&c()};
OneDriveFile.prototype.rename=function(a,b,c){this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(d){this.hasSameExtension(a,this.getTitle())?(this.meta=d,this.descriptorChanged(),null!=b&&b()):(this.meta=d,this.save(!0,b,c))}),c)};OneDriveFile.prototype.move=function(a,b,c){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=b&&b(a)}),c)};OneDriveLibrary=function(a,b,c){OneDriveFile.call(this,a,b,c)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.doSave=function(a,b,c){this.saveFile(a,!1,b,c)};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,b,c){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(b,c);return a};
OneDriveClient.prototype.updateUser=function(a,b,c){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(e);d&&(200>g.getStatus()||300<=g.getStatus()?c?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),
a()))}),b)};
-OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var c=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){var l="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",l=window.open(l,"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!=l&&(window.onOneDriveCallback=mxUtils.bind(this,function(l,n){if(d){window.onOneDriveCallback=null;d=!1;try{null==l?b({message:mxResources.get("accessDenied"),retry:c}):(null!=g&&g(),this.setUser(null),this.token=l,e&&this.setPersistentToken(l),a())}catch(f){b(f)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),l.focus())}),
+OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var c=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){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,m){if(d){window.onOneDriveCallback=null;d=!1;try{null==k?b({message:mxResources.get("accessDenied"),retry:c}):(null!=g&&g(),this.setUser(null),this.token=k,e&&this.setPersistentToken(k),a())}catch(f){b(f)}finally{null!=m&&m.close()}}else null!=m&&m.close()}),k.focus())}),
mxUtils.bind(this,function(){d&&(window.onOneDriveCallback=null,d=!1,b({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else b({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.executeRequest=function(a,b,c){var d=mxUtils.bind(this,function(g){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,g?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+OneDriveClient.prototype.executeRequest=function(a,b,c){var d=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,g?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
function(){this.authenticate(function(){e(!0)},c)})}):this.authenticate(function(){d(!0)},c)):c(this.parseRequestText(a)))}),c)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},c,a):d(a)});null==this.token?this.authenticate(function(){e(!0)},c):e(!1)};OneDriveClient.prototype.getItemRef=function(a){var b=a.split("/");return 1<b.length?{driveId:b[0],id:b[1]}:{id:a}};
OneDriveClient.prototype.getItemURL=function(a,b){var c=a.split("/");return 1<c.length?(b?"":this.baseUrl)+"/drives/"+c[0]+"/items/"+c[1]:(b?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,b,c){this.getFile(a,b,c,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,b,c,d,e){e=null!=e?e:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),g=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,b,c);else{var n=!0,f=window.setTimeout(mxUtils.bind(this,function(){n=
-!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(f);if(n){var c=g?a.lastIndexOf(","):-1,h=null;0<c&&(c=this.ui.extractGraphModelFromPng(a.substring(c+1)),null!=c&&0<c.length?a=c:h=new LocalFile(this.ui,a,d.name,!0));null!=h?b(h):e?b(new OneDriveLibrary(this.ui,a,d)):b(new OneDriveFile(this.ui,a,d))}}),mxUtils.bind(this,function(a){window.clearTimeout(f);n&&c(this.parseRequestText(a))}),g||null!=d.file&&
+OneDriveClient.prototype.getFile=function(a,b,c,d,e){e=null!=e?e:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),g=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,b,c);else{var m=!0,f=window.setTimeout(mxUtils.bind(this,function(){m=
+!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(f);if(m){var c=g?a.lastIndexOf(","):-1,h=null;0<c&&(c=this.ui.extractGraphModelFromPng(a.substring(c+1)),null!=c&&0<c.length?a=c:h=new LocalFile(this.ui,a,d.name,!0));null!=h?b(h):e?b(new OneDriveLibrary(this.ui,a,d)):b(new OneDriveFile(this.ui,a,d))}}),mxUtils.bind(this,function(a){window.clearTimeout(f);m&&c(this.parseRequestText(a))}),g||null!=d.file&&
null!=d.file.mimeType&&"image/"==d.file.mimeType.substring(0,6))}}else c(this.parseRequestText(a))}),c)};OneDriveClient.prototype.renameFile=function(a,b,c,d){null!=a&&null!=b&&this.checkExists(a.getParentId(),b,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:b}),"PATCH","application/json",c,d):d()}))};
OneDriveClient.prototype.moveFile=function(a,b,c,d){b=this.getItemRef(b);var e=this.getItemRef(a);b.driveId!=e.driveId?d({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:b}),"PATCH","application/json",c,d)};OneDriveClient.prototype.insertLibrary=function(a,b,c,d,e){this.insertFile(a,b,c,d,!0,e)};
-OneDriveClient.prototype.insertFile=function(a,b,c,d,e,g){e=null!=e?e:!1;this.checkExists(g,a,!0,mxUtils.bind(this,function(l){l?(l="/me/drive/root",null!=g&&(l=this.getItemURL(g,!0)),this.writeFile(this.baseUrl+l+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?c(new OneDriveLibrary(this.ui,b,a)):c(new OneDriveFile(this.ui,b,a))}),d)):d()}))};
+OneDriveClient.prototype.insertFile=function(a,b,c,d,e,g){e=null!=e?e:!1;this.checkExists(g,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=g&&(k=this.getItemURL(g,!0)),this.writeFile(this.baseUrl+k+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?c(new OneDriveLibrary(this.ui,b,a)):c(new OneDriveFile(this.ui,b,a))}),d)):d()}))};
OneDriveClient.prototype.checkExists=function(a,b,c,d){var e="/me/drive/root";null!=a&&(e=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+e+"/children/"+b,mxUtils.bind(this,function(a){404==a.getStatus()?d(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[b]),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,b,c){var d=mxUtils.bind(this,function(d){var e=this.getItemURL(a.getId())+"/content/";this.writeFile(e,d,"PUT",null,b,c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){d(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=a?a.getData():null):d(a.getData())};
-OneDriveClient.prototype.writeFile=function(a,b,c,d,e,g){if(null!=a&&null!=b){var l=mxUtils.bind(this,function(n){var f=!0,h=window.setTimeout(mxUtils.bind(this,function(){f=!1;g({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),k=new mxXmlRequest(a,b,c);k.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});k.send(mxUtils.bind(this,function(a){window.clearTimeout(h);f&&(200<=a.getStatus()&&299>=a.getStatus()?
-e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,n?g({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},g)})}):this.authenticate(function(){l(!0)},g)):g(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(h);f&&g(this.parseRequestText(a))}))}),m=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){m(!0)},g,a):l(a)});null==this.token?
-this.authenticate(function(){m(!0)},g):m(!1)}else g({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(c){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(b){a(b)})};
+OneDriveClient.prototype.writeFile=function(a,b,c,d,e,g){if(null!=a&&null!=b){var k=mxUtils.bind(this,function(m){var f=!0,h=window.setTimeout(mxUtils.bind(this,function(){f=!1;g({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout),n=new mxXmlRequest(a,b,c);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(h);f&&(200<=a.getStatus()&&299>=a.getStatus()?
+e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,m?g({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){l(!0)},g)})}):this.authenticate(function(){k(!0)},g)):g(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(h);f&&g(this.parseRequestText(a))}))}),l=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){l(!0)},g,a):k(a)});null==this.token?
+this.authenticate(function(){l(!0)},g):l(!1)}else g({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(c){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(b){a(b)})};
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(b){this.token=b.accessToken;a(b)}),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(b){null!=b&&null!=b.value&&0<b.value.length&&(this.token=b.accessToken,a(OneDriveFile.prototype.getIdOf(b.value[0]),b))}),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,b,c){DrawioFile.call(this,a,b);this.meta=c};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+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.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(b){a(200<=b.getStatus()&&299>=b.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};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.save=function(a,b,c){this.doSave(this.getTitle(),b,c)};GitHubFile.prototype.saveAs=function(a,b,c){this.doSave(a,b,c)};GitHubFile.prototype.doSave=function(a,b,c){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,b,c)};
-GitHubFile.prototype.saveFile=function(a,b,c,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});l();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;
-this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());this.isModified()&&this.addUnsavedStatus();if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}d(a)}}))}else this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=
+GitHubFile.prototype.saveFile=function(a,b,c,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});k();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;
+this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());this.isModified()&&this.addUnsavedStatus();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_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=
!1;null!=d&&d()}),!1,b)}));else null!=c&&c()};GitHubLibrary=function(a,b,c){GitHubFile.call(this,a,b,c)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,b,c){this.saveFile(a,!1,b,c)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){DrawioClient.call(this,a,"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
GitHubClient.prototype.updateUser=function(a,b,c){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(g){window.clearTimeout(e);d&&(401===g.getStatus()?c?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):200>g.getStatus()||300<=g.getStatus()?b({message:mxResources.get("accessDenied")}):
(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,g.email,g.name)),a()))}))};
-GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var c=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(l,m){if(d)if(window.onGitHubCallback=null,d=!1,null==l)b({message:mxResources.get("accessDenied"),retry:c});else{var n=mxUtils.bind(this,function(){var c=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+l,mxUtils.bind(this,function(f){window.clearTimeout(d);if(c)try{if(200>f.getStatus()||300<=f.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=g&&g();var h=f.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(u){b(u)}finally{null!=m&&
-m.close()}}))});n()}else null!=m&&m.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){d&&(window.onGitHubCallback=null,d=!1,b({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else b({code:App.ERROR_BUSY})};
-GitHubClient.prototype.executeRequest=function(a,b,c){var d=mxUtils.bind(this,function(g){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),n=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+n)};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(l)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())g?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
-function(){this.authenticate(function(){e(!0)},c)})}):this.authenticate(function(){d(!0)},c);else if(403===a.getStatus()){var f=!1;try{var h=JSON.parse(a.getText());null!=h&&null!=h.errors&&0<h.errors.length&&(f="too_large"==h.errors[0].code)}catch(k){}c({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:mxResources.get("fileNotFound")}):409===a.getStatus()?c({status:409}):c({message:mxResources.get("error")+" "+a.getStatus()})}),c)}),e=mxUtils.bind(this,
+GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var c=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,l){if(d)if(window.onGitHubCallback=null,d=!1,null==k)b({message:mxResources.get("accessDenied"),retry:c});else{var m=mxUtils.bind(this,function(){var c=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(c)try{if(200>f.getStatus()||300<=f.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=g&&g();var h=f.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(p){b(p)}finally{null!=l&&
+l.close()}}))});m()}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){d&&(window.onGitHubCallback=null,d=!1,b({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else b({code:App.ERROR_BUSY})};
+GitHubClient.prototype.executeRequest=function(a,b,c){var d=mxUtils.bind(this,function(g){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())g?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+function(){this.authenticate(function(){e(!0)},c)})}):this.authenticate(function(){d(!0)},c);else if(403===a.getStatus()){var f=!1;try{var h=JSON.parse(a.getText());null!=h&&null!=h.errors&&0<h.errors.length&&(f="too_large"==h.errors[0].code)}catch(n){}c({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:mxResources.get("fileNotFound")}):409===a.getStatus()?c({status:409}):c({message:mxResources.get("error")+" "+a.getStatus()})}),c)}),e=mxUtils.bind(this,
function(a){null==this.user?this.updateUser(function(){e(!0)},c,a):d(a)});null==this.token?this.authenticate(function(){e(!0)},c):e(!1)};GitHubClient.prototype.getLibrary=function(a,b,c){this.getFile(a,b,c,!0)};
-GitHubClient.prototype.getFile=function(a,b,c,d,e){d=null!=d?d:!1;var g=a.split("/"),l=g[0],m=g[1],n=g[2];a=g.slice(3,g.length).join("/");g=/\.png$/i.test(a);!e&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g)?null!=this.token?(e=this.baseUrl+"/repos/"+l+"/"+m+"/contents/"+a+"?ref="+n+"&token="+this.token,g=a.split("/"),this.ui.convertFile(e,0<g.length?g[g.length-1]:a,null,this.extension,b,c)):c({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
-"/repos/"+l+"/"+m+"/contents/"+a+"?ref="+n,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(l,m,n,JSON.parse(a.getText()),d))}catch(h){c(h)}}),c))};
+GitHubClient.prototype.getFile=function(a,b,c,d,e){d=null!=d?d:!1;var g=a.split("/"),k=g[0],l=g[1],m=g[2];a=g.slice(3,g.length).join("/");g=/\.png$/i.test(a);!e&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g)?null!=this.token?(e=this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+m+"&token="+this.token,g=a.split("/"),this.ui.convertFile(e,0<g.length?g[g.length-1]:a,null,this.extension,b,c)):c({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+m,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(k,l,m,JSON.parse(a.getText()),d))}catch(h){c(h)}}),c))};
GitHubClient.prototype.createGitHubFile=function(a,b,c,d,e){a={org:a,repo:b,ref:c,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};b=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(d.name)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(d.name)?b="data:image/gif;base64,"+b:/\.png$/i.test(d.name)?(d=this.ui.extractGraphModelFromPng(b),b=null!=d&&0<d.length?d:"data:image/png;base64,"+b):b=Base64.decode(b));return e?new GitHubLibrary(this.ui,b,a):new GitHubFile(this.ui,
b,a)};GitHubClient.prototype.insertLibrary=function(a,b,c,d,e){this.insertFile(a,b,c,d,!0,e,!1)};
-GitHubClient.prototype.insertFile=function(a,b,c,d,e,g,l){e=null!=e?e:!1;g=g.split("/");var m=g[0],n=g[1],f=g[2],h=g.slice(3,g.length).join("/");0<h.length&&(h+="/");h+=a;this.checkExists(m+"/"+n+"/"+f+"/"+h,!0,mxUtils.bind(this,function(g,q){g?e?(l||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,n,f,h,a,b,q,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());c(this.createGitHubFile(m,n,f,b.content,e))}catch(y){d(y)}}),d)}),d)):c(new GitHubFile(this.ui,
-b,{org:m,repo:n,ref:f,name:a,path:h,sha:q,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,b,c,d){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
-GitHubClient.prototype.writeFile=function(a,b,c,d,e,g,l,m,n){g.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(c={path:d,branch:decodeURIComponent(c),message:e,content:g},null!=l&&(c.sha=l),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+d,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){m(a)}),n))};
+GitHubClient.prototype.insertFile=function(a,b,c,d,e,g,k){e=null!=e?e:!1;g=g.split("/");var l=g[0],m=g[1],f=g[2],h=g.slice(3,g.length).join("/");0<h.length&&(h+="/");h+=a;this.checkExists(l+"/"+m+"/"+f+"/"+h,!0,mxUtils.bind(this,function(g,u){g?e?(k||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,m,f,h,a,b,u,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());c(this.createGitHubFile(l,m,f,b.content,e))}catch(y){d(y)}}),d)}),d)):c(new GitHubFile(this.ui,
+b,{org:l,repo:m,ref:f,name:a,path:h,sha:u,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,b,c,d){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,b,c,d,e,g,k,l,m){g.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(c={path:d,branch:decodeURIComponent(c),message:e,content:g},null!=k&&(c.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+d,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),m))};
GitHubClient.prototype.checkExists=function(a,b,c){this.getFile(a,mxUtils.bind(this,function(d){if(b&&null!=d.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();c(!0,d.meta.sha)},function(){e();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,b,c){var d=a.meta.org,e=a.meta.repo,g=a.meta.ref,l=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(m){var n=mxUtils.bind(this,function(f,h){this.writeFile(d,e,g,l,m,h,f,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),
-mxResources.get("cancel"),mxUtils.bind(this,function(){c()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+e+"/"+g+"/"+l,mxUtils.bind(this,function(a){n(a.meta.sha,h)}),mxUtils.bind(this,function(){n(null,h)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):c(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(l)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){n(a.meta.sha,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null):n(a.meta.sha,
+GitHubClient.prototype.saveFile=function(a,b,c){var d=a.meta.org,e=a.meta.repo,g=a.meta.ref,k=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(f,h){this.writeFile(d,e,g,k,l,h,f,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("externalChanges"),mxResources.get("fileChangedOverwrite"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){c()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+e+"/"+g+"/"+k,mxUtils.bind(this,function(a){m(a.meta.sha,h)}),mxUtils.bind(this,function(){m(null,h)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):c(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(k)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.sha,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null):m(a.meta.sha,
Base64.encode(a.getData()))}),mxUtils.bind(this,function(){c()}))};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,b){var c=null,d=null,e=null,g=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.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";l.appendChild(m);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height="194px";
-l.appendChild(n);var f=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){b(c+"/"+d+"/"+encodeURIComponent(e)+"/"+g)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var h=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}),k=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(h(c+
-"/"+d,mxUtils.bind(this,function(){g=null;A()})));a||(mxUtils.write(b," / "),b.appendChild(h(decodeURIComponent(e),mxUtils.bind(this,function(){g=null;y()}))));if(null!=g&&0<g.length){var f=g.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(h(f[a],mxUtils.bind(this,function(){g=f.slice(0,a+1).join("/");u()})))})(a)}n.appendChild(b)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
-(g=e=d=c=null,A()):this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var l=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+d+"/contents/"+g+"?ref="+encodeURIComponent(e),null,"GET");f.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(l,mxUtils.bind(this,function(f){k();this.ui.spinner.stop();var l=JSON.parse(f.getText());n.appendChild(h("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,A();else{var a=g.split("/");
-g=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(n);null==l||0==l.length?mxUtils.write(n,mxResources.get("noFiles")):(f=mxUtils.bind(this,function(f){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(l){f==("dir"==l.type)&&(n.appendChild(h(l.name+("dir"==l.type?"/":""),mxUtils.bind(this,function(){"dir"==l.type?(g=l.path,u()):a&&"file"==l.type&&(this.ui.hideDialog(),b(c+"/"+d+"/"+encodeURIComponent(e)+"/"+l.path))}))),mxUtils.br(n))})(l[k])}),f(!0),a&&f(!1))}),q)}),p=null,v=null,y=mxUtils.bind(this,
-function(a){null==a&&(n.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+d+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(n,
-"scroll",v);y(a+1)});mxEvent.addListener(p,"click",l);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(k(!0),n.appendChild(h("../ [Up]",mxUtils.bind(this,function(){g=null;A()}))),mxUtils.br(n));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){n.appendChild(h(a.name,mxUtils.bind(this,function(){e=a.name;g="";u()})));mxUtils.br(n)})(b[c]);100==b.length&&(n.appendChild(p),
-v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&l()},mxEvent.addListener(n,"scroll",v))}}),q)}),A=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");
-mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",v);A(a+1)});mxEvent.addListener(p,"click",l);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(h(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 b=a.split("/");if(1<b.length){a=b[0];var f=b[1];3>b.length?(c=a,d=f,g=e=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+f+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;d=a.meta.repo;e=decodeURIComponent(a.meta.ref);g="";u()}),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(n),mxUtils.br(n));for(var f=0;f<b.length;f++)mxUtils.bind(this,function(a){n.appendChild(h(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;d=a.name;e=a.default_branch;g="";u()})));mxUtils.br(n)})(b[f])}100==b.length&&(n.appendChild(p),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&l()},mxEvent.addListener(n,"scroll",
-v))}),q)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,c){DrawioFile.call(this,a,b);this.meta=c;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};
+GitHubClient.prototype.showGitHubDialog=function(a,b){var c=null,d=null,e=null,g=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px";
+k.appendChild(m);var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){b(c+"/"+d+"/"+encodeURIComponent(e)+"/"+g)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var h=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 b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(h(c+
+"/"+d,mxUtils.bind(this,function(){g=null;B()})));a||(mxUtils.write(b," / "),b.appendChild(h(decodeURIComponent(e),mxUtils.bind(this,function(){g=null;y()}))));if(null!=g&&0<g.length){var f=g.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(h(f[a],mxUtils.bind(this,function(){g=f.slice(0,a+1).join("/");p()})))})(a)}m.appendChild(b)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
+(g=e=d=c=null,B()):this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+d+"/contents/"+g+"?ref="+encodeURIComponent(e),null,"GET");f.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(f){n();this.ui.spinner.stop();var k=JSON.parse(f.getText());m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,B();else{var a=g.split("/");
+g=a.slice(0,a.length-1).join("/");p()}})));mxUtils.br(m);null==k||0==k.length?mxUtils.write(m,mxResources.get("noFiles")):(f=mxUtils.bind(this,function(f){for(var l=0;l<k.length;l++)mxUtils.bind(this,function(k){f==("dir"==k.type)&&(m.appendChild(h(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(g=k.path,p()):a&&"file"==k.type&&(this.ui.hideDialog(),b(c+"/"+d+"/"+encodeURIComponent(e)+"/"+k.path))}))),mxUtils.br(m))})(k[l])}),f(!0),a&&f(!1))}),u)}),q=null,v=null,y=mxUtils.bind(this,
+function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+d+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,
+"scroll",v);y(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){g=null;B()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(h(a.name,mxUtils.bind(this,function(){e=a.name;g="";p()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(q),
+v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",v))}}),u)}),B=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");
+mxUtils.write(q,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",v);B(a+1)});mxEvent.addListener(q,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(h(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 b=a.split("/");if(1<b.length){a=b[0];var f=b[1];3>b.length?(c=a,d=f,g=e=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+f+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;d=a.meta.repo;e=decodeURIComponent(a.meta.ref);g="";p()}),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(m),mxUtils.br(m));for(var f=0;f<b.length;f++)mxUtils.bind(this,function(a){m.appendChild(h(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;d=a.name;e=a.default_branch;g="";p()})));mxUtils.br(m)})(b[f])}100==b.length&&(m.appendChild(q),v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",
+v))}),u)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,c){DrawioFile.call(this,a,b);this.meta=c;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.save=function(a,b,c){this.doSave(this.getTitle(),b,c)};TrelloFile.prototype.saveAs=function(a,b,c){this.doSave(a,b,c)};TrelloFile.prototype.doSave=function(a,b,c){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,b,c)};
-TrelloFile.prototype.saveFile=function(a,b,c,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 e=this.isModified,g=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});l();this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.savingFile=!1;this.isModified=e;this.meta=g;this.contentChanged();null!=c&&c();0<this.saveNeededCounter&&
-(this.saveNeededCounter--,this.saveFile(a,b,c,d))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}d(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
+TrelloFile.prototype.saveFile=function(a,b,c,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 e=this.isModified,g=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.savingFile=!1;this.isModified=e;this.meta=g;this.contentChanged();null!=c&&c();0<this.saveNeededCounter&&
+(this.saveNeededCounter--,this.saveFile(a,b,c,d))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||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(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
b,c,d))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e)}));else null!=c&&c()};TrelloLibrary=function(a,b,c){TrelloFile.call(this,a,b,c)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,b,c){this.saveFile(a,!1,b,c)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(a,b,c){c&&this.logout();c=mxUtils.bind(this,function(c,e){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=e&&e();a()},error:function(){null!=e&&e();null!=b&&b(mxResources.get("loggedOut"))}})});this.isAuthorized()?c(!0):this.ui.showAuthDialog(this,!0,c)};TrelloClient.prototype.getLibrary=function(a,b,c){this.getFile(a,b,c,!1,!0)};
-TrelloClient.prototype.getFile=function(a,b,c,d,e){e=null!=e?e:!1;var g=mxUtils.bind(this,function(){var d=a.split(this.SEPARATOR),m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(d){window.clearTimeout(n);if(m){var f=/\.png$/i.test(d.name);/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+
-encodeURIComponent(d.url),d.name,d.mimeType,this.extension,b,c):(m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(c){window.clearTimeout(n);if(m){d.compoundId=a;var g=f?c.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(c.substring(g+1)),null!=g&&0<g.length&&(c=g));e?b(new TrelloLibrary(this.ui,c,d)):b(new TrelloFile(this.ui,c,d))}}),mxUtils.bind(this,
-function(a,b){window.clearTimeout(n);m&&(401==b.status?this.authenticate(g,c,!0):c())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(401==a.status?this.authenticate(g,c,!0):c())}))});this.authenticate(g,c)};TrelloClient.prototype.insertLibrary=function(a,b,c,d,e){this.insertFile(a,b,c,d,!0,e)};
-TrelloClient.prototype.insertFile=function(a,b,c,d,e,g){e=null!=e?e:!1;var l=mxUtils.bind(this,function(){var l=mxUtils.bind(this,function(l){this.writeFile(a,l,g,mxUtils.bind(this,function(a){e?c(new TrelloLibrary(this.ui,b,a)):c(new TrelloFile(this.ui,b,a))}),d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(this.ui.base64ToBlob(a,"image/png"))}),d,b):l(b)});this.authenticate(l,d)};
+TrelloClient.prototype.getFile=function(a,b,c,d,e){e=null!=e?e:!1;var g=mxUtils.bind(this,function(){var d=a.split(this.SEPARATOR),l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(d){window.clearTimeout(m);if(l){var f=/\.png$/i.test(d.name);/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+
+encodeURIComponent(d.url),d.name,d.mimeType,this.extension,b,c):(l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(c){window.clearTimeout(m);if(l){d.compoundId=a;var g=f?c.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(c.substring(g+1)),null!=g&&0<g.length&&(c=g));e?b(new TrelloLibrary(this.ui,c,d)):b(new TrelloFile(this.ui,c,d))}}),mxUtils.bind(this,
+function(a,b){window.clearTimeout(m);l&&(401==b.status?this.authenticate(g,c,!0):c())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(401==a.status?this.authenticate(g,c,!0):c())}))});this.authenticate(g,c)};TrelloClient.prototype.insertLibrary=function(a,b,c,d,e){this.insertFile(a,b,c,d,!0,e)};
+TrelloClient.prototype.insertFile=function(a,b,c,d,e,g){e=null!=e?e:!1;var k=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(k){this.writeFile(a,k,g,mxUtils.bind(this,function(a){e?c(new TrelloLibrary(this.ui,b,a)):c(new TrelloFile(this.ui,b,a))}),d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(this.ui.base64ToBlob(a,"image/png"))}),d,b):k(b)});this.authenticate(k,d)};
TrelloClient.prototype.saveFile=function(a,b,c){var d=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){this.writeFile(a.meta.name,e,d[0],function(a){Trello.del("cards/"+d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(){b(a)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(g,c,!0):c()}))},c)}),g=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,
"image/png"))}),c,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(g,c)};
-TrelloClient.prototype.writeFile=function(a,b,c,d,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),n=new FormData;n.append("key",Trello.key());n.append("token",Trello.token());n.append("file","string"===typeof b?new Blob([b]):b,a);n.append("name",
-a);var f=new XMLHttpRequest;f.responseType="json";f.onreadystatechange=mxUtils.bind(this,function(){if(4===f.readyState&&(window.clearTimeout(m),l))if(200==f.status){var a=f.response;a.compoundId=c+this.SEPARATOR+a.id;d(a)}else 401==f.status?this.authenticate(g,e,!0):e()});f.open("POST",this.baseUrl+"cards/"+c+"/attachments");f.send(n)});this.authenticate(g,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.writeFile=function(a,b,c,d,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof b?new Blob([b]):b,a);m.append("name",
+a);var f=new XMLHttpRequest;f.responseType="json";f.onreadystatechange=mxUtils.bind(this,function(){if(4===f.readyState&&(window.clearTimeout(l),k))if(200==f.status){var a=f.response;a.compoundId=c+this.SEPARATOR+a.id;d(a)}else 401==f.status?this.authenticate(g,e,!0):e()});f.open("POST",this.baseUrl+"cards/"+c+"/attachments");f.send(m)});this.authenticate(g,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(a,b){var c=null,d="@me",e=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,a?mxResources.get("selectFile"):mxResources.get("selectCard"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height=
-"194px";g.appendChild(m);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var n=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height=
-c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),f=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),h=mxUtils.bind(this,function(){e=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+"/attachments",{fields:"id,name,previews"},
-mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(n("../ [Up]",mxUtils.bind(this,function(){u()})));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(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,f,!0):
-null!=f&&f(b)}))});a()}),k=null,q=null,u=mxUtils.bind(this,function(g){null==g&&(e=0,m.innerHTML="",g=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",q);u(g+1)});mxEvent.addListener(k,"click",l);var p=mxUtils.bind(this,function(){Trello.get("search",
-{query:""==mxUtils.trim(d)?"is:open":d,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==g&&(m.appendChild(n(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,u())}),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 f=0;f<e.length;f++)mxUtils.bind(this,function(d){m.appendChild(n(d.name,mxUtils.bind(this,function(){a?(c=d.id,h()):(this.ui.hideDialog(),b(d.id))})))})(e[f]);100==e.length&&(m.appendChild(k),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&l()},mxEvent.addListener(m,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(p,f,!0):null!=f&&f({message:a.responseText})}))});p()});u()};
-TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,c,d,e,g,l,m){this.editorUi=a;this.doc=m.doc;this.rtModel=m.rt;this.chatHistory=m.chatHistory;this.chatMap=m.chatMap;this.configCollabInfo();c=document.createElement("div");c.id="mainDiv";m=document.createElement("div");m.style.padding="3px";c.appendChild(m);var n=document.createElement("div");n.style.paddingLeft="3px";n.style.paddingRight="15px";a.editor.graph.isEnabled()&&c.appendChild(n);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
-this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";m.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
-"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));n.appendChild(this.chatLineArea);n.appendChild(this.sendBtn);this.window=new mxWindow(b,c,d,e,g,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+TrelloClient.prototype.showTrelloDialog=function(a,b){var c=null,d="@me",e=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
+"194px";g.appendChild(l);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var m=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height=
+c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),f=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),h=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(m("../ [Up]",mxUtils.bind(this,function(){p()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){l.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,f,!0):
+null!=f&&f(b)}))});a()}),n=null,u=null,p=mxUtils.bind(this,function(g){null==g&&(e=0,l.innerHTML="",g=1);this.ui.spinner.spin(l,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(l,"scroll",u);p(g+1)});mxEvent.addListener(n,"click",k);var q=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(d)?"is:open":d,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==g&&(l.appendChild(m(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,p())}),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(l));for(var f=0;f<e.length;f++)mxUtils.bind(this,function(d){l.appendChild(m(d.name,mxUtils.bind(this,function(){a?(c=d.id,h()):(this.ui.hideDialog(),b(d.id))})))})(e[f]);100==e.length&&(l.appendChild(n),u=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",u))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,f,!0):null!=f&&f({message:a.responseText})}))});q()});p()};
+TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,c,d,e,g,k,l){this.editorUi=a;this.doc=l.doc;this.rtModel=l.rt;this.chatHistory=l.chatHistory;this.chatMap=l.chatMap;this.configCollabInfo();c=document.createElement("div");c.id="mainDiv";l=document.createElement("div");l.style.padding="3px";c.appendChild(l);var m=document.createElement("div");m.style.paddingLeft="3px";m.style.paddingRight="15px";a.editor.graph.isEnabled()&&c.appendChild(m);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
+this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";l.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
+"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));m.appendChild(this.chatLineArea);m.appendChild(this.sendBtn);this.window=new mxWindow(b,c,d,e,g,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.handleResize();this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.MAXIMIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,this.handleResize));if(null!=this.chatHistory){for(a=Math.max(0,this.chatHistory.length-this.chatHistoryShow);a<this.chatHistory.length;a++)this.updateChatArea(this.chatHistory.get(a));this.chatHistory.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,
function(a){this.updateChatArea(a.target.get(a.index))}))}this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_JOINED,mxUtils.bind(this,this.collaboratorListener));this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_LEFT,mxUtils.bind(this,this.collaboratorListener));null!=this.chatMap&&this.chatMap.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,mxUtils.bind(this,function(a){this.updateChatArea(a.target.get(a.property))}))}
ChatWindow.prototype.window=null;ChatWindow.prototype.doc=null;ChatWindow.prototype.chatHistory=null;ChatWindow.prototype.chatMap=null;ChatWindow.prototype.chatHistoryShow=10;ChatWindow.prototype.chatHistorySize=0;ChatWindow.prototype.setChatMap=function(a){this.chatMap=a};
@@ -8213,9 +8246,10 @@ ChatWindow.prototype.updateChatArea=function(a){a='<span style="color : '+a.coll
ChatWindow.prototype.handleResize=function(){var a=this.window.getElement(),b=this.editorUi.editor.graph.isEnabled()?70:40;this.chatArea.style.height=Math.max(0,a.offsetHeight-b)+"px";this.chatLineArea.style.width=a.offsetWidth-this.sendBtn.offsetWidth-40+"px"};
ChatWindow.prototype.collaboratorListener=function(a){if(!a.collaborator.isMe){if(a.type==gapi.drive.realtime.EventType.COLLABORATOR_JOINED)a='<span style="color : '+a.collaborator.color+';">&#x25B2</span><i>'+mxResources.get("chatJoined",[a.collaborator.displayName])+"</i>";else if(a.type==gapi.drive.realtime.EventType.COLLABORATOR_LEFT)a='<span style="color : '+a.collaborator.color+';">&#x25BC</span><i>'+mxResources.get("chatLeft",[a.collaborator.displayName])+"</i>";else return;this.chatArea.innerHTML=
this.chatArea.innerHTML+a+"<br>";this.chatArea.scrollTop=this.chatArea.scrollHeight}};ChatWindow.prototype.configCollabInfo=function(){for(var a=this.doc.getCollaborators(),b=0;b<a.length;b++){var c=a[b];c.isMe&&(this.collabColor=c.color,this.displayName=c.displayName)}};ChatWindow.prototype.destroy=function(){this.window.destroy()};ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")};App=function(a,b,c){EditorUi.call(this,a,b,null!=c?c:"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!=
+(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(l){}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.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.GOOGLE_REALTIME="0"!=urlParams["google-realtime"];
+App.GOOGLE_APIS="client,drive-share"+(App.GOOGLE_REALTIME?",drive-realtime":"");
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",doors:"/plugins/doors.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"};
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var b=document.cookie.split(";"),c=0;c<b.length;c++){var d=mxUtils.trim(b[c]);if("MODE="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie="MODE=; expires="+b.toUTCString(),localStorage.setItem(".mode",a))}return a};
@@ -8228,12 +8262,12 @@ 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(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:",
"1"==urlParams.test?"active":"inactive"))},function(a){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);">Please try refreshing.</a>';document.getElementById("geStatus").getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}})}function d(){mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||
-mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}var e=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,d,f){try{if(a!=e&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){e=a;var g=new Image,h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";g.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+
-h+"&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(x){}});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");var g=document.createElement("iframe");
-g.setAttribute("width","0");g.setAttribute("height","0");g.setAttribute("src","offline.html");document.body.appendChild(g)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var g=null!=mxSettings.settings?mxSettings.getPlugins():null,l={},m=urlParams.p;App.initPluginCallback();if(null!=m){var n="";"1"==urlParams.drawdev&&(n=document.location.protocol+"//drawhost.jgraph.com/");for(var f=m.split(";"),m=0;m<f.length;m++){var h=App.pluginRegistry[f[m]];null!=h&&null==l[h]?(l[h]=!0,mxscript(n+h)):null!=
-window.console&&console.log("Unknown plugin:",f[m])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=g&&0<g.length&&"0"!=urlParams.plugins){n=window.location.protocol+"//"+window.location.host;f=!0;for(m=0;m<g.length&&f;m++)"/"!=g[m].charAt(0)&&g[m].substring(0,n.length)!=n&&(f=!1);if(f||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",
-[g.join("\n")]).replace(/\\n/g,"\n")))for(m=0;m<g.length;m++)try{null==l[g[m]]&&(l[h]=!0,mxscript(g[m]))}catch(u){}}}"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 k=window.opener||window.parent,q=function(a){if(a.source==k)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",q),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(v){null!=window.console&&console.log("Error in configuration: "+v)}};mxEvent.addListener(window,"message",q);k.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
+mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}var e=Editor.guid(),g=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,d,f){try{if(a!=g&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){g=a;var h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=
+k+"/log?severity="+h+"&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):"")+"&sid="+e}}catch(C){}});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");var k=document.createElement("iframe");
+k.setAttribute("width","0");k.setAttribute("height","0");k.setAttribute("src","offline.html");document.body.appendChild(k)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var k=null!=mxSettings.settings?mxSettings.getPlugins():null,l={},m=urlParams.p;App.initPluginCallback();if(null!=m){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var h=m.split(";"),m=0;m<h.length;m++){var n=App.pluginRegistry[h[m]];null!=n&&null==l[n]?(l[n]=!0,mxscript(f+n)):null!=
+window.console&&console.log("Unknown plugin:",h[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){f=window.location.protocol+"//"+window.location.host;h=!0;for(m=0;m<k.length&&h;m++)"/"!=k[m].charAt(0)&&k[m].substring(0,f.length)!=f&&(h=!1);if(h||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==l[k[m]]&&(l[n]=!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 u=window.opener||window.parent,p=function(a){if(a.source==u)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",p),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(y){null!=window.console&&console.log("Error in configuration: "+y)}};mxEvent.addListener(window,"message",p);u.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";
@@ -8247,43 +8281,45 @@ App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this
if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var b=mxUtils.bind(this,function(){"undefined"!==
typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var c=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();
-this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==
-window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=c)});c()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&
-(window.DrawDropboxClientCallback=d)});d()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();
-null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",
-IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
+this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:"+App.GOOGLE_APIS,mxUtils.bind(this,function(b){null!=gapi.client&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&
+(window.DrawGapiClientCallback=c)});c()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=
+d)});d()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=
+document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),
+this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
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.checkLicense=function(){var a=this.drive.getUser(),b=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=b){var c=b.lastIndexOf("@"),d=b;0<=c&&(d=b.substring(c+1),b=this.crc32(b.substring(0,c))+"@"+d);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&email="+encodeURIComponent(b)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
-a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var c=JSON.parse(b);null!=c&&this.handleLicense(c,d)}}}catch(m){}}))}};
-App.prototype.handleLicense=function(a,b){var c=document.getElementById("geFooter"),d=null;if(null!=c&&null!=a)if(d=a.expiry,null!=a.footer)c.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=d&&"never"!=d){var e=new Date(Date.parse(d)),g=Math.round((e-Date.now())/864E5);if(90>g){var l="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);c.style.height="100%";c.style.margin="0px";c.style.display=
-"";0>g?(this.footerHeight=80,c.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+l+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,c.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-l+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return d};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
+a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var c=JSON.parse(b);null!=c&&this.handleLicense(c,d)}}}catch(l){}}))}};
+App.prototype.handleLicense=function(a,b){var c=document.getElementById("geFooter"),d=null;if(null!=c&&null!=a)if(d=a.expiry,null!=a.footer)c.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=d&&"never"!=d){var e=new Date(Date.parse(d)),g=Math.round((e-Date.now())/864E5);if(90>g){var k="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);c.style.height="100%";c.style.margin="0px";c.style.display=
+"";0>g?(this.footerHeight=80,c.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+k+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,c.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+k+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return d};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?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 b=this.getRecent();if(null==b)b=[];else for(var c=0;c<b.length;c++)b[c].id==a.id&&b.splice(c,1);null!=b&&(b.unshift(a),b=b.slice(0,5),localStorage.setItem(".recent",JSON.stringify(b)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(b){}return null}};
App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(b){}};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.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&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,b=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=b&&(a=(null!=b.getTitle()?b.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],b,c=0;256>c;c++){b=c;for(var d=0;8>d;d++)b=b&1?3988292384^b>>>1:b>>>1;a[c]=b}return a};
App.prototype.getThumbnail=function(a,b){var c=!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()),e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.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);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,d),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),m=d.getGraphBounds(),n=a/m.width,n=Math.min(1,Math.min(3*a/(4*m.height),n)),f=Math.floor(m.x),h=Math.floor(m.y);l.setAttribute("width",Math.ceil(n*(m.width+4)));l.setAttribute("height",Math.ceil(n*(m.height+4)));var k=l.getContext("2d");
-k.scale(n,n);k.translate(-f,-h);var q=d.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";k.save();k.fillStyle=q;k.fillRect(f,h,Math.ceil(m.width+4),Math.ceil(m.height+4));k.restore();var u=new mxJsCanvas(l),p=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var v=new mxImageExport;v.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())};v.drawText=function(a,
-b){};v.drawState(d.getView().getState(d.model.root),p);p.finish(mxUtils.bind(this,function(){v.drawState(d.getView().getState(d.model.root),u);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);b(l)}));c=!0}}catch(y){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}return c};
+function(a){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,d),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),l=d.getGraphBounds(),m=a/l.width,m=Math.min(1,Math.min(3*a/(4*l.height),m)),f=Math.floor(l.x),h=Math.floor(l.y);k.setAttribute("width",Math.ceil(m*(l.width+4)));k.setAttribute("height",Math.ceil(m*(l.height+4)));var n=k.getContext("2d");
+n.scale(m,m);n.translate(-f,-h);var u=d.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";n.save();n.fillStyle=u;n.fillRect(f,h,Math.ceil(l.width+4),Math.ceil(l.height+4));n.restore();var p=new mxJsCanvas(k),q=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var v=new mxImageExport;v.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())};v.drawText=function(a,
+b){};v.drawState(d.getView().getState(d.model.root),q);q.finish(mxUtils.bind(this,function(){v.drawState(d.getView().getState(d.model.root),p);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);b(k)}));c=!0}}catch(y){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}return c};
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(b,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(c)if(isLocalStorage)localStorage.setItem(".mode",b);else if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+1);document.cookie="MODE="+b+"; expires="+d.toUTCString()}null!=this.appIcon&&(d=this.getCurrentFile(),b=null!=d?d.getMode():null,b==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):b==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):b==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"))}})();
-App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var b=this.getCurrentFile(),c=null!=b?b.getMode():null;c==App.MODE_GOOGLE?null!=b.desc&&0<b.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+b.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):c==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):c==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):c==App.MODE_TRELLO?this.openLink("https://trello.com/"):
-c==App.MODE_GITHUB&&(null!=b&&b.constructor==GitHubFile?this.openLink(b.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.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var b=this.getCurrentFile(),c=null!=b?b.getMode():null;c==App.MODE_GOOGLE?null!=b.desc&&null!=b.desc.parents&&0<b.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+b.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):c==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):c==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):c==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):c==App.MODE_GITHUB&&(null!=b&&b.constructor==GitHubFile?this.openLink(b.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 b=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(b.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,e){this.spinner.stop();null==b&&(b=urlParams.title,e=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
-1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,e))}))}}catch(c){}};
-App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
+App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:"+App.GOOGLE_APIS,mxUtils.bind(this,function(b){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(){})};
+App.prototype.showRefreshDialog=function(a,b){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(a||mxResources.get("error"),b||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()})))};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var b=document.createElement("div");b.className="geAlert";b.style.zIndex=2E9;b.style.left="50%";b.style.top="-100%";mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
mxResources.get("close"));a.innerHTML=mxResources.get("close");b.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=b.parentNode&&(b.parentNode.removeChild(b),mxEvent.consume(a))});document.body.appendChild(b);window.setTimeout(function(){b.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(b.style,"transition","all 2s ease");b.style.opacity="0";window.setTimeout(function(){null!=b.parentNode&&b.parentNode.removeChild(b)},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(m){null!=document.body&&this.handleError(m,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(l){null!=document.body&&this.handleError(l,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,d){d.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(f){}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 d=this.getDraft(),n=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;
-this.createFile(this.defaultFilename,n,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var b=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=b&&0<b.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&
+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(f){}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 d=this.getDraft(),m=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;
+this.createFile(this.defaultFilename,m,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var b=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=b&&0<b.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&
(window.location.search=this.getSearch(["create","title"]))}),d=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()}}),b=decodeURIComponent(b);if("http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8))try{null!=
window.opener&&null!=window.opener[b]?d(window.opener[b]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}else this.loadTemplate(b,function(a){d(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),c)}))}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=
@@ -8299,28 +8335,28 @@ gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.sou
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 b=this.getPeerForMode(a);if(null!=b)b.pickFile();else if(a==App.MODE_DEVICE&&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.openFiles(c.files)}));c.click()}else{this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d=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 e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;g.apply(e,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 b=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!=b&&b.pickLibrary(mxUtils.bind(this,function(a,c){if(null!=c)try{this.loadLibrary(c)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(m){this.handleError(m,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 c=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(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}else{var d=document.createElement("input");
-d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files)for(var a=0;a<d.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(n){this.handleError(n,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(d.files[a])}));d.click()}};
-App.prototype.saveLibrary=function(a,b,c,d,e,g,l){d=null!=d?d:this.mode;e=null!=e?e:!1;g=null!=g?g:!1;var m=this.createLibraryDataFromImages(b),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=l&&l();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==c&&d==App.MODE_DEVICE&&(c=new LocalLibrary(this,m,a));if(null==c)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-m,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),n,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),n,c):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,m,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),n,c):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),n,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,b)}),n,c):d==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var c=new StorageLibrary(this,m,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),n)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(m);var f=mxUtils.bind(this,
-function(){c.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(c,b);null!=l&&l()}),n)});if(a!=c.getTitle()){var h=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&h!=c.getHash()&&(mxSettings.removeCustomLibrary(h),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(h);f()}),n)}else f()}};
-App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var c=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var d=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,g=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var l=4>=a?2:6<a?4:3,d=new CreateDialog(this,
+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 b=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!=b&&b.pickLibrary(mxUtils.bind(this,function(a,c){if(null!=c)try{this.loadLibrary(c)}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,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 c=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(k){this.handleError(k,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}else{var d=document.createElement("input");
+d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files)for(var a=0;a<d.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(m){this.handleError(m,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(d.files[a])}));d.click()}};
+App.prototype.saveLibrary=function(a,b,c,d,e,g,k){d=null!=d?d:this.mode;e=null!=e?e:!1;g=null!=g?g:!1;var l=this.createLibraryDataFromImages(b),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==c&&d==App.MODE_DEVICE&&(c=new LocalLibrary(this,l,a));if(null==c)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+l,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,c):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,c):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,b)}),m,c):d==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var c=new StorageLibrary(this,l,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),m)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(l);var f=mxUtils.bind(this,
+function(){c.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(c,b);null!=k&&k()}),m)});if(a!=c.getTitle()){var h=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&h!=c.getHash()&&(mxSettings.removeCustomLibrary(h),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(h);f()}),m)}else f()}};
+App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var c=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var d=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,g=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var k=4>=a?2:6<a?4:3,d=new CreateDialog(this,
d,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==g&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,c)):"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)):g!=b?this.pickFolder(b,mxUtils.bind(this,function(d){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
-/(\.html)$/i.test(a)),null,b,c,null==this.mode,d)})):null!=b&&this.save(a,c))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,l);this.showDialog(d.container,460,a>l?390:270,!0,!0);d.init()}else this.save(b.getTitle(),c)}};
+/(\.html)$/i.test(a)),null,b,c,null==this.mode,d)})):null!=b&&this.save(a,c))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,k);this.showDialog(d.container,460,a>k?390:270,!0,!0);d.init()}else this.save(b.getTitle(),c)}};
App.prototype.loadTemplate=function(a,b,c){var d=a;this.isCorsEnabledForUrl(d)||(d="t="+(new Date).getTime(),d=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+d);this.loadUrl(d,mxUtils.bind(this,function(d){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(a){b(a)},c,a):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,a)?this.parseFile(new Blob([d],{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)}),a):this.isLucidChartData(d)?this.convertLucidChart(d,mxUtils.bind(this,function(a){b(a)}),mxUtils.bind(this,function(a){c(a)})):(/(\.png)($|\?)/i.test(a)&&(d=this.extractGraphModelFromPng(d)),b(d))}),c,/(\.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,b,c,d,e,g,l,m){d=m?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var n=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){n();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(d==App.MODE_GOOGLE&&null!=this.drive)null==l&&null!=this.stateArg&&null!=this.stateArg.folderId&&(l=this.stateArg.folderId),
-this.drive.insertFile(a,b,l,mxUtils.bind(this,function(a){n();this.fileCreated(a,c,g,e)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){n();this.fileCreated(a,c,g,e)}),f,!1,l);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,b,mxUtils.bind(this,function(a){n();this.fileCreated(a,c,g,e)}),f,!1,l);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){n();this.fileCreated(a,
-c,g,e)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){n();this.fileCreated(a,c,g,e)}),f,!1,l);else if(d==App.MODE_BROWSER){n();var h=mxUtils.bind(this,function(){var d=new StorageFile(this,b,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,c,g,e)}),f)});null==localStorage.getItem(a)?h():this.confirm(mxResources.get("replaceIt",[a]),h,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else n(),
-this.fileCreated(new LocalFile(this,b,a,null==d),c,g,e)}catch(k){n(),this.handleError(k)}}};
-App.prototype.fileCreated=function(a,b,c,d){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var g=a.getData(),g=0<g.length?this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+e,m=g,n=null;null!=g&&/\.svg$/i.test(a.getTitle())&&(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(n.container),m=this.decodeNodeIntoGraph(m,n));a.setData(this.createFileData(g,n,a,l));null!=n&&n.container.parentNode.removeChild(n.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),h=mxUtils.bind(this,function(){f();var g=this.getCurrentFile();null==c&&null!=g&&(c=!g.isModified()&&null==g.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));
-null!=b&&this.sidebar.showEntries(b)}),l=mxUtils.bind(this,function(){c||null==g||!g.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==c||c?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=d&&d(),window.openWindow(e,null,l))});a.constructor==LocalFile||a.constructor==DriveFile?
+App.prototype.createFile=function(a,b,c,d,e,g,k,l){d=l?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(d==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
+this.drive.insertFile(a,b,k,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,g,e)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,g,e)}),f,!1,k);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,g,e)}),f,!1,k);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,
+c,g,e)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,g,e)}),f,!1,k);else if(d==App.MODE_BROWSER){m();var h=mxUtils.bind(this,function(){var d=new StorageFile(this,b,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,c,g,e)}),f)});null==localStorage.getItem(a)?h():this.confirm(mxResources.get("replaceIt",[a]),h,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else m(),
+this.fileCreated(new LocalFile(this,b,a,null==d),c,g,e)}catch(n){m(),this.handleError(n)}}};
+App.prototype.fileCreated=function(a,b,c,d){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var g=a.getData(),g=0<g.length?this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,!0):null,k=window.location.protocol+"//"+window.location.hostname+e,l=g,m=null;null!=g&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
+document.body.appendChild(m.container),l=this.decodeNodeIntoGraph(l,m));a.setData(this.createFileData(g,m,a,k));null!=m&&m.container.parentNode.removeChild(m.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),h=mxUtils.bind(this,function(){f();var g=this.getCurrentFile();null==c&&null!=g&&(c=!g.isModified()&&null==g.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));
+null!=b&&this.sidebar.showEntries(b)}),k=mxUtils.bind(this,function(){c||null==g||!g.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==c||c?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=d&&d(),window.openWindow(e,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?
h():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){h()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}};
App.prototype.loadFile=function(a,b,c,d){this.hideDialog();var e=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 e=localStorage.getItem(a);if(null!=e)this.fileLoaded(new StorageFile(this,e,a)),null!=d&&d();else throw{message:mxResources.get("fileNotFound")};}catch(h){this.handleError(h,
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!=c)this.spinner.stop(),this.fileLoaded(c),null!=d&&d();else if("S"==a.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(this.editor.graph.decompress(a.substring(1))),
@@ -8328,20 +8364,20 @@ d,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoading
f=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.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"+g.substring(31,g.lastIndexOf("&ex")),b,d),!0):!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(g,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 d=g,e=g.lastIndexOf("."),h=d.lastIndexOf("/");e>h&&0<h&&(d=d.substring(h+1,e),e=g.substring(e),this.useCanvasForExport||".png"!=e||(e=".xml"),".svg"===e||".xml"===e||".html"===e||".png"===e)&&(c=d+e)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||f()}}),mxUtils.bind(this,function(){f()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}))}else e=null,"G"==a.charAt(0)?e=this.drive:"D"==a.charAt(0)?e=this.dropbox:"W"==a.charAt(0)?e=this.oneDrive:"H"==a.charAt(0)?e=this.gitHub:"T"==a.charAt(0)&&(e=this.trello),null==e?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)),
-e.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=d&&d()}),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()}))})))}),g=this.getCurrentFile(),l=mxUtils.bind(this,function(){null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),
-mxUtils.bind(this,function(){null!=g&&(window.location.hash=g.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()});null==a||0==a.length?l():null!=g&&g.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,l):l()};
+e.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=d&&d()}),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()}))})))}),g=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),
+mxUtils.bind(this,function(){null!=g&&(window.location.hash=g.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()});null==a||0==a.length?k():null!=g&&g.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
App.prototype.getLibraryStorageHint=function(a){var b=a.getTitle();a.constructor!=LocalLibrary&&(b+="\n"+a.getHash());a.constructor==DriveLibrary?b+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?b+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?b+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?b+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?b+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?b+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(b+=" ("+mxResources.get("device")+")");return b};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,d){var c=0,g=[],l=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=g[a]&&this.loadLibrary(g[a]);null!=d&&d()}});if(null!=b)for(var m=0;m<b.length;m++){var n=encodeURIComponent(decodeURIComponent(b[m]));mxUtils.bind(this,
-function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){c++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];g[d]=a;c--;l()}),f=mxUtils.bind(this,function(){a(b);c--;l()});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?e(new StorageLibrary(this,b,a)):f()}))}catch(A){f()}}),0);else if("U"==h){var m=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=m;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),m))}catch(A){f()}else f()}),function(){f()})}catch(y){f()}}}else{var n=null;"G"==h?null!=
-this.drive&&null!=this.drive.user&&(n=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(A){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
-f())}}})(n,m)}l()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,d){var c=0,g=[],k=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=g[a]&&this.loadLibrary(g[a]);null!=d&&d()}});if(null!=b)for(var l=0;l<b.length;l++){var m=encodeURIComponent(decodeURIComponent(b[l]));mxUtils.bind(this,
+function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){c++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];g[d]=a;c--;k()}),f=mxUtils.bind(this,function(){a(b);c--;k()});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?e(new StorageLibrary(this,b,a)):f()}))}catch(B){f()}}),0);else if("U"==h){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=l;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(B){f()}else f()}),function(){f()})}catch(y){f()}}}else{var m=null;"G"==h?null!=
+this.drive&&null!=this.drive.user&&(m=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(m=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(m=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(m=this.oneDrive);null!=m?m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(B){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
+f())}}})(m,l)}k()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();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",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,b){var c=this.getCurrentFile(),d=mxResources.get("saving");null!=c&&c.constructor==DriveFile&&(d=mxResources.get("createRevision"));if(null!=c&&this.spinner.spin(document.body,d)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==c&&(c.isModified()?c.isAutosave()||c.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
-b&&b()}),e=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==c.getTitle()?c.save(!0,d,e):c.saveAs(a,d,e)}};
+b&&b()}),e=mxUtils.bind(this,function(a){this.getCurrentFile()==c&&c.isModified()&&c.addUnsavedStatus();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==c.getTitle()?c.save(!0,d,e):c.saveAs(a,d,e)}};
App.prototype.pickFolder=function(a,b,c){c=null!=c?c:!0;var d=this.spinner.pause();c&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){d();if(a.action==google.picker.Action.PICKED){var c=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(c=a.docs[0].id);b(c)}})):c&&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]),
b(a))})):c&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){d();b(a)})):c&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){d();b(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
App.prototype.exportFile=function(a,b,c,d,e,g){e==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(b,d?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):e==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(b,a,g,mxUtils.bind(this,function(a){this.spinner.stop()}),
@@ -8350,10 +8386,10 @@ function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop
c():this.confirm(mxResources.get("replaceIt",[b]),c))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var b=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,b);this.fname.setAttribute("title",b+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var b=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),b,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
-App.prototype.showAuthDialog=function(a,b,c,d){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,b,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.message))}}))).container,300,b?180:140,!0,!0,mxUtils.bind(this,function(a){null!=d&&d();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,b,c,d,e,g){var l=b;/\.svg$/i.test(l)||(l=l.substring(0,b.lastIndexOf("."))+d);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.v(dx|sdx?)$/i.test(b)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);m||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,
-"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,l,!0))}),g,b)});n.send()}else{var f=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,l,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,l,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,l,!0))}catch(k){null!=g&&g(k)}});c=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=c&&"image/"==c.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
+App.prototype.showAuthDialog=function(a,b,c,d){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,b,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,b?180:140,!0,!0,mxUtils.bind(this,function(a){null!=d&&d();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,b,c,d,e,g){var k=b;/\.svg$/i.test(k)||(k=k.substring(0,b.lastIndexOf("."))+d);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.v(dx|sdx?)$/i.test(b)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);l||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(m.responseText),a=this.base64ToBlob(a.content,
+"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,k,!0))}),g,b)});m.send()}else{var f=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,k,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,k,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,k,!0))}catch(n){null!=g&&g(n)}});c=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=c&&"image/"==c.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
"data:image/png;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));f(c)}}else null!=g&&g({code:App.ERROR_UNKNOWN})}),function(){null!=g&&g({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=g&&g({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,f,g,c)}};
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?
@@ -8379,8 +8415,8 @@ Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.
(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,c,m){null!=a&&(d&&this.userPanel.appendChild(document.createElement("hr")),d=!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!=m?
-"<br><br><small>"+mxUtils.htmlEntities(m)+"</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!=c&&a.appendChild(mxUtils.button(mxResources.get("signOut"),c)),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!=
+b=mxUtils.bind(this,function(a,b,c,l){null!=a&&(d&&this.userPanel.appendChild(document.createElement("hr")),d=!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!=l?
+"<br><br><small>"+mxUtils.htmlEntities(l)+"</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!=c&&a.appendChild(mxUtils.button(mxResources.get("signOut"),c)),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=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),
@@ -8388,12 +8424,12 @@ null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else thi
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:12px;cursor:help;";
var c=document.createElement("img");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,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};var b=Menus.prototype.init;Menus.prototype.init=function(){b.apply(this,
-arguments);var a=this.editorUi,c=a.editor.graph,g=mxUtils.bind(c,c.isEnabled),l=("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),n=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+arguments);var a=this.editorUi,c=a.editor.graph,g=mxUtils.bind(c,c.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),m=("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),f=("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,e,f,g,h,l,k,m){b=parseInt(b);!isNaN(b)&&0<
-b&&a.exportSvg(b/100,c,d,e,f,g,h,!l,k,m)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,c.isSelectionEmpty()),
+"/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,e,f,g,h,k,l,m){b=parseInt(b);!isNaN(b)&&0<
+b&&a.exportSvg(b/100,c,d,e,f,g,h,!k,l,m)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,c.isSelectionEmpty()),
g=a.addCheckbox(b,mxResources.get(d?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",d?!g.checked:null,null,!f.checked,d?null:!g.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,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,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,e,f,g,h,l,k,m){a.createHtml(b,c,d,e,f,g,h,l,k,m,mxUtils.bind(this,function(b,c){var d=
+!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,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,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=
a.getBaseFilename(h),e='\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",e,"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=document.createElement("div");b.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";b.appendChild(d);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,c.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!c.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
@@ -8401,89 +8437,89 @@ null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});a.acti
DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,
fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(E){a.handleError(E)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();
for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,
-640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");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))});if("undefined"!==typeof MathJax){var h=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();c.model.execute(b)});h.setToggleAction(!0);h.setSelectedCallback(function(){return a.isMathEnabled()});h.isEnabled=g}if(isLocalStorage||mxClient.IS_CHROMEAPP)h=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),h.setToggleAction(!0),
-h.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var k=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return k.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=c.getSelectionCells(),d=[],e=0;e<b.length;e++)c.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(a,d),a.showDialog(b.container,200,250,!0,!0),b.init())},
-null,null,Editor.ctrlKey+"+Shift+M");var q="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 startStill startArrow startSize arcSize".split(" ");a.actions.addAction("copyStyle",function(){var b=c.view.getState(c.getSelectionCell());
-if(c.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=c.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],d=0;d<b.length;d++){var e=b[d],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(c.isEnabled()&&!c.isSelectionEmpty()&&null!=a.copiedStyle){c.getModel().beginUpdate();try{for(var b=c.getSelectionCells(),d=
-0;d<b.length;d++)for(var e=c.view.getState(b[d]),f=0;f<q.length;f++){var g=q[f],h=a.copiedStyle[g];e.style[g]!=h&&c.setCellStyles(g,h,[b[d]])}}finally{c.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,320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+
-"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,l,k){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!l,k)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",
-new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,l,k){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!l,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",
-null,null,b)}),!0)}));h=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){c.setShadowVisible(!c.shadowVisible)}));h.setToggleAction(!0);h.setSelectedCallback(function(){return c.shadowVisible});var u=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){u=!1}),u=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});
-a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});
-a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});h=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",
-function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));h=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),
-this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",
-new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),
-c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',
-c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");
-f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),f.value="",this.editorUi.logEvent({category:"Help",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&
-(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],d);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],d);this.addMenuItems(b,["support","-"],d);a.isOffline()||EditorUi.isElectronApp||navigator.standalone||
-"1"==urlParams.embed||this.addMenuItems(b,["downloadDesktop"],d);navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["useOffline"],d);this.addMenuItems(b,["-","about"],d)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),
-mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);
-this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],d));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=c.getGraphBounds(),b=c.view.translate,e=c.view.scale;c.insertVertex(d,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),
-this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){c.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+c.compress(mxUtils.getXml(c.encodeCells(c.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],d),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=c.getGraphBounds(),
-d=c.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/d),Math.floor((1-b.y)/d));e.scale(1/d);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var l=e.restore;e.restore=function(){g--;l.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(c.getView().getState(c.model.root),e);mxLog.show();
-mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],d),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),
-console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+
-b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel",
-"testDownloadRtModel"],d),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));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(c.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,e,f,g,h,l,k,m){a.createHtml(b,c,d,e,f,g,h,l,k,m,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 e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,
-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);f.parentNode.removeChild(f)},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,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,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,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,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=c.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-c.view.translate.y)/c.view.scale)+2,function(b,c,d,e,f,g,h,l){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+l+';" src="'+a.createLink(b,c,d,e,f,g,k)+'"></iframe>');
-a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.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)h=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),h.setToggleAction(!0),h.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,
-360,170,!0,!1)});h=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});h.setToggleAction(!0);h.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){c.isEditing()&&c.stopEditing();var d="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());
-if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,"*");"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.editorUi.actions.addAction("chatWindowTitle...",
-mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,d){function e(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,d,e){var f=c.view,g=c.getGraphBounds(),h=c.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*c.gridSize)),l=c.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*c.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,k=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,k,m){f=g?Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/m)):1;a.importFile(b,d,h,l,Math.round(k*f),Math.round(m*f),e,function(b){a.spinner.stop();
-c.setSelectionCells(b);c.scrollCellToVisible(c.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;k()}):k()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,d,h,l,0,0,e,function(b){a.spinner.stop();c.setSelectionCells(b);c.scrollCellToVisible(c.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(){e(a.drive)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},d):m&&b.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(a.oneDrive)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(a.trello)},d):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&
-"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},d);a.isOffline()||(b.addSeparator(d),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()},d))})).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),e=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(e,Editor.checkmarkImage);b.addSeparator(c);e=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(e,Editor.checkmarkImage);
-e=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(e,Editor.checkmarkImage)})));h=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()}}));h.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};h.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,
-d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;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.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash=
-"G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.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,["-","googleSites","googleDocs"],c)})));var v=function(b,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),
-c)},y=function(a,b,d,e){var f=c.isMouseInsertPoint()?c.getInsertPoint():c.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,d),e);a.vertex=!0;c.getModel().beginUpdate();try{a=c.addCell(a),c.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{c.getModel().endUpdate()}c.scrollCellToVisible(a);c.setSelectionCell(a);c.container.focus();c.editAfterInsert&&c.startEditing(a);return a};a.actions.addAction("insertText",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
-c.startEditingAtCell(y("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=g;a.actions.addAction("insertRectangle",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.addAction("insertEllipse",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&y("",
-80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;a.actions.addAction("insertRhombus",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=g;var A=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,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),
-c);b.addSeparator(c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);A(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){A(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 e=0;e<
-d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);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):l&&b.addItem(mxResources.get("googleDrive")+" ("+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.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.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):n&&b.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):f&&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);mxClient.IS_IOS||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):l&&b.addItem(mxResources.get("googleDrive")+" ("+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.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.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?
-b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):f&&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);mxClient.IS_IOS||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):l&&b.addItem(mxResources.get("googleDrive")+" ("+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.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.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},
-c):f&&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);mxClient.IS_IOS||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(E){a.handleError(E,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);"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();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],
-c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):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):(this.addMenuItems(b,["-","save","saveAs","-","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.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],
-c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var c=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign",
-"bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d)}c.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&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")};
+640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");a.actions.addAction("refresh",function(){function b(){c.setModified(!1);a.loadFile(c.getHash(),!0)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()},null,null,"Alt+Shift+R");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))});if("undefined"!==typeof MathJax){var h=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();c.model.execute(b)});
+h.setToggleAction(!0);h.setSelectedCallback(function(){return a.isMathEnabled()});h.isEnabled=g}if(isLocalStorage||mxClient.IS_CHROMEAPP)h=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),h.setToggleAction(!0),h.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&&
+a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=c.getSelectionCells(),d=[],e=0;e<b.length;e++)c.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(a,d),a.showDialog(b.container,200,250,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var u="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 startStill startArrow startSize arcSize".split(" ");
+a.actions.addAction("copyStyle",function(){var b=c.view.getState(c.getSelectionCell());if(c.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=c.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],d=0;d<b.length;d++){var e=b[d],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(c.isEnabled()&&!c.isSelectionEmpty()&&
+null!=a.copiedStyle){c.getModel().beginUpdate();try{for(var b=c.getSelectionCells(),d=0;d<b.length;d++)for(var e=c.view.getState(b[d]),f=0;f<u.length;f++){var g=u[f],h=a.copiedStyle[g];e.style[g]!=h&&c.setCellStyles(g,h,[b[d]])}}finally{c.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,
+320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
+function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));h=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){c.setShadowVisible(!c.shadowVisible)}));h.setToggleAction(!0);h.setSelectedCallback(function(){return c.shadowVisible});var p=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){p||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){p=!1}),
+p=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});h=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=
+new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
+this.tagsWindow.window.isVisible()}));h=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));
+h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,
+null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.apply(this,arguments);if(null!=
+b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&&
+a.isOffline())this.addMenuItems(b,["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+
+encodeURIComponent(b)),f.value="",this.editorUi.logEvent({category:"Help",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,
+["-","quickStart","userManual","keyboardShortcuts","-"],d);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],d);this.addMenuItems(b,["support","-"],d);a.isOffline()||EditorUi.isElectronApp||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["downloadDesktop"],d);navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["useOffline"],d);this.addMenuItems(b,["-","about"],d)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",
+mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),
+mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],d));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,
+function(){var a=c.getGraphBounds(),b=c.view.translate,d=c.view.scale;c.insertVertex(c.getDefaultParent(),null,"",a.x/d-b.x,a.y/d-b.y,a.width/d,a.height/d,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){c.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+c.compress(mxUtils.getXml(c.encodeCells(c.getSelectionCells())))+"', width, height, 'Title');"))})),
+this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],d),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=c.getGraphBounds(),d=c.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/d),Math.floor((1-b.y)/d));e.scale(1/d);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var k=
+e.restore;e.restore=function(){g--;k.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(c.getView().getState(c.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],d),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),
+this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",
+mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&
+299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],d),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-",
+"testShowConsole"]))})));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(c.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,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,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 e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft=
+"26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,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);f.parentNode.removeChild(f)},
+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,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,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,e,f,
+g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,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=c.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),
+null,"100%",Math.ceil((b.y+b.height-c.view.translate.y)/c.view.scale)+2,function(b,c,d,e,f,g,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,
+null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.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)h=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),h.setToggleAction(!0),h.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});h=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&
+(mxSettings.settings.search=!b,mxSettings.save())});h.setToggleAction(!0);h.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){c.isEditing()&&c.stopEditing();var d="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,
+"*");"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.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,d){function e(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,d,e){var f=c.view,g=c.getGraphBounds(),h=c.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*c.gridSize)),k=c.snap(Math.ceil(Math.max(0,
+(g.y+g.height)/f.scale-f.translate.y)+4*c.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,d,h,k,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();c.setSelectionCells(b);c.scrollCellToVisible(c.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=
+a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,d,h,k,0,0,e,function(b){a.spinner.stop();c.setSelectionCells(b);c.scrollCellToVisible(c.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(){e(a.drive)},d):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},d):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",
+null,function(){e(a.oneDrive)},d):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(a.trello)},d):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+
+"...",null,function(){a.importLocalFile(!0)},d);a.isOffline()||(b.addSeparator(d),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()},d))})).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),e=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(e,Editor.checkmarkImage);b.addSeparator(c);e=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");
+mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(e,
+Editor.checkmarkImage);e=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(e,Editor.checkmarkImage)})));h=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()}}));h.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};h.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,["-","googleSites","googleDocs"],c)})));var v=function(b,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow=
+"auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,d,e){var f=c.isMouseInsertPoint()?c.getInsertPoint():c.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,d),e);a.vertex=!0;c.getModel().beginUpdate();try{a=c.addCell(a),c.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{c.getModel().endUpdate()}c.scrollCellToVisible(a);c.setSelectionCell(a);c.container.focus();c.editAfterInsert&&c.startEditing(a);return a};a.actions.addAction("insertText",
+function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&c.startEditingAtCell(y("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=g;a.actions.addAction("insertRectangle",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.addAction("insertEllipse",function(){c.isEnabled()&&
+!c.isCellLocked(c.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;a.actions.addAction("insertRhombus",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=g;var B=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,
+"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),c);b.addSeparator(c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);B(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){B(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 e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);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.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+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.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):f&&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);mxClient.IS_IOS||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.gitHub&&b.addItem(mxResources.get("github")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+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.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):f&&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);mxClient.IS_IOS||
+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.gitHub&&b.addItem(mxResources.get("github")+
+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+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.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):f&&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);mxClient.IS_IOS||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(E){a.handleError(E,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);"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();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-","refresh","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):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):(this.addMenuItems(b,["-","save","saveAs","-","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.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var c=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,
+b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d)}c.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&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,c){this.ui=a;this.page=b;this.previous=this.name=c}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,c){this.ui=a;this.oldIndex=b;this.newIndex=c}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
@@ -8496,12 +8532,12 @@ EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mx
null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var c=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=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 c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),c=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight")),g=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):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!=g&&0<g.length?g:this.defaultGraphBackground,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:isNaN(c)?mxGraph.prototype.pageScale:c,pageFormat:isNaN(d)||isNaN(e)?this.pageFormat:new mxRectangle(0,0,d,d),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.createViewState=function(a){var b=a.getAttribute("page"),c=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight")),g=a.getAttribute("background"),k=a.getAttribute("backgroundImage"),k=null!=k&&0<k.length?JSON.parse(k):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!=g&&0<g.length?g:this.defaultGraphBackground,backgroundImage:null!=k?new mxImage(k.src,k.width,k.height):null,pageScale:isNaN(c)?mxGraph.prototype.pageScale:c,pageFormat:isNaN(d)||isNaN(e)?mxSettings.getPageFormat():new mxRectangle(0,0,d,e),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){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("fold",null==a||a.foldingEnabled?"1":"0");b.setAttribute("page",null==a&&this.defaultPageVisible||
-null!=a&&a.pageVisible?"1":"0");b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var c=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=c&&(b.setAttribute("pageWidth",c.width),b.setAttribute("pageHeight",c.height));b.setAttribute("background",null!=a&&null!=a.background?a.background:this.defaultGraphBackground);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",null!=a&&a.mathEnabled?
-"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0")};
+null!=a&&a.pageVisible?"1":"0");b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var c=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=c&&(b.setAttribute("pageWidth",c.width),b.setAttribute("pageHeight",c.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",
+null!=a&&a.shadowVisible?"1":"0")};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
@@ -8518,9 +8554,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 c=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
c)/this.pages.length)+1),e=null,g=0;g<this.pages.length;g++)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/>"),e=c):mxEvent.consume(b)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){e=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=e&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=e&&c!=e&&this.movePage(e,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(g,this.createTabForPage(this.pages[g],d,this.pages[g]!=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-c){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var l=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");l.style.position="absolute";l.style.right=this.editor.chromeless?"29px":"55px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=this.createControlTab(4,
-"&nbsp;&#10095;");m.style.position="absolute";m.style.right=this.editor.chromeless?"0px":"29px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var n=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=n+"px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(l,0<b.scrollLeft?100:50);mxUtils.setOpacity(m,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(l,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(m,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(l,0<b.scrollLeft?100:50);mxUtils.setOpacity(m,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-c){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var k=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");k.style.position="absolute";k.style.right=this.editor.chromeless?"29px":"55px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var l=this.createControlTab(4,
+"&nbsp;&#10095;");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=m+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,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 c=this.createTab(!0);c.style.paddingTop=a+"px";c.style.cursor="pointer";c.style.width="30px";c.style.lineHeight="30px";c.innerHTML=b;null!=c.firstChild&&null!=c.firstChild.style&&mxUtils.setOpacity(c.firstChild,40);return c};
@@ -8530,51 +8566,51 @@ null,mxUtils.bind(this,function(){this.renamePage(d,d.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,c){c=this.createTab(c);var d=a.getName();c.setAttribute("title",d);mxUtils.write(c,d);c.style.maxWidth=b+"px";c.style.width=b+"px";this.addTabListeners(a,c);42<b&&(c.style.textOverflow="ellipsis");return c};
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var c=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;e=a==this.currentPage;c.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(g){if(c.isEnabled()&&!c.isMouseDown&&(mxEvent.isTouchEvent(g)&&e||mxEvent.isPopupTrigger(g))){c.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!d){var l=new mxPopupMenu(this.createPageMenu(a));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);this.resetCurrentMenu();l.destroy()});var m=mxEvent.getClientX(g),n=mxEvent.getClientY(g);l.popup(m,n,null,g);this.setCurrentMenu(l,b)}mxEvent.consume(g)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!d){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var l=mxEvent.getClientX(g),m=mxEvent.getClientY(g);k.popup(l,m,null,g);this.setCurrentMenu(k,b)}mxEvent.consume(g)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(c,d){c.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);c.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);c.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);c.addSeparator(d);c.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,c,d){d.ui=a.ui;return c};a.afterDecode=function(a,c,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,c,d){d.ui=a.ui;return c};a.afterDecode=function(a,c,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,e){e.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(e.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&e.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,c){return 0>mxUtils.indexOf(b,
a)?c:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,e));return e};a.beforeDecode=function(a,b,e){e.ui=a.ui;e.relatedPage=e.ui.getPageById(b.getAttribute("relatedPage"));if(null==e.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));e.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(e.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(e.relatedPage.root=a.decodeCell(c,!1),e=c.nextSibling,c.parentNode.removeChild(c),c=e;null!=c;){e=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var d=c.getAttribute("id");null==a.lookup(d)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=e}}return b};a.afterDecode=function(a,b,e){e.index=e.previousIndex;return e};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,c,d,m,n){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),g=[],l=0;l<d.length;l++){var q=this.view.getState(d[l]),u=null!=q?q.style:this.getCellStyle(d[l]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[l],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[l]&&g.push(a);return a==d[l]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(d[l],a))}for(l=0;l<g.length;l++)this.model.setVisible(g[l],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b="tree"==(null!=
-b?b.style:p.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function m(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.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 n(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],p.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;p.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=p.view.getState(a),l=p.view.scale;if(null!=h){var k=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?k.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:k.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var n=p.getOutgoingEdges(p.model.getTerminal(d[0],!0));if(null!=n){for(var v=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<n.length;t++){var q=p.model.getTerminal(n[t],!1);if(f==m(q)){var u=p.view.getState(q);q!=a&&null!=u&&(v&&b!=u.getCenterX()<h.getCenterX()||!v&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(k,u)&&(d=10+Math.max(d,(Math.min(k.x+k.width,u.x+u.width)-Math.max(k.x,u.x))/l),g=10+Math.max(g,(Math.min(k.y+k.height,u.y+u.height)-Math.max(k.y,u.y))/l))}}v?g=0:d=0;for(t=0;t<n.length;t++)if(q=p.model.getTerminal(n[t],!1),f==m(q)&&(u=p.view.getState(q),q!=a&&null!=
-u&&(v&&b!=u.getCenterX()<h.getCenterX()||!v&&b!=u.getCenterY()<h.getCenterY()))){var B=[];p.traverse(u.cell,!0,function(a,b){null!=b&&B.push(b);B.push(a);return!0});p.moveCells(B,(b?1:-1)*d,(b?1:-1)*g)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function f(a){p.model.beginUpdate();try{var b=m(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1);var e=p.model.getParent(a),f=e.geometry,g=[];p.view.currentRoot!=
-e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);p.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,l=-40):b==mxConstants.DIRECTION_WEST?(h=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);p.moveCells(g,h,l);return p.addCells(d,e)}finally{p.model.endUpdate()}}function h(a){p.model.beginUpdate();try{var b=p.model.getParent(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],
-a]);p.model.setTerminal(d[0],a,!0);var c=p.getOutgoingEdges(a),e=b.geometry,f=[];p.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=p.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var l=p.view.getBounds(f),k=m(a),n=p.view.translate,v=p.view.scale;k==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/v-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):k==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/v-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=k==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/v-n.y+-e.y+10);return p.addCells(d,b)}finally{p.model.endUpdate()}}function k(a,b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=p.view.getState(p.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function 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?u.actions.get("selectParent").funct():
-c==b?(d=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(p.model.getTerminal(c[0],!0),d,a),c=p.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&&p.setSelectionCell(d[c].cell)))))}var u=this,p=u.editor.graph,v=p.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==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(p.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(p.getSelectionCell())&&(a.addSeparator(),0<p.getIncomingEdges(c).length&&
-this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&
-(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=
-p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+D");var A=p.removeCells;p.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 e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&c(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(p.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=p.getIncomingEdges(a[f]),
-a=a.concat(g)):e.push(a[f])}a=e;return A.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=p.duplicateCells;p.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=p.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=p.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=t.call(this,a,c);if(h.length==
-a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=p.getIncomingEdges(h[e]),g=p.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var k=this.cloneCells([g[0]])[0];this.addEdge(k,p.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var w=p.moveCells;p.moveCells=function(a,c,d,e,f,g,h){var l=null;this.model.beginUpdate();try{var k=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding",
-"0")){for(var v=0;v<a.length;v++)if(b(a[v])||p.model.isEdge(a[v])&&null==p.model.getTerminal(a[v],!0)){f=p.model.getParent(a[v]);break}if(null!=k&&f!=k&&null!=this.view.getState(a[0])){var t=p.getIncomingEdges(a[0]);if(0<t.length){var q=p.view.getState(p.model.getTerminal(t[0],!0));if(null!=q){var u=p.view.getState(k);null!=u&&(c=(u.getCenterX()-q.getCenterX())/p.view.scale,d=(u.getCenterY()-q.getCenterY())/p.view.scale)}}}}l=w.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(v=0;v<
-l.length;v++)if(this.model.isEdge(l[v]))b(k)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[v],!0))&&this.model.setTerminal(l[v],k,!0);else if(b(a[v])&&(t=p.getIncomingEdges(a[v]),0<t.length))if(!e)b(k)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],k,!0);else if(0==p.getIncomingEdges(l[v]).length){m=k;if(null==m||m==p.model.getParent(a[v]))m=p.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,p.getDefaultParent(),m,l[v])}}finally{this.model.endUpdate()}return l};
-if(null!=u.sidebar){var x=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=p.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var l=p.getCellGeometry(g[h]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),
-83:u.actions.get("selectSiblings")},z=u.onKeyDown;u.onKeyDown=function(a){try{if(p.isEnabled()&&!p.isEditing()&&b(p.getSelectionCell())&&1==p.getSelectionCount()){var c=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(p.getSelectionCell()):h(p.getSelectionCell()):13==a.which&&(c=n(p.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&p.model.isEdge(c[0])?p.setSelectionCell(p.model.getTerminal(c[0],!1)):p.setSelectionCell(c[c.length-
-1]),null!=u.hoverIcons&&u.hoverIcons.update(p.view.getState(p.getSelectionCell())),p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=C[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_EAST),
-mxEvent.consume(a)):40==a.keyCode&&(q(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var F=p.connectVertex;p.connectVertex=function(a,c,d,e,g,l){var k=p.getIncomingEdges(a);return b(a)&&0<k.length?(d=m(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?h(a):e==g?f(a):n(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):
-F.call(this,a,c,d,e,g,l)};p.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&p.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=
+"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,d,l,m){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),g=[],k=0;k<d.length;k++){var u=this.view.getState(d[k]),p=null!=u?u.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(p,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[k]&&g.push(a);return a==d[k]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(d[k],a))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=
+b?b.style:q.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function l(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.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 m(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
+10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var m=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=q.getOutgoingEdges(q.model.getTerminal(d[0],!0));if(null!=n){for(var v=f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<n.length;t++){var p=q.model.getTerminal(n[t],!1);if(f==l(p)){var u=q.view.getState(p);p!=a&&null!=u&&(v&&b!=u.getCenterX()<h.getCenterX()||!v&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(m,u)&&(d=10+Math.max(d,(Math.min(m.x+m.width,u.x+u.width)-Math.max(m.x,u.x))/k),g=10+Math.max(g,(Math.min(m.y+m.height,u.y+u.height)-Math.max(m.y,u.y))/k))}}v?g=0:d=0;for(t=0;t<n.length;t++)if(p=q.model.getTerminal(n[t],!1),f==l(p)&&(u=q.view.getState(p),p!=a&&null!=
+u&&(v&&b!=u.getCenterX()<h.getCenterX()||!v&&b!=u.getCenterY()<h.getCenterY()))){var A=[];q.traverse(u.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});q.moveCells(A,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function f(a){q.model.beginUpdate();try{var b=l(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=
+e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);q.moveCells(g,h,k);return q.addCells(d,e)}finally{q.model.endUpdate()}}function h(a){q.model.beginUpdate();try{var b=q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],
+a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=q.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=q.view.getBounds(f),m=l(a),n=q.view.translate,v=q.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/v-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/v-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/v-n.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function n(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=l(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=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(q.model.getTerminal(c[0],!0),d,a),c=q.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&&q.setSelectionCell(d[c].cell)))))}var p=this,q=p.editor.graph,v=q.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=p.menus.createPopupMenu;p.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(q.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(q.getSelectionCell())&&(a.addSeparator(),0<q.getIncomingEdges(c).length&&
+this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};p.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&
+(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=
+q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var B=q.removeCells;q.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 e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&c(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),
+a=a.concat(g)):e.push(a[f])}a=e;return B.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 t=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=t.call(this,a,c);if(h.length==
+a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=q.getIncomingEdges(h[e]),g=q.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,q.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var w=q.moveCells;q.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding",
+"0")){for(var v=0;v<a.length;v++)if(b(a[v])||q.model.isEdge(a[v])&&null==q.model.getTerminal(a[v],!0)){f=q.model.getParent(a[v]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=q.getIncomingEdges(a[0]);if(0<t.length){var p=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=p){var u=q.view.getState(l);null!=u&&(c=(u.getCenterX()-p.getCenterX())/q.view.scale,d=(u.getCenterY()-p.getCenterY())/q.view.scale)}}}}k=w.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(v=0;v<
+k.length;v++)if(this.model.isEdge(k[v]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[v],!0))&&this.model.setTerminal(k[v],l,!0);else if(b(a[v])&&(t=q.getIncomingEdges(a[v]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[v]).length){m=l;if(null==m||m==q.model.getParent(a[v]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,q.getDefaultParent(),m,k[v])}}finally{this.model.endUpdate()}return k};
+if(null!=p.sidebar){var x=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=q.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:p.actions.get("selectChildren"),84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),
+83:p.actions.get("selectSiblings")},z=p.onKeyDown;p.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(q.getSelectionCell()):h(q.getSelectionCell()):13==a.which&&(c=m(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-
+1]),null!=p.hoverIcons&&p.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=C[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),
+mxEvent.consume(a)):40==a.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var F=q.connectVertex;q.connectVertex=function(a,c,d,e,g,k){var n=q.getIncomingEdges(a);return b(a)&&0<n.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?h(a):e==g?f(a):m(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):
+F.call(this,a,c,d,e,g,k)};q.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&q.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="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 G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.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;mxVertexHandler.prototype.destroy=function(a,b){I.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.editorUi.editor.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 e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!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 u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);q.insertEdge(u,!1);var p=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;");p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);p.insertEdge(v,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(v);a.insert(b);a.insert(c);a.insert(e);a.insert(q);a.insert(p);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],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var u=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;");u.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);u.insertEdge(p,!1);var q=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;");q.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);q.insertEdge(v,!1);a.insert(d);a.insert(g);a.insert(p);a.insert(v);a.insert(b);a.insert(c);a.insert(e);a.insert(u);a.insert(q);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",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;
-c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!1);a.insert(e);a.insert(k);a.insert(c);a.insert(d);a.insert(g);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");n.geometry.relative=!0;n.edge=!0;c.insertEdge(n,!0);g.insertEdge(n,!1);a.insert(e);a.insert(n);a.insert(c);a.insert(d);a.insert(g);return sb.createVertexTemplateFromCells([a],
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,
@@ -8590,8 +8626,8 @@ this.window.setLocation=function(a,b){var c=window.innerHeight||document.documen
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 g=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="30px");g.apply(this,arguments)};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
-function(a,b){null!=b.shortcut&&900>c&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):m.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){n.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
+function(){return!1};var g=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="30px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(a,b){null!=b.shortcut&&900>c&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):l.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var f=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){f.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="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};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"));
@@ -8600,21 +8636,21 @@ mxResources.get("saveAndExit")),b.className="geMenuItem gePrimaryBtn",b.style.fo
b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var h=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;h.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-","lockUnlock","enterGroup"],
null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),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 k=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),
+!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=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);k.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){q.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 u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("insertText").label=mxResources.get("text");
+null);n.apply(this,arguments)};var u=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){u.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("insertText").label=mxResources.get("text");
c.actions.get("insertText").label=mxResources.get("text");c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("insertRectangle").label=mxResources.get("rectangle");c.actions.get("insertEllipse").label=mxResources.get("ellipse");c.actions.get("insertRhombus").label=mxResources.get("rhombus");c.actions.get("insertImage").label=mxResources.get("image")+"...";c.actions.get("insertLink").label=mxResources.get("link")+"...";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){c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,
-"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime&&c.menus.addMenuItems(a,["chatWindowTitle"],
-b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags".split(" "),b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,b)}}this.put("save",new Menu(mxUtils.bind(this,
-function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):(c.menus.addMenuItems(a,["save","saveAs","-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],b);c.menus.addMenuItems(a,["-","autosave"],
-b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips"],
-b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&(a.addSeparator(b),c.menus.addMenuItem(a,"plugins",b))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+
-mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+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 - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime?c.menus.addMenuItems(a,["chatWindowTitle"],
+b):c.menus.addMenuItems(a,["-","refresh"],b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags".split(" "),b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,
+b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):(c.menus.addMenuItems(a,["save","saveAs","-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],
+b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,
+["scrollbars","tooltips"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&(a.addSeparator(b),c.menus.addMenuItem(a,"plugins",b))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));
+mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=
-c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=g.menus.get(a),f=m.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),l);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";
+c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=g.menus.get(a),f=m.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),l);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.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,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="",mxUtils.setOpacity(f,d||40)):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 b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?k.insertBefore(h,g.statusContainer):k.appendChild(h);null!=f?(h.style.backgroundImage=
"url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=
@@ -8629,13 +8665,13 @@ d([b("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.tra
640<=c?b("",e.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=c?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null])}e=g.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&540<=c?(f=m.addMenu("",e.funct),f.setAttribute("title",mxResources.get("language")),f.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),k.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}p.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),k.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}q.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var k=document.createElement("div");k.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 l=null,m=new Menubar(g,k);g.statusContainer=
g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var n=g.descriptorChanged;g.descriptorChanged=function(){n.apply(this,arguments);var a=g.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);k.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else k.removeAttribute("title")};g.setStatusText(g.editor.getStatus());k.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";k.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=
-document.createElement("div");g.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 f=g.diagramContainer.parentNode,q=document.createElement("div");q.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var u=g.menus.get("viewZoom");if(null!=
+document.createElement("div");g.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 f=g.diagramContainer.parentNode,p=document.createElement("div");p.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var u=g.menus.get("viewZoom");if(null!=
u){this.tabContainer.style.right="70px";var D=m.addMenu("100%",u.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";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(g.tabContainer.style.height)-1+"px";D.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";q.appendChild(D);u=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*g.editor.graph.view.scale)+
-"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var H=g.setGraphEnabled;g.setGraphEnabled=function(){H.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(g.tabContainer);q.appendChild(k);q.appendChild(g.diagramContainer);f.appendChild(q);g.updateTabContainer();
+"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(g.tabContainer.style.height)-1+"px";D.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";p.appendChild(D);u=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*g.editor.graph.view.scale)+
+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var H=g.setGraphEnabled;g.setGraphEnabled=function(){H.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}p.appendChild(g.tabContainer);p.appendChild(k);p.appendChild(g.diagramContainer);f.appendChild(p);g.updateTabContainer();
e();mxEvent.addListener(window,"resize",function(){e();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.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)}})();
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index 8bb9a7b8..0033ad7d 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -2,6 +2,7 @@ window.STENCIL_PATH=window.STENCIL_PATH||"https://www.draw.io/stencils";window.S
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
// NOTE: Modified to support data URIs for images, ie. data:image/*
+// Modified to allow "word-break: break-word" in styles. It is done by adding "break-word" which is at index 55 of J array J[55] to "cssLitGroup" of "word-break"
(function(){var c=void 0,n=!0,s=null,C=!1,J=["aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow,springgreen,steelblue,tan,teal,thistle,tomato,transparent,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","),
"all-scroll,col-resize,crosshair,default,e-resize,hand,help,move,n-resize,ne-resize,no-drop,not-allowed,nw-resize,pointer,progress,row-resize,s-resize,se-resize,sw-resize,text,vertical-text,w-resize,wait".split(","),"armenian,decimal,decimal-leading-zero,disc,georgian,lower-alpha,lower-greek,lower-latin,lower-roman,square,upper-alpha,upper-latin,upper-roman".split(","),"100,200,300,400,500,600,700,800,900,bold,bolder,lighter".split(","),"block-level,inline-level,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),
"condensed,expanded,extra-condensed,extra-expanded,narrower,semi-condensed,semi-expanded,ultra-condensed,ultra-expanded,wider".split(","),"inherit,inline,inline-block,inline-box,inline-flex,inline-grid,inline-list-item,inline-stack,inline-table,run-in".split(","),"behind,center-left,center-right,far-left,far-right,left-side,leftwards,right-side,rightwards".split(","),"large,larger,small,smaller,x-large,x-small,xx-large,xx-small".split(","),"dashed,dotted,double,groove,outset,ridge,solid".split(","),
@@ -26,7 +27,7 @@ position:{cssPropBits:0,cssLitGroup:[J[23]],cssFns:[]},quotes:{cssPropBits:8,css
cssLitGroup:[J[14],J[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[J[52],J[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[J[42],J[56],J[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[J[19],J[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[J[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[J[26],J[71]],cssFns:[]},"text-wrap":{cssPropBits:0,
cssLitGroup:[J[46],J[71],J[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[J[71]],cssFns:"matrix(),perspective(),rotate(),rotate3d(),rotatex(),rotatey(),rotatez(),scale(),scale3d(),scalex(),scaley(),scalez(),skew(),skewx(),skewy(),translate(),translate3d(),translatex(),translatey(),translatez()".split(",")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[J[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[J[10],J[48],J[50],J[71]],cssFns:["cubic-bezier()",
"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[J[48],J[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[J[30],J[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[J[12],J[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[J[27],J[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[J[17],J[69]],
-cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
+cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72],J[55]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
J[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[11],J[31],J[42],J[48],J[56],J[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[J[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[J[48],J[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[J[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},O;for(O in L)"string"===typeof L[O]&&Object.hasOwnProperty.call(L,O)&&(L[O]=L[L[O]]);"undefined"!==typeof window&&(window.cssSchema=L);var U,X;
@@ -664,7 +665,7 @@ mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){g||a.setShadow(!1);a.b
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};
mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),k=this.graph.model.getTerminal(g,!0)==a;if(!b||k)k=this.graph.view.getVisibleTerminal(g,!k),this.traverse(k,b,c,g,e)}};
-mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(cell)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
@@ -1955,9 +1956,9 @@ x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000
this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,
2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),
y=!1,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install();
-Editor=function(a,d,e,b,h){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=b||this.createGraph(d,e);this.editable=null!=h?h:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(a,b){var d=null!=b?b.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(d){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(a,d){var b=null!=d?d.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+
"/help.png";
Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
@@ -1976,26 +1977,26 @@ Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAA
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.popupsAllowed=!0;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;
Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};
Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,d){var e=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+
-(0<e.length?"&":"?")+"client=1"),null,!0)):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,d){var e=new Graph(null,d,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
+Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(d){"ready"==d.data&&d.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+
+(0<e.length?"&":"?")+"client=1"),null,!0)):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.isChromelessView()||"1"==urlParams.grid;this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=this.graph.defaultGraphBackground;
this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled=
-"0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var d=parseFloat(a.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(d=a.getAttribute("page"),this.graph.pageVisible=null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=
-this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var d=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight"));isNaN(d)||isNaN(e)||(this.graph.pageFormat=new mxRectangle(0,0,d,e));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
-Editor.prototype.setGraphXml=function(a){if(null!=a){var d=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),d.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var e=d.document.createElement("mxGraphModel");e.appendChild(a);d.decode(e,this.graph.getModel());
+"0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var b=parseFloat(a.getAttribute("pageScale"));!isNaN(b)&&0<b?this.graph.pageScale=b:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=null!=b?"0"!=b:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=
+this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var b=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight"));isNaN(b)||isNaN(e)||(this.graph.pageFormat=new mxRectangle(0,0,b,e));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
+Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var e=b.document.createElement("mxGraphModel");e.appendChild(a);b.decode(e,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,d=new mxUndoManager;this.undoListener=function(a,e){d.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,d){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,d){for(var e=a.getSelectionCellsForChanges(d.getProperty("edit").changes),h=a.getModel(),q=[],u=0;u<e.length;u++)(h.isVertex(e[u])||h.isEdge(e[u]))&&null!=a.view.getState(e[u])&&
-q.push(e[u]);a.setSelectionCells(q)};d.addListener(mxEvent.UNDO,e);d.addListener(mxEvent.REDO,e);return d};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()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],u=0;u<e.length;u++)(k.isVertex(e[u])||k.isEdge(e[u]))&&null!=a.view.getState(e[u])&&
+q.push(e[u]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,d,e,b,h,m,p,q,u){var c=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(c=80);e+=c;b+=c;var f=e,g=b,k=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),r=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),l=Math.max(1,Math.round((k-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(d.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);
-b=Math.min(b,k-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=k+"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 n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";r+=n.x;l+=n.y;h&&
-document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");h=this.getPosition(r,l,e,b);r=h.x;l=h.y;w.style.width=e+"px";w.style.height=b+"px";w.style.left=r+"px";w.style.top=l+"px";w.style.zIndex=this.zIndex;w.appendChild(d);document.body.appendChild(w);!q&&d.clientHeight>w.clientHeight-64&&(d.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",
-m.style.top=l+14+"px",m.style.left=r+e+38-c+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){k=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=k+"px";r=Math.max(1,Math.round((document.body.clientWidth-
-e-64)/2));l=Math.max(1,Math.round((k-b-a.footerHeight)/3));e=Math.min(f,document.body.scrollWidth-64);b=Math.min(g,k-64);var n=this.getPosition(r,l,e,b);r=n.x;l=n.y;w.style.left=r+"px";w.style.top=l+"px";w.style.width=e+"px";w.style.height=b+"px";!q&&d.clientHeight>w.clientHeight-64&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=l+14+"px",this.dialogImg.style.left=r+e+38-c+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=
+function Dialog(a,b,e,d,k,l,p,q,u){var c=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(c=80);e+=c;d+=c;var f=e,g=d,n=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),r=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),h=Math.max(1,Math.round((n-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);
+d=Math.min(d,n-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=n+"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 m=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=m.x+"px";this.bg.style.top=m.y+"px";r+=m.x;h+=m.y;k&&
+document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(r,h,e,d);r=k.x;h=k.y;w.style.width=e+"px";w.style.height=d+"px";w.style.left=r+"px";w.style.top=h+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",
+l.style.top=h+14+"px",l.style.left=r+e+38-c+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){n=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=n+"px";r=Math.max(1,Math.round((document.body.clientWidth-
+e-64)/2));h=Math.max(1,Math.round((n-d-a.footerHeight)/3));e=Math.min(f,document.body.scrollWidth-64);d=Math.min(g,n-64);var m=this.getPosition(r,h,e,d);r=m.x;h=m.y;w.style.left=r+"px";w.style.top=h+"px";w.style.width=e+"px";w.style.height=d+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=h+14+"px",this.dialogImg.style.left=r+e+38-c+"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";
@@ -2004,150 +2005,150 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
-"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,d){return new mxPoint(a,d)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),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,d){this.create(a,d)};
-PrintDialog.prototype.create=function(a){function d(a){var b=q.checked||c.checked,d=parseInt(g.value)/100;isNaN(d)&&(d=1,g.value="100%");var d=.75*d,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(b){var h=q.checked?1:parseInt(f.value);isNaN(h)||(r=mxUtils.getScaleForPageCount(h,e,k))}e.getGraphBounds();var y=h=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);r*=d;!b&&e.pageVisible?(d=e.getPageLayout(),h-=d.x*k.width,y-=d.y*k.height):
-b=!0;b=PrintDialog.createPrintPreview(e,r,k,0,h,y,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,b,h,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");b=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-h.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});b.appendChild(h);p.appendChild(b);b=b.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");h.appendChild(u);mxEvent.addListener(u,
-"click",function(a){c.checked=!c.checked;q.checked=!c.checked;mxEvent.consume(a)});b.appendChild(h);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(f);mxUtils.write(h," "+mxResources.get("pages")+" (max)");b.appendChild(h);p.appendChild(b);mxEvent.addListener(c,"change",
-function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!c.checked});b=b.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");b.appendChild(h);h=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";h.appendChild(g);b.appendChild(h);p.appendChild(b);b=document.createElement("tr");h=document.createElement("td");h.colSpan=2;
-h.style.paddingTop="20px";h.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&h.appendChild(u);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)});k.className="geBtn";h.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});k.className="geBtn gePrimaryBtn";h.appendChild(k);a.editor.cancelFirst||
-h.appendChild(u);b.appendChild(h);p.appendChild(b);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){if(null!=a.wnd){var d=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}};
-PrintDialog.createPrintPreview=function(a,d,e,b,h,m,p){d=new mxPrintPreview(a,d,e,b,h,m);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";d.backgroundColor=a;var q=d.writeHead;d.writeHead=function(a){q.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 d};
+"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),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 d=q.checked||c.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(d){var k=q.checked?1:parseInt(f.value);isNaN(k)||(r=mxUtils.getScaleForPageCount(k,e,n))}e.getGraphBounds();var y=k=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);r*=b;!d&&e.pageVisible?(b=e.getPageLayout(),k-=b.x*n.width,y-=b.y*n.height):
+d=!0;d=PrintDialog.createPrintPreview(e,r,n,0,k,y,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+k.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.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;q.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change",
+function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.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 g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);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 n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
+k.appendChild(u);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};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,e,d,k,l,p){b=new mxPrintPreview(a,b,e,d,k,l);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 q=b.writeHead;b.writeHead=function(a){q.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 d(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==r?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",r.src),k.style.fontSize="11px",k.innerHTML=r.src.substring(0,42)+"...")}var b=a.editor.graph,h,m,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var q=document.createElement("tbody");h=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");h.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",b.pageFormat);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");
-mxUtils.write(m,mxResources.get("background")+":");h.appendChild(m);m=document.createElement("td");m.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 f=b.background;d();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;d()});mxEvent.consume(c)});
-m.appendChild(c);mxUtils.write(m,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=b.getGridSize();m.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?b.getGridSize():a)});h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
-":");h.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var r=b.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(c)});e();m.appendChild(k);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var l=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&m.appendChild(l);var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==g.value&&b.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,u.get());c.ignoreColor=b.background==f;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=r?r.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||b.model.execute(c)});n.className="geBtn gePrimaryBtn";m.appendChild(n);a.editor.cancelFirst||m.appendChild(l);h.appendChild(m);q.appendChild(h);p.appendChild(q);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,d,e,b){function h(a,c,b){if(b||g!=document.activeElement&&k!=document.activeElement){a=!1;for(c=0;c<l.length;c++)b=l[c],B?"custom"==b.key&&(q.value=b.key,B=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(q.value=b.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",f.style.display="none"):(g.value=e.width/100,k.value=e.height/100,m.setAttribute("checked","checked"),
-q.value="custom",u.style.display="none",f.style.display="")}}d="format-"+d;var m=document.createElement("input");m.setAttribute("name",d);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
-u.style.height="24px";m.style.marginRight="6px";u.appendChild(m);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));u.appendChild(d);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 f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
-g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";f.appendChild(k);mxUtils.write(f," in");u.style.display="none";f.style.display="none";for(var r={},l=PageSetupDialog.getFormats(),n=0;n<l.length;n++){var w=l[n];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var B=!1;h();a.appendChild(q);mxUtils.br(a);
-a.appendChild(u);a.appendChild(f);var y=e,t=function(a,c){var d=r[q.value];null!=d.format?(g.value=d.format.width/100,k.value=d.format.height/100,f.style.display="none",u.style.display=""):(u.style.display="none",f.style.display="");d=parseFloat(g.value);if(isNaN(d)||0>=d)g.value=e.width/100;d=parseFloat(k.value);if(isNaN(d)||0>=d)k.value=e.height/100;d=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(k.value)));"custom"!=q.value&&p.checked&&(d=new mxRectangle(0,0,
-d.height,d.width));c&&B||d.width==y.width&&d.height==y.height||(y=d,null!=b&&b(y))};mxEvent.addListener(d,"click",function(a){m.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",t);mxEvent.addListener(g,"click",t);mxEvent.addListener(k,"blur",t);mxEvent.addListener(k,"click",t);mxEvent.addListener(p,"change",t);mxEvent.addListener(m,"change",t);mxEvent.addListener(q,"change",function(a){B="custom"==q.value;
-t(a,!0)});t();return{set:function(a){e=a;h(null,null,!0)},get:function(){return y},widthInput:g,heightInput:k}};
+var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==r?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",r.src),n.style.fontSize="11px",n.innerHTML=r.src.substring(0,42)+"...")}var d=a.editor.graph,k,l,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
+mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var 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 f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)});
+l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=d.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
+":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var r=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,u.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=r?r.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
+c.ignoreColor&&c.ignoreImage||d.model.execute(c)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,d){if(d||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)d=h[c],A?"custom"==d.key&&(q.value=d.key,A=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
+e.height==d.format.height?(q.value=d.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
+q.value="custom",u.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
+u.style.height="24px";l.style.marginRight="6px";u.appendChild(l);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 f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
+g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");u.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var w=h[m];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var A=!1;k();a.appendChild(q);mxUtils.br(a);
+a.appendChild(u);a.appendChild(f);var y=e,t=function(a,c){var b=r[q.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",u.style.display=""):(u.style.display="none",f.style.display="");b=parseFloat(g.value);if(isNaN(b)||0>=b)g.value=e.width/100;b=parseFloat(n.value);if(isNaN(b)||0>=b)n.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));c&&A||b.width==y.width&&b.height==y.height||(y=b,null!=d&&d(y))};mxEvent.addListener(b,"click",function(a){l.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",t);mxEvent.addListener(g,"click",t);mxEvent.addListener(n,"blur",t);mxEvent.addListener(n,"click",t);mxEvent.addListener(p,"change",t);mxEvent.addListener(l,"change",t);mxEvent.addListener(q,"change",function(a){A="custom"==q.value;
+t(a,!0)});t();return{set:function(a){e=a;k(null,null,!0)},get:function(){return y},widthInput:g,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=
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var d=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(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
-mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",g=a.gridSize*this.scale*this.gridSteps):
-d="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-c,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,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=g,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=[],g=1;g<this.gridSteps;g++){var e=g*b;d.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+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 f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,g=this.view.translate,e=this.pageFormat,r=d*this.pageScale,l=this.view.getBackgroundPageBounds();b=l.width;c=l.height;var n=
-new mxRectangle(d*g.x,d*g.y,e.width*r,e.height*r),w=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(c/n.height)-1:0,v=a?Math.ceil(b/n.width)-1:0,h=l.x+b,y=l.y+c;null==this.horizontalPageBreaks&&0<w&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?w:v,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(b+1)*n.height)),
-new mxPoint(Math.round(h),Math.round(l.y+(b+1)*n.height))]:[new mxPoint(Math.round(l.x+(b+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(b+1)*n.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 d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){for(var f=0;f<b.length;f++)if(this.graph.getModel().isVertex(b[f])){var g=this.graph.getCellGeometry(b[f]);if(null!=g&&g.relative)return!1}return d.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.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,g=this.graph.pageScale,e=d.width*g,d=d.height*g,g=Math.floor(Math.min(0,b)/e),r=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-r)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,d){b.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,g,e){var f=h.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=m.apply(this,arguments),g=b.getParent(d);
-if(null==c||c!=d&&c!=g)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(g)&&b.isVertex(g)&&!this.graph.isContainer(g);)d=g,g=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(),g=d.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&d.isVertex(g)){c=!0;break}g=d.getParent(g)}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,d,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=d||document.body;var b=this.editor.graph;b.lightbox=e;b.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
-this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var h=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||b.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=h,this.menubarContainer.onmousedown=
-h,this.toolbarContainer.onselectstart=h,this.toolbarContainer.onmousedown=h,this.diagramContainer.onselectstart=h,this.diagramContainer.onmousedown=h,this.sidebarContainer.onselectstart=h,this.sidebarContainer.onmousedown=h,this.formatContainer.onselectstart=h,this.formatContainer.onmousedown=h,this.footerContainer.onselectstart=h,this.footerContainer.onmousedown=h,null!=this.tabContainer&&(this.tabContainer.onselectstart=h));!this.editor.chromeless||this.editor.editable?(d=function(a){var c=mxEvent.getSource(a);
-if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return h(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",d):this.diagramContainer.oncontextmenu=d):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(d=b.view.getDrawPane().ownerSVGElement,null!=d&&(d.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 m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return m||p.apply(this,arguments)};this.keydownHandler=
-mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=b.cellEditor.isStopEditingEvent;b.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,f=null,g=null,k=null,r=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,d=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),d.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==k)this.toolbar.createTextToolbar();else{for(var l=0;l<k.length;l++)this.toolbar.container.appendChild(k[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
-g}c=b.cellEditor.isContentEditing();f=a;g=e;k=d}}),l=this,n=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){n.apply(this,arguments);r();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!=l.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
-d.substring(0,d.length-1));l.toolbar.setFontName(d);l.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,c){w.apply(this,arguments);r()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
-if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(A){}var v=b.fireMouseEvent;b.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var B="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=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(d.push(c.style[g]),f.push(g));g=b.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],l=0;l<e.length;l++){var k=e[l],
-n=k.indexOf("=");0<=n&&(g=k.substring(0,n),k=k.substring(n+1),null!=a[g]&&"none"==k&&(d.push(k),f.push(g)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"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 t=
-["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],t,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(d=0;d<H[a].length;d++)B.push(H[a][d]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(B,y[a])&&B.push(y[a]);var G=function(a,c){var d=b.getModel();
-d.beginUpdate();try{if(c)for(var f=d.isEdge(l),g=f?b.currentEdgeStyle:b.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var k=g[f[e]];null!=k&&b.setCellStyles(f[e],k,a)}else for(k=0;k<a.length;k++){for(var l=a[k],n=d.getStyle(l),r=null!=n?n.split(";"):[],F=B.slice(),e=0;e<r.length;e++){var t=r[e],v=t.indexOf("=");if(0<=v){var w=t.substring(0,v),h=mxUtils.indexOf(F,w);0<=h&&F.splice(h,1);for(var q=0;q<H.length;q++){var z=H[q];if(0<=mxUtils.indexOf(z,w))for(var A=0;A<
-z.length;A++){var m=mxUtils.indexOf(F,z[A]);0<=m&&F.splice(m,1)}}}}for(var g=(f=d.isEdge(l))?b.currentEdgeStyle:b.currentVertexStyle,p=d.getStyle(l),e=0;e<F.length;e++){var w=F[e],J=g[w];null==J||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(y,w))||(p=mxUtils.setStyle(p,w,J))}d.setStyle(l,p)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,c){G(c.getProperty("cells"))});b.addListener("textInserted",function(a,c){G(c.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));G(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,g=!1;if(0<d.length)for(var e=0;e<d.length&&(f=b.getModel().isVertex(d[e])||f,!(g=b.getModel().isEdge(d[e])||g)||!f);e++);else g=f=!0;for(var d=c.getProperty("keys"),k=c.getProperty("values"),e=0;e<d.length;e++){var l=0<=mxUtils.indexOf(t,d[e]);if("strokeColor"!=d[e]||null!=k[e]&&"none"!=
-k[e])if(0<=mxUtils.indexOf(y,d[e]))g||0<=mxUtils.indexOf(z,d[e])?null==k[e]?delete b.currentEdgeStyle[d[e]]:b.currentEdgeStyle[d[e]]=k[e]:f&&0<=mxUtils.indexOf(B,d[e])&&(null==k[e]?delete b.currentVertexStyle[d[e]]:b.currentVertexStyle[d[e]]=k[e]);else if(0<=mxUtils.indexOf(B,d[e])){if(f||l)null==k[e]?delete b.currentVertexStyle[d[e]]:b.currentVertexStyle[d[e]]=k[e];if(g||l||0<=mxUtils.indexOf(z,d[e]))null==k[e]?delete b.currentEdgeStyle[d[e]]:b.currentEdgeStyle[d[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
-Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
-b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?
-"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
-this.getCssClassForMarker("end",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(b.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=b.currentVertexStyle.fontFamily||"Helvetica",c=String(b.currentVertexStyle.fontSize||"12"),d=b.getView().getState(b.getSelectionCell());null!=d&&(a=d.style[mxConstants.STYLE_FONTFAMILY]||a,c=d.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);
-this.toolbar.setFontSize(c)}),b.getSelectionModel().addListener(mxEvent.CHANGE,a),b.getModel().addListener(mxEvent.CHANGE,a));b.addListener(mxEvent.CELLS_ADDED,function(a,c){var d=c.getProperty("cells"),f=c.getProperty("parent");b.getModel().isLayer(f)&&!b.isCellVisible(f)&&null!=d&&0<d.length&&b.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
+mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,d=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",b="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(b=unescape(encodeURIComponent(this.createSvgGrid(c))),b=window.btoa?btoa(b):Base64.encode(b,!0),b="url(data:image/svg+xml;base64,"+b+")",g=a.gridSize*this.scale*this.gridSteps):
+b="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-c,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
+d,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=g,c.style.backgroundColor=d,c.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var c=this.gridSteps*d,b=[],g=1;g<this.gridSteps;g++){var e=g*d;b.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+b.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(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+d,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,d,c){var b=this.view.scale,g=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();d=h.width;c=h.height;var m=
+new mxRectangle(b*g.x,b*g.y,e.width*r,e.height*r),w=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(c/m.height)-1:0,v=a?Math.ceil(d/m.width)-1:0,k=h.x+d,y=h.y+c;null==this.horizontalPageBreaks&&0<w&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?w:v,d=0;d<=c;d++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(d+1)*m.height)),
+new mxPoint(Math.round(k),Math.round(h.y+(d+1)*m.height))]:[new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(y))];null!=a[d]?(a[d].points=b,a[d].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[d]=b)}for(d=c;d<a.length;d++)a[d].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 f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(d,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(),d=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,g=this.graph.pageScale,e=b.width*g,b=b.height*g,g=Math.floor(Math.min(0,d)/e),r=Math.floor(Math.min(0,
+c)/b);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,d+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/b)-r)*b)};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,d,c,b,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var d=this.graph.getModel(),c=d.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),g=d.getParent(b);
+if(null==c||c!=b&&c!=g)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(g)&&d.isVertex(g)&&!this.graph.isContainer(g);)b=g,g=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,d){var c=p.apply(this,arguments);if(!c)for(var b=this.graph.getModel(),g=b.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&b.isVertex(g)){c=!0;break}g=b.getParent(g)}return c};mxGraphHandler.prototype.selectDelayed=
+function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var d=a.getCell();null==d&&(d=this.cell);var c=this.graph.view.getState(d);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),b=c.getParent(d);!this.graph.isCellSelected(b)&&c.isVertex(b);)d=b,b=c.getParent(d);this.graph.selectCellForEvent(d,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var d=this.graph.getModel(),c=d.getParent(a);d.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
+(a=c),c=d.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
+this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();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 l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return l||p.apply(this,arguments)};this.keydownHandler=
+mxUtils.bind(this,function(a){32==a.which?(l=!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()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=
+function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var 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,f=null,g=null,n=null,r=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
+g}c=d.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,m=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){m.apply(this,arguments);r();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!=h.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+b.substring(0,b.length-1));h.toolbar.setFontName(b);h.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 w=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){w.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
+if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(B){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var A="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),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=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],h=0;h<e.length;h++){var n=e[h],
+m=n.indexOf("=");0<=m&&(g=n.substring(0,m),n=n.substring(m+1),null!=a[g]&&"none"==n&&(b.push(n),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"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 t=
+["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],t,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)A.push(H[a][b]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(A,y[a])&&A.push(y[a]);var G=function(a,c){var b=d.getModel();
+b.beginUpdate();try{if(c)for(var f=b.isEdge(n),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&d.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var n=a[h],m=b.getStyle(n),r=null!=m?m.split(";"):[],F=A.slice(),e=0;e<r.length;e++){var t=r[e],v=t.indexOf("=");if(0<=v){var w=t.substring(0,v),k=mxUtils.indexOf(F,w);0<=k&&F.splice(k,1);for(var q=0;q<H.length;q++){var z=H[q];if(0<=mxUtils.indexOf(z,w))for(var B=0;B<
+z.length;B++){var l=mxUtils.indexOf(F,z[B]);0<=l&&F.splice(l,1)}}}}for(var g=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,p=b.getStyle(n),e=0;e<F.length;e++){var w=F[e],J=g[w];null==J||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(y,w))||(p=mxUtils.setStyle(p,w,J))}b.setStyle(n,p)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){G(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){G(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,c){var d=[c.getProperty("cell")];c.getProperty("terminalInserted")&&d.push(c.getProperty("terminal"));G(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),h=c.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(t,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
+h[e])if(0<=mxUtils.indexOf(y,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(A,b[e])&&(null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(A,b[e])){if(f||n)null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e];if(g||n||0<=mxUtils.indexOf(z,b[e]))null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
+d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
+"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
+this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),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"),f=c.getProperty("parent");d.getModel().isLayer(f)&&!d.isCellVisible(f)&&null!=b&&0<b.length&&d.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,
-"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));b.addListener("gridSizeChanged",mxUtils.bind(this,function(){b.isGridEnabled()&&b.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};
+"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;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
-var d=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){d.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var d=this.editor.graph;9==a.which&&d.isEnabled()&&!mxEvent.isAltDown(a)&&(d.isEditing()?d.stopEditing(!1):d.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
-EditorUi.prototype.onKeyPress=function(a){var d=this.editor.graph;!this.isImmediateEditingEvent(a)||d.isEditing()||d.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,d.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(d.textarea),a.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(a)))};
+var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
+EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.getCssClassForMarker=function(a,d,e,b){return"flexArrow"==d?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==b?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==b?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+
-a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==b?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==b?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==b?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==b?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==b?"geSprite geSprite-"+a+"thindiamond":
-"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==b?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==b||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+
+EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+
+a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":
+"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+
a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,d=this.actions.get("paste"),e=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(d.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,d=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(d){d.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var b=mxClipboard.paste;mxClipboard.paste=function(d){var e=null;d.cellEditor.isContentEditing()?document.execCommand("paste",
-!1,null):e=b.apply(this,arguments);a.updatePasteActionStates();return e};var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,b){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
+EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
+!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.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,d){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var d=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(c,d,b,f){if(null!=a.container){b=null!=b?b:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),k=a.view.translate,l=a.view.scale,n=mxRectangle.fromRectangle(g);
-n.x=n.x/l-k.x;n.y=n.y/l-k.y;n.width/=l;n.height/=l;var k=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var y=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(d||1,y/n.width)):l;d=(y-c*n.width)/2/c;var F=0==this.lightboxVerticalDivider?0:(t-c*n.height)/this.lightboxVerticalDivider/c;e&&(d=Math.max(d,0),F=Math.max(F,0));if(e||g.width<y||g.height<t)a.view.scaleAndTranslate(c,
-Math.floor(d-n.x),Math.floor(F-n.y)),a.container.scrollTop=k*c/l,a.container.scrollLeft=r*c/l;else if(0!=b||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+b/l),Math.floor(g.y+f/l))}});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",
+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,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),h=a.view.translate,n=a.view.scale,m=mxRectangle.fromRectangle(g);
+m.x=m.x/n-h.x;m.y=m.y/n-h.y;m.width/=n;m.height/=n;var h=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var y=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,y/m.width)):n;b=(y-c*m.width)/2/c;var F=0==this.lightboxVerticalDivider?0:(t-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),F=Math.max(F,0));if(e||g.width<y||g.height<t)a.view.scaleAndTranslate(c,
+Math.floor(b-m.x),Math.floor(F-m.y)),a.container.scrollTop=h*c/n,a.container.scrollLeft=r*c/n;else if(0!=d||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/n),Math.floor(g.y+f/n))}});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 h=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",h);h();var m=0,h=mxUtils.bind(this,function(a,c,d){m++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=d&&b.setAttribute("title",d);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);b.appendChild(a);this.chromelessToolbar.appendChild(b);
-return b}),p=h(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var u=h(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
+"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 l=0,k=mxUtils.bind(this,function(a,c,b){l++;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}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);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&&(q.innerHTML="",mxUtils.write(q,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 f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",q.style.display="inline-block"):
-(u.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);h(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");h(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");h(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 g=null,k=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;k=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";k=null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var n=h(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 d=n.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=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){n.style.display=1<w.getChildCount(w.root)?
-"":"none"})}this.addChromelessToolbarItems(h);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||h(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(f=0;f<this.lightboxToolbarActions.length;f++){var v=
-this.lightboxToolbarActions[f];h(v.fn,v.icon,v.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||h(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)||l(30),r())}));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)?r():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():l(100);mxEvent.consume(a)}));
-mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||l(30)}));var B=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<B&&Math.abs(this.scrollTop-
-a.container.scrollTop)<B&&Math.abs(this.startX-d.getGraphX())<B&&Math.abs(this.startY-d.getGraphY())<B&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():l(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 t=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),d=this.getPagePadding(),b=this.getPageSize(),f=Math.ceil(2*d.x+c.width*b.width),g=Math.ceil(2*d.y+c.height*b.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=d.x-c.x*b.width;d=d.y-c.y*b.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
-d?t.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(f,d),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((d-b)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+(u.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);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 g=null,n=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";n=null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var m=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=m.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")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){m.style.display=1<w.getChildCount(w.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(f=0;f<this.lightboxToolbarActions.length;f++){var v=
+this.lightboxToolbarActions[f];k(v.fn,v.icon,v.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)||h(30),r())}));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)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));
+mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var A=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)<A&&Math.abs(this.scrollTop-
+a.container.scrollTop)<A&&Math.abs(this.startX-b.getGraphX())<A&&Math.abs(this.startY-b.getGraphY())<A&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(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 t=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
+b?t.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(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=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),b=0,f=0;null!=z&&(b=a.container.offsetWidth/2-z.x+c.x,f=a.container.offsetHeight/2-z.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=d&&e.chromelessResize(!1,null,b*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==b&&0==f||(a.container.scrollLeft-=b*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,d){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var b=mxEvent.getSource(c);null!=b;){if(b==a.container){z=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(d);mxEvent.consume(c);break}b=b.parentNode}}))};
+this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,f=0;null!=z&&(d=a.container.offsetWidth/2-z.x+c.x,f=a.container.offsetHeight/2-z.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
+1),a.container.scrollTop-=f*(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){z=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"))};
-EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,e=60;null!=d&&(e=parseInt(d));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
+EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,d){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(b){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+b.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,d){this.currentMenuElt=d;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};
EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};
-EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var d=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
-EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var d=0<a.indexOf("?")?1:0,e;for(e in urlParams)a=0==d?a+"?":a+"&",a+=e+"="+urlParams[e],d++;return a};
-EditorUi.prototype.setScrollbars=function(a){var d=this.editor.graph,e=d.container.style.overflow;d.scrollbars=a;this.editor.updateGraphComponents();e!=d.container.style.overflow&&("hidden"==d.container.style.overflow?(a=d.view.translate,d.view.setTranslate(a.x-d.container.scrollLeft/d.view.scale,a.y-d.container.scrollTop/d.view.scale),d.container.scrollLeft=0,d.container.scrollTop=0,d.minimumGraphSize=null,d.sizeDidChange()):(a=d.view.translate.x,e=d.view.translate.y,d.view.translate.x=0,d.view.translate.y=
-0,d.sizeDidChange(),d.container.scrollLeft-=Math.round(a*d.view.scale),d.container.scrollTop-=Math.round(e*d.view.scale)));this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var d=a.getPagePadding();a.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(d.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
-1;d=a.getGraphBounds();0<d.width&&0<d.height&&(d.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(d.x+d.width-a.container.clientWidth,d.x-10)),d.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(d.y+d.height-a.container.clientHeight,d.y-10)))}else{var d=a.getGraphBounds(),e=Math.max(d.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(a.container.clientHeight-Math.max(d.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(d=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-d.width)/2)-d.x),Math.floor(Math.max(0,(a.container.clientHeight-d.height)/2)-d.y))):(d=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-d.width)/2)-d.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
-d.height)/4))-d.y)))};
-EditorUi.prototype.setPageVisible=function(a){var d=this.editor.graph,e=mxUtils.hasScrollbars(d.container),b=0,h=0;e&&(b=d.view.translate.x*d.view.scale-d.container.scrollLeft,h=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=a;d.pageBreaksVisible=a;d.preferPageSize=a;d.view.validateBackground();e&&(a=d.getSelectionCells(),d.clearSelection(),d.setSelectionCells(a));d.sizeDidChange();e&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-b,d.container.scrollTop=d.view.translate.y*
-d.view.scale-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,d,e,b){this.ui=a;this.previousColor=this.color=d;this.previousImage=this.image=e;this.previousFormat=this.format=b;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}this.ignoreImage||(this.image=this.previousImage,d=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=d);null!=this.previousFormat&&(this.format=this.previousFormat,d=a.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),
-this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);return b};mxCodecRegistry.register(a)})();
+EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
+EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,e;for(e in urlParams)a=0==b?a+"?":a+"&",a+=e+"="+urlParams[e],b++;return a};
+EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,e=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();e!=b.container.style.overflow&&("hidden"==b.container.style.overflow?(a=b.view.translate,b.view.setTranslate(a.x-b.container.scrollLeft/b.view.scale,a.y-b.container.scrollTop/b.view.scale),b.container.scrollLeft=0,b.container.scrollTop=0,b.minimumGraphSize=null,b.sizeDidChange()):(a=b.view.translate.x,e=b.view.translate.y,b.view.translate.x=0,b.view.translate.y=
+0,b.sizeDidChange(),b.container.scrollLeft-=Math.round(a*b.view.scale),b.container.scrollTop-=Math.round(e*b.view.scale)));this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
+1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
+b.height)/4))-b.y)))};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,k=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
+b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),
+this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};
EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),d=this.actions.get("redo"),e=this.editor.undoManager,b=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,b);e.addListener(mxEvent.UNDO,b);e.addListener(mxEvent.REDO,b);e.addListener(mxEvent.CLEAR,b);var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);b()};var m=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,d){m.apply(this,arguments);b()};b()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,d=!a.isSelectionEmpty(),e=!1,b=!1,h=a.getSelectionCells();if(null!=h)for(var m=0;m<h.length;m++){var p=h[m];a.getModel().isEdge(p)&&(b=!0);a.getModel().isVertex(p)&&(e=!0);if(b&&e)break}h="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
-0;m<h.length;m++)this.actions.get(h[m]).setEnabled(d);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(b);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);b=e&&1==
-a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||b&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||b&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(b&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(d||null!=a.view.currentRoot);
-this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));d=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);
-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);d=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(d);this.menus.get("insert").setEnabled(d);this.menus.get("direction").setEnabled(d&&e);this.menus.get("align").setEnabled(d&&
-e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(d&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(d);this.actions.get("selectEdges").setEnabled(d);this.actions.get("selectAll").setEnabled(d);this.actions.get("selectNone").setEnabled(d);this.updatePasteActionStates()};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var d=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,b=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,b=d?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var h=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(h=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-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 q=0;if(null!=this.sidebarFooterContainer){var u=
-this.footerHeight+h,q=Math.max(0,Math.min(b-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"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?m+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+h+"px";this.hsplit.style.left=m+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);d?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-d=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=d-q+"px",this.formatContainer.style.height=d+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+h+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=h+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+h+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+h+"px",this.formatContainer.style.bottom=
-this.footerHeight+h+"px",this.diagramContainer.style.bottom=this.footerHeight+h+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var p=k[l];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(e=!0);if(d&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
+0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==
+a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);
+this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
+this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&
+e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),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 q=0;if(null!=this.sidebarFooterContainer){var u=
+this.footerHeight+k,q=Math.max(0,Math.min(d-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"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?l+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=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
+b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=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",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=
+this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2155,251 +2156,252 @@ EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
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 d=document.createElement("div");d.className=a;return d};
-EditorUi.prototype.addSplitHandler=function(a,d,e,b){function h(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,q+(d?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(u=!0,c=null)}}function m(a){h(a);p=q=null}var p=null,q=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(d?a.style.left:a.style.bottom);d||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var d=null!=c?c-e:0;c=f();b(d);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,h,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,m)})};
-EditorUi.prototype.showDialog=function(a,d,e,b,h,m,p,q){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,d,e,b,h,m,p,q);this.dialogs.push(this.dialog)};
+EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(u=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
+EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p,q){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p,q);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),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,d){var e=this.editor.graph,b=e.cellEditor.saveSelection(),h=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(b);d(a)},function(){e.cellEditor.restoreSelection(b)});this.showDialog(m.container,230,h,!0,!1);m.init()};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),l=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(l.container,230,k,!0,!1);l.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var d=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var b=a.lastIndexOf("&lt;/mxGraphModel&gt;");b>e&&(d=a.substring(e,b+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(h){}return d};
-EditorUi.prototype.extractGraphModelFromEvent=function(a){var d=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
-(d=e);return d};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(d))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,d,e){var b=this.editor.graph;if(b.isEnabled()){b.getModel().beginUpdate();try{a()}catch(h){throw h;}finally{this.allowAnimation&&d&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(b),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){b.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(b.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,d,e,b){b=this.editor.graph.cellEditor;var h=b.saveSelection(),m=mxUtils.prompt(a,d);b.restoreSelection(h);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){e(m,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,d,e){a=new LinkDialog(this,a,d,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
+EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
+(b=e);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.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 d=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=d&&0<d.length){var e=new Image;e.onload=function(){a(new mxImage(d,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=d}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,d,e){mxUtils.confirm(a)?null!=d&&d():null!=e&&e()};
-EditorUi.prototype.createOutline=function(a){var d=new mxOutline(this.editor.graph);d.border=20;mxEvent.addListener(window,"resize",function(){d.update()});this.addListener("pageFormatChanged",function(){d.update()});return d};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function d(a,c,d){p.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var f=b.getSelectionCells(),g=0;g<f.length;g++)if(b.getModel().isVertex(f[g])&&b.isCellResizable(f[g])){var e=b.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),b.getModel().setGeometry(f[g],e))}}finally{b.getModel().endUpdate()}}else f=
-b.getSelectionCell(),g=b.model.getParent(f),e=null,1==b.getSelectionCount()&&b.model.isVertex(f)&&null!=b.layoutManager&&!b.isCellLocked(f)&&(e=b.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?b.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||b.model.add(g,f,Math.min(b.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-p.length){b.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var e=this,b=this.editor.graph,h=new mxKeyHandler(b),m=h.isEventIgnored;h.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)&&m.apply(this,arguments)};h.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};h.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=h.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&
-mxEvent.isAltDown(a)){var f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=u[a.keyCode]&&!b.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=b.connectVertex(b.getSelectionCell(),u[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
-b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?function(){d(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){d(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return c.apply(this,arguments)};h.bindAction=mxUtils.bind(this,function(a,c,d,b){var f=this.actions.get(d);
-null!=f&&(d=function(){f.isEnabled()&&f.funct()},c?b?h.bindControlShiftKey(a,d):h.bindControlKey(a,d):b?h.bindShiftKey(a,d):h.bindKey(a,d))});var f=h.escape;h.escape=function(a){f.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){b.exitGroup()});h.bindControlShiftKey(35,function(){b.enterGroup()});h.bindKey(36,function(){b.home()});h.bindKey(35,function(){b.refresh()});h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(80,!0,"print");h.bindAction(79,
-!0,"outline",!0);h.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)h.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),h.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),h.bindControlKey(13,function(){b.isEnabled()&&b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),!1))}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(46,!1,"delete"),h.bindAction(46,!0,"deleteAll"),h.bindAction(72,!0,"resetView"),h.bindAction(72,
-!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,!0,"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,"toBack",!0),h.bindAction(70,!0,
-"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,!0,"lockUnlock"),h.bindAction(76,!0,"layers",!0),h.bindAction(80,!0,"formatPanel",!0),h.bindAction(85,!0,"underline"),h.bindAction(85,!0,
-"ungroup",!0),h.bindAction(190,!0,"superscript"),h.bindAction(188,!0,"subscript"),h.bindKey(13,function(){b.isEnabled()&&b.startEditingAtCell()}),h.bindKey(113,function(){b.isEnabled()&&b.startEditingAtCell()});mxClient.IS_WIN?h.bindAction(89,!0,"redo"):h.bindAction(90,!0,"redo",!0);return h};
+EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)};
+EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
+EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f=
+d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
+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 e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=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)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=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 f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.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!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b);
+null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var f=k.escape;k.escape=function(a){f.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,
+!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,
+!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,
+"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,
+"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
-"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<d.length;a++)null!=d[a]&&null!=d[a].parentNode&&d[a].parentNode.removeChild(d[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
-(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-Graph=function(a,d,e,b,h){mxGraph.call(this,a,d,e,b);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;d=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=a.indexOf("/",d+2),0<d&&(this.domainUrl=a.substring(0,d)),d=a.lastIndexOf("/"),0<d&&(this.domainPathUrl=a.substring(0,d+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 m=null,p=null,q=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event");if(!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())){var f=b.getState();null!=f&&this.model.isEdge(f.cell)&&(m=new mxPoint(b.getGraphX(),b.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=b,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,b.getGraphX(),b.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(b))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,f;for(f in b)if(null!=b[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(d.getEvent())&&
-!mxEvent.isShiftDown(d.getEvent())&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=m&&null!=q&&null!=p){if(b=q,Math.abs(m.x-d.getGraphX())>f||Math.abs(m.y-d.getGraphY())>f){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var g=this.selectionCellsHandler.getHandler(b.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),k=this.view.getEdgeStyle(b);f=k==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==g.bends.length-1||null!=b.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=b.absolutePoints,null!=f&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(m.x,m.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=g.bends.length-1:null!=k&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(d.getGraphX(),d.getGraphX(),e),u=m=p=q=null,c=!1,d.consume(),this.graphHandler.reset()}}}else if(b=d.getState(),null!=b&&this.model.isEdge(b.cell)){g=null;f=b.absolutePoints;if(null!=f)if(e=new mxRectangle(d.getGraphX(),
-d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,d.getGraphX(),d.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)k=this.view.getEdgeStyle(b),g="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(k=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),
-k<f.length-1&&0<=k&&(g=0==Math.round(f[k].x-f[k+1].x)?"col-resize":"row-resize"));null!=g&&b.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){u=m=p=q=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==b&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],d=this.graph.pageFormat,b=this.graph.pageScale,g=d.width*b,d=d.height*b,b=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),l=0;l<k.width;l++)c.push(new mxRectangle(((k.x+l)*g+b.x)*e,(k.y*d+b.y)*e,g*e,d*e));for(l=0;l<k.height;l++)c.push(new mxRectangle((k.x*g+b.x)*e,((k.y+l)*d+b.y)*e,g*e,d*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),d=[],b=0;b<c.length;b++){var f=this.graph.view.getState(c[b]),f=null!=f?f.style:this.graph.getCellStyle(c[b]);
-"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[b]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&d.push(f)):d.push(c[b])}return d};this.connectionHandler.createTargetVertex=function(a,c){var d=this.graph.view.getState(c),d=null!=d?d.style:this.graph.getCellStyle(c);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(c),this.graph.model.isVertex(d)&&(c=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);
-this.getRubberband=function(){return g};var k=(new Date).getTime(),r=0,l=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;l.apply(this,arguments);a!=this.currentState?(k=(new Date).getTime(),r=0):r=(new Date).getTime()-k};var n=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&n.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var B=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(B=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=B)}));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,
+Graph=function(a,b,e,d,k){mxGraph.call(this,a,b,e,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 l=null,p=null,q=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 f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(d);f=h==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==g.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),u=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){g=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)h=this.view.getEdgeStyle(d),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(h=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
+h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){u=l=p=q=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 f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,g=b.width*d,b=b.height*d,d=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)c.push(new mxRectangle(((h.x+n)*g+d.x)*e,(h.y*b+d.y)*e,g*e,b*e));for(n=0;n<h.height;n++)c.push(new mxRectangle((h.x*g+d.x)*e,((h.y+n)*b+d.y)*e,g*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var f=this.graph.view.getState(c[d]),f=null!=f?f.style:this.graph.getCellStyle(c[d]);
+"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[d]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&b.push(f)):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 g=new mxRubberband(this);
+this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),r=0):r=(new Date).getTime()-n};var m=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&m.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var A=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(A=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=A)}));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 t=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 t.apply(this,arguments)};this.selectRegion=function(a,c){var d=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(d,c);return d};this.getAllCells=function(a,c,d,b,f,g){g=null!=g?g:[];if(0<d||0<b){var e=this.getModel(),k=a+d,l=c+b;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var n=e.getChildCount(f),F=0;F<n;F++){var r=e.getChildAt(f,F),t=this.view.getState(r);if(null!=
-t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var y=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(t=mxUtils.getBoundingBox(t,y));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=l&&t.y>=c&&t.x+t.width<=k&&g.push(r);this.getAllCells(a,c,d,b,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,d){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var d=c.getProperty("event").getState();H=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var d=
-c.getProperty("event"),b=c.getProperty("cell");null==b?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),g.start(d.x,d.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);H=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return t.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,f,g){g=null!=g?g:[];if(0<b||0<d){var e=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),F=0;F<m;F++){var r=e.getChildAt(f,F),t=this.view.getState(r);if(null!=
+t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var y=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(t=mxUtils.getBoundingBox(t,y));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=c&&t.x+t.width<=h&&g.push(r);this.getAllCells(a,c,b,d,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();H=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)),g.start(b.x,b.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);H=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var G=this.updateMouseEvent;this.updateMouseEvent=function(a){a=G.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,d,e){e=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="'+d+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,d)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
+Graph.createSvgImage=function(a,b,e){e=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">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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.defaultGraphBackground="#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,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,h=!0,m=null,p=mxUtils.bind(this,function(a){h=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){h=h&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<d&&Math.abs(m.y-mxEvent.getClientY(a))<d}),u=mxUtils.bind(this,function(c){if(h)for(var d=mxEvent.getSource(c);null!=
-d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,c);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,d,e,p,q,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-d,e,p,q,u){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var b=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,d,b,p,q,u);if(null!=g)return g;if(this.isCellVisible(b)&&(q&&this.model.isEdge(b)||p&&this.model.isVertex(b))&&(g=this.view.getState(b),null!=g&&(null==u||!u(g,a,d))&&this.intersects(g,a,d)))return b}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 d=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+d.x)*e,(a.y+d.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
-function(d){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
-if(null!=a)if(a=a.parentNode,this.useCssTransforms){var d=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(d!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var e=a.style.display;a.style.display="none";a.getBBox();a.style.display=e}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var d=mxGraphView.prototype.validateBackgroundPage;
-mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);d.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,d,m){var b=this.useCssTransforms,h=this.view.scale,u=this.view.translate;b&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
-!1);e.apply(this,arguments);b&&(this.view.scale=h,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,d,e){d=d.getAttribute("href");if(null!=d&&!this.isCustomLink(d)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(d)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(d),a);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(a,d,e){var b=window;"_self"==d&&window!=window.top?window.location.href=a:a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top?(a=a.split("#")[1],window.location.hash=="#"+a&&(window.location.hash=""),window.location.hash=a):(b=window.open(a,d),null==b||e||(b.opener=null));return b};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,p,q,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,e,p,q,u){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,b,d,p,q,u);if(null!=g)return g;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(g=this.view.getState(d),null!=g&&(null==u||!u(g,a,b))&&this.intersects(g,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,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
+function(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 e=a.style.display;a.style.display="none";a.getBBox();a.style.display=e}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
+mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,k=this.view.scale,u=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
+!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
+Graph.prototype.openLink=function(a,b,e){var d=window;"_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||e||(d.opener=null));return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var d=this.graph.view.getState(a);a=null!=d?d.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),d.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(a,
-"resizeLast","0"),d.spacing=a.stackSpacing||d.spacing,d.border=a.stackBorder||d.border,d.marginLeft=a.marginLeft||0,d.marginRight=a.marginRight||0,d.marginTop=a.marginTop||0,d.marginBottom=a.marginBottom||0,d.fill=!0,d):"treeLayout"==a.childLayout?(d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),d.groupPadding=mxUtils.getValue(a,"parentPadding",20),d.levelDistance=mxUtils.getValue(a,"treeLevelDistance",
-30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d):"flowLayout"==a.childLayout?(d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),d.parentBorder=mxUtils.getValue(a,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",
-mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(d.x/this.view.scale-this.view.translate.x),b=Math.ceil(d.y/this.view.scale-this.view.translate.y),h=Math.floor(e/a.width),m=Math.floor(b/a.height);return new mxRectangle(h,m,Math.ceil((e+Math.floor(d.width/this.view.scale))/a.width)-h,Math.ceil((b+Math.floor(d.height/this.view.scale))/a.height)-m)};
-Graph.prototype.sanitizeHtml=function(a,d){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,d;for(d in this.model.cells){var e=this.model.cells[d];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a);a=null!=b?b.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,
+"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",
+30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",
+mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)};
+Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)&&!mxClient.IS_MAC};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
-Graph.prototype.isSplitTarget=function(a,d,e){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(d=this.replacePlaceholders(a,d));return d};
-Graph.prototype.isLabelMovable=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
-Graph.prototype.getGlobalVariable=function(a){var d=null;"date"==a?d=(new Date).toLocaleDateString():"time"==a?d=(new Date).toLocaleTimeString():"timestamp"==a?d=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),d=this.formatDate(new Date,a));return d};
-Graph.prototype.formatDate=function(a,d,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\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)||(d=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");d=String(b.masks[d]||d||b.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),k=a[q+"Hours"](),r=a[q+"Minutes"](),l=a[q+"Seconds"](),q=a[q+"Milliseconds"](),n=e?0:a.getTimezoneOffset(),w={d:u,dd:p(u),ddd:b.i18n.dayNames[c],dddd:b.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:b.i18n.monthNames[f],mmmm:b.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:k%12||12,hh:p(k%12||12),H:k,HH:p(k),M:r,MM:p(r),s:l,ss:p(l),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(m,""),o:(0<n?"-":"+")+p(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
+Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};
+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,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,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),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),w={d:u,dd:p(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:r,MM:p(r),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+p(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%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 w?w[a]:a.slice(1,
a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var d=this.getModel(),e=d.getChildCount(d.root),b=0;b<e;b++)mxUtils.bind(this,function(b){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var h=document.createElement("input");h.style.display="inline-block";h.setAttribute("type","checkbox");d.isVisible(b)&&(h.setAttribute("checked","checked"),
-h.defaultChecked=!0);e.appendChild(h);var q=this.convertValueToString(b)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(h,"click",function(){null!=h.getAttribute("checked")?h.removeAttribute("checked"):h.setAttribute("checked","checked");d.setVisible(b,h.checked)})})(d.getChildAt(d.root,b));return a};
-Graph.prototype.replacePlaceholders=function(a,d){var e=[];if(null!=d){for(var b=0;match=this.placeholderPattern.exec(d);){var h=match[0];if(2<h.length&&"%label%"!=h&&"%tooltip%"!=h){var m=null;if(match.index>b&&"%"==d.charAt(match.index-1))m=h.substring(1);else{var p=h.substring(1,h.length-1);if(0>p.indexOf("{"))for(var q=a;null==m&&null!=q;)null!=q.value&&"object"==typeof q.value&&(m=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==m&&(m=this.getGlobalVariable(p))}e.push(d.substring(b,
-match.index)+(null!=m?m:h));b=match.index+h.length}}e.push(d.substring(b))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,d,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(d)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,d,e,b,h,m){m=m?m:!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);d==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):d==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=d==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,u=this.view.translate,c=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(b)&&!h?null:this.getCellAt(c+p.x*q,u+p.y*q);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),q=this.view.getState(m),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(m=
-null));if(h=!mxEvent.isShiftDown(b)||h)d==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=d==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];this.model.beginUpdate();try{q=m;if(null==q&&h){for(var c=a,f=this.getCellGeometry(a);null!=
-f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),k=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(k,"part",!1)){var r=this.model.getParent(c);this.model.isVertex(r)&&(c=r)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var l=mxEvent.isControlDown(b)&&h||null==m&&null!=f&&f.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var n=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=l.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==l.parent&&(n=b.parent.getIndex(b),this.model.add(b.parent,l,n))}null==m&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&d==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent,
-q,n));null!=l&&e.push(l);null==m&&null!=q&&e.push(q);null==q&&null!=l&&l.geometry.setTerminalPoint(p,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}return e};
-Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),d=[],e,b;for(b in this.model.cells)if(e=this.model.cells[b],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&d.push(e);return d.join(" ")};
-Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var d=a.getAttribute("placeholder"),e=a,b=null;null==b&&null!=e;)null!=e.value&&"object"==typeof e.value&&(b=e.hasAttribute(d)?null!=e.getAttribute(d)?e.getAttribute(d):"":null),e=this.model.getParent(e);return b||""}return a.value.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
+k.defaultChecked=!0);e.appendChild(k);var q=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(d,
+match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
+Graph.prototype.connectVertex=function(a,b,e,d,k,l){l=l?l:!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-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
+var q=this.view.scale,u=this.view.translate,c=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,u+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
+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==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var c=a,f=this.getCellGeometry(a);null!=
+f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),n=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(n,"part",!1)){var r=this.model.getParent(c);this.model.isVertex(r)&&(c=r)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(d)&&k||null==l&&null!=f&&f.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var m=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=h.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==h.parent&&(m=d.parent.getIndex(d),this.model.add(d.parent,h,m))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,
+q,m));null!=h&&e.push(h);null==l&&null!=q&&e.push(q);null==q&&null!=h&&h.geometry.setTerminalPoint(p,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
+Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return 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 d=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return d};
-Graph.prototype.updateAlternateBounds=function(a,d,e){if(null!=a&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var b=this.layoutManager.getLayout(this.model.getParent(a));null!=b&&b.constructor==mxStackLayout&&(b.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,d,e,b,h){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),q=this.getCellGeometry(e[m]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=u){var f=this.model.getParent(e[m]),g=this.layoutManager.getLayout(f);
-null==g?null!=h&&this.isMoveCellsEvent(h)&&this.moveSiblings(p,f,u,c):null!=h&&mxEvent.isAltDown(h)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,d,e,b){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,d,!0,!0);for(d=0;d<h.length;d++)if(h[d]!=a.cell){var m=this.view.getState(h[d]),p=this.getCellGeometry(h[d]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(h[d],p))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,d,e,b){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var h=d.horizontal;null!=a&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==h&&!d.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),d.horizontal?m.width+=e+Math.min(0,p.width/this.view.scale-m.width):m.height+=b+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
-m));a=this.model.getParent(a);d=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return null!=d.connectable?"0"!=d.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,d,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,d,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
-Graph.prototype.isCellFoldable=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=d.collapsible||!this.isContainer(a)&&"1"==d.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
-Graph.prototype.zoom=function(a,d){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.getTooltipForCell=function(a){var d="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),d=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var b=[];this.isEnabled()&&e.push("link");for(var h=0;h<a.length;h++)0>mxUtils.indexOf(e,a[h].nodeName)&&0<a[h].nodeValue.length&&b.push({name:a[h].nodeName,value:a[h].nodeValue});b.sort(function(a,d){return a.name<d.name?
--1:a.name>d.name?1:0});for(h=0;h<b.length;h++)"link"==b[h].name&&this.isCustomLink(b[h].value)||(d+=("link"!=b[h].name?"<b>"+b[h].name+":</b> ":"")+mxUtils.htmlEntities(b[h].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;">'+d+"</div>"))}}return d};Graph.prototype.stringToBytes=function(a){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=a.charCodeAt(e);return d};
-Graph.prototype.bytesToString=function(a){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);return d.join("")};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
-Graph.prototype.zapGremlins=function(a){for(var d=[],e=0;e<a.length;e++){var b=a.charCodeAt(e);(32<=b||9==b||10==b||13==b)&&d.push(a.charAt(e))}return d.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
-HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
-HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
-HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
-HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":
-IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
+Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
+Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
+Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=u){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
+null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,u,c):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a,
+l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.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,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?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()};
+Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,b){return a.name<b.name?
+-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(b+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};
+Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.prototype.compressNode=function(a){return this.compress(this.zapGremlins(mxUtils.getXml(a)))};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};
+Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;
+HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";
+HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
+HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);
+HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
+HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+
+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,
-mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(d){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
-!mxEvent.isTouchEvent(d.getEvent())||this.graph.model.isVertex(d.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,b){d=!1;var e=b.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var m=this.getState(b.getState());null==m&&mxEvent.isTouchEvent(e)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,b){var e=b.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
-this.update(this.getState(b.getState()),b.getGraphX(),b.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,function(a,b){var e=b.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),b):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?
-this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(b.getGraphX(),b.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,b.getGraphX(),b.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,d){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
-HoverIcons.prototype.createArrow=function(a,d){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
-"inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=d&&e.setAttribute("title",d);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y),
+mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
+!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(d.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
+this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?
+this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
+HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
+"inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y),
this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown||
this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
-HoverIcons.prototype.visitNodes=function(a){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&a(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(d){d.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(a,d,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=d&&"orthogonalEdgeStyle"===
-mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",a),d.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,d,e){return this.graph.view.getState(this.graph.getCellAt(d,e))};
-HoverIcons.prototype.click=function(a,d,e){var b=e.getEvent(),h=e.getGraphX(),m=e.getGraphY(),h=this.getStateAt(a,h,m);null==h||!this.graph.model.isEdge(h.cell)||mxEvent.isControlDown(b)||h.getVisibleTerminalState(!0)!=a&&h.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,d,this.graph.defaultEdgeLength,b),this.graph.selectCellsForConnectVertex(a,b,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(b)?this.update(this.getState(this.graph.view.getState(a[1]))):
-this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(h.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
+HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
+mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
+HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
+this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
-var d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=d&&(a.x-=d.horizontalOffset/2,a.y-=d.verticalOffset/2,a.width+=d.horizontalOffset,a.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&a.add(d.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
+var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
"px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+
-"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var d=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),b=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=d&&d==e&&e==b&&b==a&&(a=b=e=d=null);var h=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,d){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==b||null==h||b.height<6*h.height&&b.width<6*h.width)?d.style.visibility="hidden":d.style.visibility="visible"});
-m(d,this.arrowRight);m(e,this.arrowLeft);m(b,this.arrowUp);m(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",
+"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(),
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==k||d.height<6*k.height&&d.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"});
+l(b,this.arrowRight);l(e,this.arrowLeft);l(d,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",
mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==a?a=d:a.add(d))});return a};
-HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var d=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(a=d)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a)}return a};
-HoverIcons.prototype.update=function(a,d,e){if(this.graph.connectionArrowsEnabled){var b=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,b=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,d,e))}),this.updateDelay+10))):null!=this.startTime&&(b=(new Date).getTime()-this.startTime);
-this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,e)?this.reset(!1):(null!=this.currentState||b>this.activationDelay)&&this.currentState!=a&&(b>this.updateDelay&&null!=a||null==this.bbox||null==d||null==e||!mxUtils.contains(this.bbox,d,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):
+HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
+HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a)}return a};
+HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);
+this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):
this.reset())}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 d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var b=this.getState(a);null!=b&&this.graph.model.isEdge(b.cell)&&null!=b.style&&1!=b.style[mxConstants.STYLE_CURVED]&&!b.invalid&&this.updateLineJumps(b)&&this.graph.cellRenderer.redraw(b,!1,this.isRendering());b=d.apply(this,arguments);null!=
-b&&this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(b);return b};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var 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 c=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,d,f){var e=new mxPoint(d,f);e.type=c;b.push(e);e=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==e||e.type!=c||e.x!=d||e.y!=f},r=.5*this.scale,d=!1,b=[],l=0;l<c.length-1;l++){for(var n=c[l+1],w=c[l],v=[],h=c[l+2];l<
-c.length-2&&mxUtils.ptSegDistSq(w.x,w.y,h.x,h.y,n.x,n.y)<1*this.scale*this.scale;)n=h,l++,h=c[l+2];for(var d=e(0,w.x,w.y)||d,y=0;y<this.validEdges.length;y++){var t=this.validEdges[y],q=t.absolutePoints;if(null!=q&&mxUtils.intersects(a,t)&&"1"!=t.style.noJump)for(t=0;t<q.length-1;t++){for(var m=q[t+1],p=q[t],h=q[t+2];t<q.length-2&&mxUtils.ptSegDistSq(p.x,p.y,h.x,h.y,m.x,m.y)<1*this.scale*this.scale;)m=h,t++,h=q[t+2];h=mxUtils.intersection(w.x,w.y,n.x,n.y,p.x,p.y,m.x,m.y);if(null!=h&&(Math.abs(h.x-
-p.x)>r||Math.abs(h.y-p.y)>r)&&(Math.abs(h.x-m.x)>r||Math.abs(h.y-m.y)>r)){m=h.x-w.x;p=h.y-w.y;h={distSq:m*m+p*p,x:h.x,y:h.y};for(m=0;m<v.length;m++)if(v[m].distSq>h.distSq){v.splice(m,0,h);h=null;break}null==h||0!=v.length&&v[v.length-1].x===h.x&&v[v.length-1].y===h.y||v.push(h)}}}for(t=0;t<v.length;t++)d=e(1,v[t].x,v[t].y)||d}h=c[c.length-1];d=e(0,h.x,h.y)||d}a.routedPoints=b;return d}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,d){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),l,n=!0,w=null,v=null;l=[];var q=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var t=
-this.state.routedPoints[y],z=new mxPoint(t.x/this.scale,t.y/this.scale);0==y?z=c[0]:y==this.state.routedPoints.length-1&&(z=c[c.length-1]);var m=!1;if(null!=w&&1==t.type){var p=this.state.routedPoints[y+1],t=p.x/this.scale-z.x,p=p.y/this.scale-z.y,t=t*t+p*p;null==q&&(q=new mxPoint(z.x-w.x,z.y-w.y),v=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/v,q.y=q.y*f/v);t>f*f&&0<v&&(t=w.x-z.x,p=w.y-z.y,t=t*t+p*p,t>f*f&&(m=new mxPoint(z.x-q.x,z.y-q.y),t=new mxPoint(z.x+q.x,z.y+q.y),l.push(m),this.addPoints(a,l,d,b,!1,
-null,n),l=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(m.x-q.y*l,m.y+q.x*l),a.lineTo(t.x-q.y*l,t.y+q.x*l),a.lineTo(t.x,t.y)):"arc"==e?(l*=1.3,a.curveTo(m.x-q.y*l,m.y+q.x*l,t.x-q.y*l,t.y+q.x*l,t.x,t.y)):(a.moveTo(t.x,t.y),n=!0),l=[t],m=!0))}else q=null;m||(l.push(z),w=z)}this.addPoints(a,l,d,b,!1,null,n);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,d,b){if(null==c||null==
-a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{c=this.getTerminalPort(a,c,b);var f=this.getNextPoint(a,d,b),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var h=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,h,v,n);h=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);h+=parseFloat(a.style[b?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);f=this.getPerimeterPoint(c,f,0==g&&e,h);0!=g&&(h=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,h,v,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,d,b,f),b)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,d,b,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,a[f]);if(null!=g){var k=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==b||k<b)d=g,b=k}}null!=d&&(e=d)}return e};
-var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,d){var b=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(b=d.state.view.graph.replacePlaceholders(d.state.cell,b));return b};var q=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 d=
-c.substring(8,c.length-1),b=mxUtils.parseXml(a.view.graph.decompress(d));return new mxShape(new mxStencil(b.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var d=mxStencilRegistry.stencils[a];if(null==d&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){d=mxStencilRegistry.libraries[e];if(null!=d){if(null==mxStencilRegistry.packages[e]){for(var b=0;b<d.length;b++){var h=d[b];if(".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,null);else if(".js"==h.toLowerCase().substring(h.length-3,h.length))try{if(mxStencilRegistry.allowEval){var m=
-mxUtils.load(h);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",h,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);d=mxStencilRegistry.stencils[a]}}return d};
-mxStencilRegistry.getBasenameForStencil=function(a){var d=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var d=a[1],e=2;e<a.length-1;e++)d+="/"+a[e];return d};
-mxStencilRegistry.loadStencilSet=function(a,d,e,b){var h=mxStencilRegistry.packages[a];if(null!=e&&e||null==h){var m=!1;if(null==h)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,m=!0,mxStencilRegistry.parseStencilSet(b.documentElement,d,m))}));return}h=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=h;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=h&&null!=
-h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,d,m)}};mxStencilRegistry.loadStencil=function(a,d){if(null!=d)mxUtils.get(a,mxUtils.bind(this,function(a){d(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var d=0;d<a.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[d]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,d,e){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,d,e),b=b.nextSibling;else{e=null!=e?e:!0;var b=a.firstChild,h="";a=a.getAttribute("name");for(null!=a&&(h=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var h=h.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(h+m.toLowerCase(),new mxStencil(b));if(null!=d){var p=b.getAttribute("w"),
-q=b.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);d(h,m,a,p,q)}}b=b.nextSibling}}};
+(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 e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var e=new mxPoint(b,f);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=f},r=.5*this.scale,b=!1,d=[],h=0;h<c.length-1;h++){for(var m=c[h+1],w=c[h],v=[],k=c[h+2];h<
+c.length-2&&mxUtils.ptSegDistSq(w.x,w.y,k.x,k.y,m.x,m.y)<1*this.scale*this.scale;)m=k,h++,k=c[h+2];for(var b=e(0,w.x,w.y)||b,y=0;y<this.validEdges.length;y++){var t=this.validEdges[y],q=t.absolutePoints;if(null!=q&&mxUtils.intersects(a,t)&&"1"!=t.style.noJump)for(t=0;t<q.length-1;t++){for(var l=q[t+1],p=q[t],k=q[t+2];t<q.length-2&&mxUtils.ptSegDistSq(p.x,p.y,k.x,k.y,l.x,l.y)<1*this.scale*this.scale;)l=k,t++,k=q[t+2];k=mxUtils.intersection(w.x,w.y,m.x,m.y,p.x,p.y,l.x,l.y);if(null!=k&&(Math.abs(k.x-
+p.x)>r||Math.abs(k.y-p.y)>r)&&(Math.abs(k.x-l.x)>r||Math.abs(k.y-l.y)>r)){l=k.x-w.x;p=k.y-w.y;k={distSq:l*l+p*p,x:k.x,y:k.y};for(l=0;l<v.length;l++)if(v[l].distSq>k.distSq){v.splice(l,0,k);k=null;break}null==k||0!=v.length&&v[v.length-1].x===k.x&&v[v.length-1].y===k.y||v.push(k)}}}for(t=0;t<v.length;t++)b=e(1,v[t].x,v[t].y)||b}k=c[c.length-1];b=e(0,k.x,k.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,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,w=null,v=null;h=[];var q=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var t=
+this.state.routedPoints[y],z=new mxPoint(t.x/this.scale,t.y/this.scale);0==y?z=c[0]:y==this.state.routedPoints.length-1&&(z=c[c.length-1]);var l=!1;if(null!=w&&1==t.type){var p=this.state.routedPoints[y+1],t=p.x/this.scale-z.x,p=p.y/this.scale-z.y,t=t*t+p*p;null==q&&(q=new mxPoint(z.x-w.x,z.y-w.y),v=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/v,q.y=q.y*f/v);t>f*f&&0<v&&(t=w.x-z.x,p=w.y-z.y,t=t*t+p*p,t>f*f&&(l=new mxPoint(z.x-q.x,z.y-q.y),t=new mxPoint(z.x+q.x,z.y+q.y),h.push(l),this.addPoints(a,h,b,d,!1,
+null,m),h=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(l.x-q.y*h,l.y+q.x*h),a.lineTo(t.x-q.y*h,t.y+q.x*h),a.lineTo(t.x,t.y)):"arc"==e?(h*=1.3,a.curveTo(l.x-q.y*h,l.y+q.x*h,t.x-q.y*h,t.y+q.x*h,t.x,t.y)):(a.moveTo(t.x,t.y),m=!0),h=[t],l=!0))}else q=null;l||(h.push(z),w=z)}this.addPoints(a,h,b,d,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
+a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var k=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,k,v,m);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);f=this.getPerimeterPoint(c,f,0==g&&e,k);0!=g&&(k=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,k,v,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||n<d)b=g,d=n}}null!=b&&(e=b)}return e};
+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 q=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(n){null!=window.console&&console.log("Error in shape: "+n)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l=
+mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
+mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,l=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
+q=d.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(k,l,a,p,q)}}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 d=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
-d.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));
-for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var b=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=b.apply(this,arguments),c=a.getCell;
-a.getCell=mxUtils.bind(this,function(a){var d=c.apply(this,arguments);this.error=null;return d});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&&
+"#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));
+for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments),c=a.getCell;
+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,d,b){c=null!=c?c:0;d=null!=d?d:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},k=0;k<a;k++){var l=e.getChildAt(e.getRoot(),k);if(1!=a||this.isCellLocked(this.getDefaultParent()))l=this.importCells([l],0,0,this.model.getRoot(),null,g)[0],n=this.model.getChildren(l),this.moveCells(n,c,d),f=f.concat(n);else var n=
-e.getChildren(l),f=f.concat(this.importCells(n,c,d,this.getDefaultParent(),null,g))}if(b){this.isGridEnabled()&&(c=this.snap(c),d=this.snap(d));var t=this.getBoundingBoxFromGeometry(f,!0);null!=t&&this.moveCells(f,c-t.x,d-t.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var d=mxUtils.getValue(a.style,"points",null);if(null!=d){var b=[];try{for(var f=JSON.parse(d),d=0;d<f.length;d++){var e=f[d];b.push(new mxConnectionConstraint(new mxPoint(e[0],
-e[1]),2<e.length?"0"!=e[2]:!0))}}catch(E){}return b}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),d=0,b=0;b<c;b++){var f=this.model.getChildAt(a,b);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||d++)}return 0<d||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 d=this.model.getParent(a);null!=d&&(d=this.layoutManager.getLayout(d),null!=d&&d.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(),d=[];c.beginUpdate();try{for(var b=0;b<a.length;b++){var f=a[b];if(c.isEdge(f)){var e=c.getTerminal(f,!0),g=c.getTerminal(f,!1);c.setTerminal(f,g,!0);c.setTerminal(f,e,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();
-var l=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);c.setGeometry(f,k);var t=this.view.getState(f),r=this.view.getState(e),y=this.view.getState(g);if(null!=t){var F=null!=r?this.getConnectionConstraint(t,r,!0):null,h=null!=y?this.getConnectionConstraint(t,y,!1):null;this.setConnectionConstraint(f,e,!0,h);this.setConnectionConstraint(f,g,!1,F)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
-2;k.y+=k.height/2-k.width/2;var v=k.width;k.width=k.height;k.height=v;c.setGeometry(f,k);var q=this.view.getState(f);if(null!=q){var w=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==w?w="south":"south"==w?w="west":"west"==w?w="north":"north"==w&&(w="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,w,[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==
-a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);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 d=0;d<c.length;d++){var b=this.view.getState(c[d]);null!=b&&null!=b.shape&&null!=b.shape.stencil&&this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(c[d]):this.isReplacePlaceholders(c[d])&&
-this.view.invalidate(c[d],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var d=a.ownerDocument.createElement(null!=c?c:"span"),b=Array.prototype.slice.call(a.attributes);attr=b.pop();)d.setAttribute(attr.nodeName,attr.nodeValue);d.innerHTML=a.innerHTML;a.parentNode.replaceChild(d,a)};Graph.prototype.updateLabelElements=function(a,c,d){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);
-if(null!=e&&0<e.length){b.innerHTML=e;for(var g=b.getElementsByTagName(null!=d?d:"*"),k=0;k<g.length;k++)c(g[k]);b.innerHTML!=e&&this.cellLabelChanged(a[f],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,d){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 b=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&
-f.hasAttribute(b)){this.setAttributeForCell(f,b,c);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var b=[],d=0;d<a.length;d++){var f=this.model.getParent(a[d]);null==f||c.get(f)||(c.put(f,!0),b.push(f))}for(d=0;d<b.length;d++)if(f=this.view.getState(b[d]),
+Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c?c:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var n=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))n=this.importCells([n],0,0,this.model.getRoot(),null,g)[0],m=this.model.getChildren(n),this.moveCells(m,c,b),f=f.concat(m);else var m=
+e.getChildren(n),f=f.concat(this.importCells(m,c,b,this.getDefaultParent(),null,g))}if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var t=this.getBoundingBoxFromGeometry(f,!0);null!=t&&this.moveCells(f,c-t.x,b-t.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var d=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];d.push(new mxConnectionConstraint(new mxPoint(e[0],
+e[1]),2<e.length?"0"!=e[2]:!0))}}catch(E){}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 f=this.model.getChildAt(a,d);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.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 f=a[d];if(c.isEdge(f)){var e=c.getTerminal(f,!0),g=c.getTerminal(f,!1);c.setTerminal(f,g,!0);c.setTerminal(f,e,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();
+var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var t=this.view.getState(f),r=this.view.getState(e),y=this.view.getState(g);if(null!=t){var F=null!=r?this.getConnectionConstraint(t,r,!0):null,k=null!=y?this.getConnectionConstraint(t,y,!1):null;this.setConnectionConstraint(f,e,!0,k);this.setConnectionConstraint(f,g,!1,F)}b.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/
+2;h.y+=h.height/2-h.width/2;var v=h.width;h.width=h.height;h.height=v;c.setGeometry(f,h);var q=this.view.getState(f);if(null!=q){var w=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==w?w="south":"south"==w?w="west":"west"==w?w="north":"north"==w&&(w="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,w,[f])}b.push(f)}}}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"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);
+if(null!=e&&0<e.length){d.innerHTML=e;for(var g=d.getElementsByTagName(null!=b?b:"*"),h=0;h<g.length;h++)c(g[h]);d.innerHTML!=e&&this.cellLabelChanged(a[f],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"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&
+f.hasAttribute(d)){this.setAttributeForCell(f,d,c);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}for(b=0;b<d.length;b++)if(f=this.view.getState(d[b]),
null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)c.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=
-function(a){for(var c=[],d=0;d<a.length;d++)if(this.isCellDeletable(a[d])){var b=this.view.getState(a[d]);if(null!=b){var f=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&b==mxConstants.NONE&&c.push(a[d])}}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,d){var b;null!=a.value&&"object"==typeof a.value?b=a.value.cloneNode(!0):(b=mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=d&&0<d.length?b.setAttribute(c,d):b.removeAttribute(c);this.model.setValue(a,b)};Graph.prototype.getDropTarget=function(a,c,d,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))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 d=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var b=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=b||this.firstClickSource!=
-f||null!=b&&null!=b.text&&null!=b.text.node&&(mxUtils.contains(b.text.boundingBox,d.x,d.y)||mxUtils.isAncestorNode(b.text.node,mxEvent.getSource(a)))||(null!=b||this.isCellLocked(this.getDefaultParent()))&&(null==b||this.isCellLocked(b.cell))||!(null!=b||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(d.x,d.y,b))}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,d=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var b=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,b.x*f.width),d=Math.max(d,b.y*f.height);return new mxPoint(this.snap(c+a),this.snap(d+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),d=this.getInsertPoint(),b=this.snap(Math.round(Math.max(d.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(d.y,
-(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(b,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,d){var b=new mxCell;b.value="Text";b.style="text;html=1;resizable=0;points=[];";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=d){b.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";b.geometry.relative=!0;b.connectable=!1;var f=this.view.getRelativePoint(d,a,c);b.geometry.x=Math.round(1E4*f.x)/
-1E4;b.geometry.y=Math.round(f.y);b.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(d,b.geometry),e=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else b.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-f.x,b.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([b],null!=d?d.cell:null),
-this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};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,d){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var d=0;d<a.length;d++){var b=this.getAbsoluteUrl(a[d].getAttribute("href"));
-null!=b&&(a[d].setAttribute("rel",this.linkRelation),a[d].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[d],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var f=this.container.style.cursor,e=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
-g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,d){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
-"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var d=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(d>e||b>e)&&this.clear()}}else{for(d=c.getSource();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null!=d?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
-!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var f=b.getSource(),k=b.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=
-this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=mxEvent.isMiddleMouseButton(k)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,k),b.consume())):null!=d&&!b.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&d(b.getEvent()));this.clear()},activate:function(a){this.currentLink=
-g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,
-c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var d=this.getModel(),b=this.gridSize,f=[];d.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var k=d.getParent(a[g]),l=this.moveCells([e[g]],b,b,!1)[0];f.push(l);if(c)d.add(k,e[g]);else{var n=k.getIndex(a[g]);d.add(k,e[g],n+1)}}}finally{d.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,d){if(null!=a){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<b.length;e++)f.push(b[e]);
-document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",d);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"),d=[],b=0;b<c.length;b++)d.push(c[b]);document.execCommand("createlink",!1,mxUtils.trim(a));
-c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==d.length+1)for(b=c.length-1;0<=b;b--)if(c[b]!=d[b-1]){for(c=c[b].getElementsByTagName("a");0<c.length;){for(d=c[0].parentNode;null!=c[0].firstChild;)d.insertBefore(c[0].firstChild,c[0]);d.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),d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);
-return c||"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==d[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var d=[],b=null,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var k=a?g.getCenterX():g.getCenterY(),b=null!=b?Math.max(b,k):k,f=null!=f?Math.min(f,k):k;d.push(g)}}if(2<d.length){d.sort(function(c,d){return a?c.x-d.x:c.y-d.y});
-g=this.view.translate;k=this.view.scale;f=f/k-(a?g.x:g.y);b=b/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var l=(b-f)/(d.length-1),b=f,e=1;e<d.length-1;e++){var n=this.view.getState(this.model.getParent(d[e].cell)),t=this.getCellGeometry(d[e].cell),b=b+l;null!=t&&null!=n&&(t=t.clone(),a?t.x=Math.round(b-t.width/2)-n.origin.x:t.y=Math.round(b-t.height/2)-n.origin.y,this.getModel().setGeometry(d[e].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),d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(b=0;b<c.length;b++){var f=this.view.getState(a[b]);if(null!=f){var e=this.getCellGeometry(c[b]);null==e||!e.relative||this.model.isEdge(a[b])||d.get(this.model.getParent(a[b]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}d=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),
-0);for(b=0;b<a.length;b++)f.add(e,c[b]);return d.encode(f)};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,d,b,f,e,g,k,l){var n=this.useCssTransforms;n&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;d=null!=d?d:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||b?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());
-if(null==t)throw Error(mxResources.get("drawingEmpty"));var r=this.view.scale,y=mxUtils.createXmlDocument(),h=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"svg"):y.createElement("svg");null!=a&&(null!=h.style?h.style.backgroundColor=a:h.setAttribute("style","background-color:"+a));null==y.createElementNS?(h.setAttribute("xmlns",mxConstants.NS_SVG),h.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);
-a=c/r;var v=Math.max(1,Math.ceil(t.width*a)+2*d),w=Math.max(1,Math.ceil(t.height*a)+2*d);h.setAttribute("version","1.1");h.setAttribute("width",v+"px");h.setAttribute("height",w+"px");h.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+v+" "+w);y.appendChild(h);var q=this.createSvgCanvas(h);q.foOffset=f?-.5:0;q.textOffset=f?-.5:0;q.imageOffset=f?-.5:0;q.translate(Math.floor((d/c-t.x)/r),Math.floor((d/c-t.y)/r));var x=document.createElement("textarea"),z=q.createAlternateContent;q.createAlternateContent=
-function(a,c,d,b,f,e,g,k,l,n,t,r,y){var h=this.state;if(null!=this.foAltText&&(0==b||0!=h.fontSize&&e.length<5*b/h.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(b/2));v.setAttribute("y",Math.round((f+h.fontSize)/2));v.setAttribute("fill",h.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(h.fontSize)+"px");v.setAttribute("font-family",h.fontFamily);(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight",
-"bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");try{return x.innerHTML=e,v.textContent=x.value,v}catch(Ca){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var m=this.backgroundImage;if(null!=m){c=r/c;var F=this.view.translate,p=new mxRectangle(F.x*c,F.y*c,m.width*c,m.height*c);mxUtils.intersects(t,p)&&
-q.image(F.x,F.y,m.width,m.height,m.src,!0)}q.scale(a);q.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var B=k.drawCellState;k.drawCellState=function(a,c){for(var d=a.view.graph,b=d.isCellSelected(a.cell),f=d.model.getParent(a.cell);!e&&!b&&null!=f;)b=d.isCellSelected(f),f=d.model.getParent(f);(e||b)&&B.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),q);null!=l&&this.updateLinkTargets(h,l);return h}finally{n&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};
-Graph.prototype.updateLinkTargets=function(a,c){for(var d=a.getElementsByTagName("a"),b=0;b<d.length;b++){var f=d[b].getAttribute("href");null==f&&(f=d[b].getAttribute("xlink:href"));null!=f&&/^https?:\/\//.test(f)&&d[b].setAttribute("target",c)}};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,d){for(;null!=a&&a.nodeName!=c;){if(a==d)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 d=document.createRange();d.selectNode(a);c.removeAllRanges();c.addRange(d)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),d=c.createRange(),d.setEndPoint("StartToStart",
-a),d.select())};Graph.prototype.insertRow=function(a,c){for(var d=a.tBodies[0],b=d.rows[0].cells,f=0,e=0;e<b.length;e++)var g=b[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);d=d.insertRow(c);for(e=0;e<f;e++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var d=a.tHead;if(null!=d)for(var b=0;b<d.rows.length;b++){var f=document.createElement("th");d.rows[b].appendChild(f);mxUtils.br(f)}d=
-a.tBodies[0];for(b=0;b<d.rows.length;b++)f=d.rows[b].insertCell(c),mxUtils.br(f);return d.rows[0].cells[0<=c?c:d.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var d=a.tBodies[0].rows,b=0;b<d.length;b++)d[b].cells.length>c&&d[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var d=document.createElement("div");d.innerHTML=a;a=document.createDocumentFragment();
-for(var b;b=d.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function d(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 b=document.createElement("a");b.setAttribute("rel",this.linkRelation);b.setAttribute("href",
-this.getAbsoluteUrl(a));b.setAttribute("title",d(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);mxUtils.write(b,d(c,40));this.isCustomLink(a)&&mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return b};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 d=this.getCellAt(c.graphX,c.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,c.graphX,c.graphY)||(c.state=this.view.getState(d),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,d=!1,b=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),d=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||
-!b&&!mxEvent.isMouseEvent(f.getEvent())&&(d&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.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=[],d=0,b=a.rangeCount;d<
-b;++d)c.push(a.getRangeAt(d));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,d=a.length;c<d;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(Y){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
-(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));h.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?m.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 d=this.graph.view.getState(a);this.textarea.className=null!=d&&1==d.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var d=this.graph.getModel().getParent(a),b=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(d)&&null!=b&&b.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
-"gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,d){d.originalNode=a;a=a.firstChild;for(var b=d.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return d}function d(a,c){if(null!=a)if(c.originalNode!=
-a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?b(a):(d(a,c),c=c.nextSibling);a=f}}function b(a){for(var c=a.firstChild;null!=c;){var d=c.nextSibling;b(c);c=d}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)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var b=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){d(this.textarea,b)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),
-c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),d=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
-f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,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(b*mxConstants.LINE_HEIGHT)+
-"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,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 k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var b=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
-this.restoreSelection(this.switchSelectionState);this.switchSelectionState=d;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 d=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;var b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=b.x*this.bounds.width;this.bounds.y+=b.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/d)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/d)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/d)+(this.textarea.offsetHeight-
-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*d);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/d)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*d);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=d:mxUtils.setPrefixedStyle(this.textarea.style,
-"transform","scale("+d+","+d+")")}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 d=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));return d=this.graph.sanitizeHtml(d,!0)};
+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 f=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==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 f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))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,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=
+f||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&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==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(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.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 f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/
+1E4;d.geometry.y=Math.round(f.y);d.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.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 f=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
+g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
+"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
+!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var f=d.getSource(),h=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=
+this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=
+g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.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,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],d,d,!1)[0];f.push(n);if(c)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<d.length;e++)f.push(d[e]);
+document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].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,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,f=null!=f?Math.min(f,h):h;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});
+g=this.view.translate;h=this.view.scale;f=f/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(d-f)/(b.length-1),d=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),t=this.getCellGeometry(b[e].cell),d=d+n;null!=t&&null!=m&&(t=t.clone(),a?t.x=Math.round(d-t.width/2)-m.origin.x:t.y=Math.round(d-t.height/2)-m.origin.y,this.getModel().setGeometry(b[e].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 f=this.view.getState(a[d]);if(null!=f){var e=this.getCellGeometry(c[d]);null==e||!e.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),
+0);for(d=0;d<a.length;d++)f.add(e,c[d]);return b.encode(f)};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,f,e,g,h,n){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());
+if(null==t)throw Error(mxResources.get("drawingEmpty"));var r=this.view.scale,y=mxUtils.createXmlDocument(),k=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"svg"):y.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==y.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);
+a=c/r;var v=Math.max(1,Math.ceil(t.width*a)+2*b),w=Math.max(1,Math.ceil(t.height*a)+2*b);k.setAttribute("version","1.1");k.setAttribute("width",v+"px");k.setAttribute("height",w+"px");k.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+v+" "+w);y.appendChild(k);var q=this.createSvgCanvas(k);q.foOffset=f?-.5:0;q.textOffset=f?-.5:0;q.imageOffset=f?-.5:0;q.translate(Math.floor((b/c-t.x)/r),Math.floor((b/c-t.y)/r));var x=document.createElement("textarea"),z=q.createAlternateContent;q.createAlternateContent=
+function(a,c,b,d,f,e,g,h,n,m,t,r,y){var k=this.state;if(null!=this.foAltText&&(0==d||0!=k.fontSize&&e.length<5*d/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(d/2));v.setAttribute("y",Math.round((f+k.fontSize)/2));v.setAttribute("fill",k.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(k.fontSize)+"px");v.setAttribute("font-family",k.fontFamily);(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight",
+"bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");try{return x.innerHTML=e,v.textContent=x.value,v}catch(Ca){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var l=this.backgroundImage;if(null!=l){c=r/c;var F=this.view.translate,p=new mxRectangle(F.x*c,F.y*c,l.width*c,l.height*c);mxUtils.intersects(t,p)&&
+q.image(F.x,F.y,l.width,l.height,l.src,!0)}q.scale(a);q.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var A=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!d&&null!=f;)d=b.isCellSelected(f),f=b.model.getParent(f);(e||d)&&A.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),q);null!=n&&this.updateLinkTargets(k,n);return k}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};
+Graph.prototype.updateLinkTargets=function(a,c){for(var b=a.getElementsByTagName("a"),d=0;d<b.length;d++){var f=b[d].getAttribute("href");null==f&&(f=b[d].getAttribute("xlink:href"));null!=f&&/^https?:\/\//.test(f)&&b[d].setAttribute("target",c)}};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,f=0,e=0;e<d.length;e++)var g=d[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<f;e++)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 f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=
+a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);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,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||
+!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.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(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 l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var 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 q=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 f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}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)}q.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"<br/>"):h,!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),
+f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,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=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!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!=h&&(this.textarea.innerHTML=h);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,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-
+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(F){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(a.style,
-mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&d==mxConstants.NONE&&b==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 g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,d,b,f,e){mxEvent.isAltDown(e)&&(f=null);g.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 d=this.graph.view.translate,b=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/
-b-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/b-d.y);this.hint.innerHTML=c+", "+d;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)&&
+this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(F){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.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 g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);g.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 k=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=k.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)),
+var n=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=n.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,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(d.x/f-b.x),b=this.roundLength(d.y/f-b.y);this.hint.innerHTML=e+", "+b;this.hint.style.visibility=
-"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.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(),d.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,f=this.graph.view.scale,e=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=e+", "+d;this.hint.style.visibility=
+"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.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=":
@@ -2410,146 +2412,146 @@ HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.trian
!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 r=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){r.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 d=null!=this.div&&"none"!=this.div.style.display,
-b=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,f=this.first.y,e=(this.currentX-b)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(d){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
-this.y,this.width,this.height),k=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(b,f,this.graph.getDefaultParent(),!0,!0),d=0;d<k.length;d++)if(this.graph.isCellMovable(k[d])){var l=this.graph.view.getState(k[d]),n=this.graph.getCellGeometry(k[d]);null!=l&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(k[d],n))}}finally{this.graph.model.endUpdate()}}else e=
-new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var d=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);d.x-=b.x;d.y-=b.y;var b=c.getX()+d.x,d=c.getY()+d.y,f=this.first.x-b,e=this.first.y-d,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
-this.update(b,d),this.isSpaceEvent(c)?(b=this.x+this.width,d=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=b-this.width),this.y<this.first.y&&(this.y=d-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
+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,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,e=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
+this.y,this.width,this.height),h=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=
+new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var 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,f=this.first.x-d,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)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,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,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 l=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);l.apply(this,arguments)};var n=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,d,b){v.apply(this,arguments);d!=this.currentTerminalState?(n=(new Date).getTime(),w=0):w=(new Date).getTime()-n;this.currentTerminalState=d};var B=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&B.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var d=null!=a&&0==a,b=this.state.getVisibleTerminalState(d),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-b,d):null,d=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),f):null)?this.fixedHandleImage:null!=f&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,c,d){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var t=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),d=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);if(c.isEdge(d)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),
-null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return t.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),d=c.getParent(a.cell),b=this.graph.getCellGeometry(a.cell);return c.isEdge(d)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):z.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var d=this.graph.getModel(),b=d.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!d.isEdge(b)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+"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 h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
+this.secondDiv=null);h.apply(this,arguments)};var m=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.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),f=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!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&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 t=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 t.apply(this,arguments)};var z=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))):z.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.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 G=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){G.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var A=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){A.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.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,d){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,d){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 d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);this.updateLinkHint(d,
-b);if(null!=d||null!=b&&0<b.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,d){if(null==c&&(null==d||0==d.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=d&&0<d.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
-this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var b=document.createElement("img");b.setAttribute("src",Editor.editImage);b.setAttribute("title",mxResources.get("editLink"));b.setAttribute("width","11");b.setAttribute("height","11");b.style.marginLeft="10px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
-function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));b=document.createElement("img");b.setAttribute("src",Dialog.prototype.clearImage);b.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));b.setAttribute("width","13");b.setAttribute("height","10");b.style.marginLeft="4px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=d)for(b=0;b<d.length;b++){var f=document.createElement("div");f.style.marginTop=null!=c||0<b?"6px":"0px";f.appendChild(this.graph.createLinkForHint(d[b].getAttribute("href"),mxUtils.getTextContent(d[b])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.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,d){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
-this.changeHandler=mxUtils.bind(this,function(c,d){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),d=this.graph.getLinksForState(this.state);if(null!=c||null!=d&&0<d.length)this.updateLinkHint(c,d),this.redrawHandles()};var x=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){x.apply(this,
-arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.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),d=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),a=null!=d?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==d&&(d=this.state);d=d.y+d.height;null!=c&&(d=Math.max(d,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(d+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var I=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.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 f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.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 x=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){x.apply(this,
+arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.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 I=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
function(){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){R.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 P=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(P.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 X=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){X.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 d(){mxActor.call(this)}function e(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function r(){mxActor.call(this)}function l(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,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function B(){mxActor.call(this)}function y(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function H(){mxCylinder.call(this)}function G(){mxShape.call(this)}function A(){mxShape.call(this)}
+(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 e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(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,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function A(){mxActor.call(this)}function y(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function H(){mxCylinder.call(this)}function G(){mxShape.call(this)}function B(){mxShape.call(this)}
function J(){mxEllipse.call(this)}function K(){mxShape.call(this)}function x(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function R(){mxShape.call(this)}function P(){mxShape.call(this)}function X(){mxShape.call(this)}function U(){mxShape.call(this)}function F(){mxCylinder.call(this)}function ea(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function ba(){mxArrowConnector.call(this);
this.spacing=0}function L(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function T(){mxActor.call(this)}function D(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ga(){mxActor.call(this)}function W(){mxActor.call(this)}function aa(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function fa(){mxRhombus.call(this)}function ma(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ia(){mxConnector.call(this)}function wa(a,c,d,b,f,e,g,k,l,n){g+=l;var na=b.clone();b.x-=f*(2*g+l);b.y-=e*(2*g+l);f*=g+l;e*=g+l;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(b,c)):(a.moveTo(0,0),a.lineTo(b-c,0),a.lineTo(b,c),a.lineTo(b,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};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)),qa=(.5-Ba)/2;mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b,f/Ba);a.translate((b-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*qa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-qa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(e,mxCylinder);e.prototype.size=
-20;e.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.min(b,f/(.5+Ba));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-qa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-qa)*c),a.lineTo(.5*c,(1-qa)*c)):(a.translate((b-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*qa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-qa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,f-c),a.curveTo(b,f+c/3,0,f+c/3,0,f-c),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(h,mxCylinder);h.prototype.size=30;h.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(b-c,0),a.lineTo(b-c,c),a.lineTo(b,c)):(a.moveTo(0,0),a.lineTo(b-c,0),a.lineTo(b,c),a.lineTo(b,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",h);mxUtils.extend(m,mxActor);m.prototype.redrawPath=
-function(a,c,d,b,f){a.moveTo(0,0);a.quadTo(b/2,.5*f,b,0);a.quadTo(.5*b,f/2,b,f);a.quadTo(b/2,.5*f,0,f);a.quadTo(.5*b,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
-var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,d),a.lineTo(c,d)):(a.moveTo(b-c,d),a.lineTo(b,d)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(b,d)):(a.moveTo(0,d),a.lineTo(b-c,d),a.lineTo(b-c,0),a.lineTo(b,0)),a.lineTo(b,f),a.lineTo(0,f),a.lineTo(0,d),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,
-d,b,f){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,c,d,b,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*b/4,c*(1-1.4),b,c/2);a.lineTo(b,f-c/2);a.quadTo(3*b/4,f-1.4*c,b/2,f-c/2);a.quadTo(b/4,f-c*(1-1.4),0,f-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),d=a.width,b=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
-b,new mxRectangle(a.x,a.y+c,d,b-2*c);c*=d;return new mxRectangle(a.x+c,a.y,d-2*c,b)}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,d,b,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
-0);a.lineTo(b,0);a.lineTo(b,f-c/2);a.quadTo(3*b/4,f-1.4*c,b/2,f-c/2);a.quadTo(b/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",c);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,d,b){var f=mxUtils.getValue(this.style,"size");return null!=f?b*Math.max(0,Math.min(1,f)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b-c,f)],this.isRounded,
-d,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,f)],this.isRounded,d,!0)};mxCellRenderer.registerShape("trapezoid",
-g);mxUtils.extend(k,mxActor);k.prototype.size=.5;k.prototype.redrawPath=function(a,c,d,b,f){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(b,f)],this.isRounded,d,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
-k);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,d,b,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=b/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);l.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};l.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)};l.prototype.quadTo=function(a,c,d,b){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=b};l.prototype.curveTo=function(a,c,d,b,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};l.prototype.arcTo=function(a,c,d,b,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};l.prototype.lineTo=function(a,c){if(null!=
-this.lastX&&null!=this.lastY){var d=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),e=Math.sqrt(b*b+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),na=this.defaultVariation;5>g&&(g=5,na/=3);for(var k=d(a-this.lastX)*b/g,d=d(c-this.lastY)*f/g,b=b/e,f=f/e,e=0;e<g;e++){var l=(Math.random()-.5)*na;this.originalLineTo.call(this.canvas,k*e+this.lastX-l*f,d*e+this.lastY-
-l*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};l.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 l(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,c,d,b,f){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(b/2,Math.min(f/
-2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(b*e,f*e)),a.moveTo(c+e,d),a.lineTo(c+b-e,d),a.quadTo(c+b,d,c+b,d+e),a.lineTo(c+b,d+f-e),a.quadTo(c+b,d+f,c+b-e,d+f),a.lineTo(c+e,d+f),a.quadTo(c,d+f,c,d+f-e),a.lineTo(c,d+e),a.quadTo(c,d,c+e,d)):(a.moveTo(c,d),a.lineTo(c+b,d),a.lineTo(c+b,d+f),a.lineTo(c,d+f),a.lineTo(c,d)),a.close(),a.end(),a.fillAndStroke()}};
-var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,d,b,f){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(n,mxRectangleShape);n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.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,d=a.height;
-a=new mxRectangle(a.x,a.y,c,d);var b=c*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,b=Math.max(b,Math.min(c*f,d*f));a.x+=Math.round(b);a.width-=Math.round(2*b)}return a};n.prototype.paintForeground=function(a,c,d,b,f){var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,d);a.lineTo(c+e,d+f);a.moveTo(c+b-e,d);a.lineTo(c+b-e,d+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,c,d,b,f){a.setFillColor(mxConstants.NONE);a.rect(c,d,b,f);a.fill()};w.prototype.paintForeground=function(a,
-c,d,b,f){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,d,b,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d=Math.max(0,Math.min(f,
-parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f-d),new mxPoint(Math.min(b,e+k),f-d),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-d),new mxPoint(0,
-f-d)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(B,mxActor);B.prototype.size=.2;B.prototype.fixedSize=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,d,b,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,f/2),new mxPoint(b-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("step",B);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*f),new mxPoint(b-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,d,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(t,mxRectangleShape);t.prototype.isHtmlAllowed=function(){return!1};t.prototype.paintForeground=function(a,c,d,b,f){var e=Math.min(b/5,f/5)+1;a.begin();a.moveTo(c+b/2,d+e);a.lineTo(c+b/2,d+f-e);a.moveTo(c+e,d+f/2);a.lineTo(c+b-e,d+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("plus",t);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,d,b,f){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
-1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;d+=e;b-=2*e;f-=2*e;0<b&&0<f&&(a.setShadow(!1),Ea.apply(this,[a,c,d,b,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.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};z.prototype.paintForeground=function(a,c,d,
-b,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;d+=e;b-=2*e;f-=2*e;0<b&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var k=this.style["symbol"+e+"Align"],na=this.style["symbol"+e+"VerticalAlign"],l=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],t=
-this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||t,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(b+this.strokewidth,f+this.strokewidth),t+=y,r+=y);var y=c,h=d,y=k==mxConstants.ALIGN_CENTER?y+(b-l)/2:k==mxConstants.ALIGN_RIGHT?y+(b-l-t):y+t,h=na==mxConstants.ALIGN_MIDDLE?h+(f-n)/2:na==mxConstants.ALIGN_BOTTOM?h+(f-n-r):h+r;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,y,h,l,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(H,mxCylinder);H.prototype.redrawPath=function(a,c,d,b,f,e){e?(a.moveTo(0,0),a.lineTo(b/2,f/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",H);mxUtils.extend(G,mxShape);G.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.ellipse(b/4,0,b/2,f/4);a.fillAndStroke();a.begin();a.moveTo(b/2,f/4);a.lineTo(b/2,2*f/3);a.moveTo(b/2,f/3);a.lineTo(0,
-f/3);a.moveTo(b/2,f/3);a.lineTo(b,f/3);a.moveTo(b/2,2*f/3);a.lineTo(0,f);a.moveTo(b/2,2*f/3);a.lineTo(b,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(A,mxShape);A.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};A.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(b/6,f/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,f);a.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",A);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,d+f);a.lineTo(c+7*b/8,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",J);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(b,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(b,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
-K);mxUtils.extend(x,mxShape);x.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};x.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(3*b/8,f/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0,f/8,b,7*f/8);a.fillAndStroke()};x.prototype.paintForeground=function(a,c,d,b,f){a.begin();a.moveTo(3*b/8,f/8*1.1);a.lineTo(5*b/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",x);mxUtils.extend(C,mxRectangleShape);
-C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.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)};C.prototype.paintBackground=function(a,c,d,b,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-a,c,d,b,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,d,b,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+b/2,d+e),a.lineTo(c+b/2,d+f),a.end(),a.stroke())};C.prototype.paintForeground=function(a,c,d,b,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,d,b,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",
-C);mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.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))};I.prototype.paintBackground=function(a,c,d,b,f){var e=this.corner,g=Math.min(b,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(f,Math.max(1.5*
-e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);l!=mxConstants.NONE&&(a.setFillColor(l),a.rect(c,d,b,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,d,b,f),a.setGradient(this.fill,this.gradient,c,d,b,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,d);a.lineTo(c+g,d);a.lineTo(c+g,d+Math.max(0,
-k-1.5*e));a.lineTo(c+Math.max(0,g-e),d+k);a.lineTo(c,d+k);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,d);a.lineTo(c+b,d);a.lineTo(c+b,d+f);a.lineTo(c,d+f);a.lineTo(c,d+k);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,d,b){b=C.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;d.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+
-c,Math.min(a.y+a.height,Math.max(a.y+b,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,d,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,d,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*
-c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return d.x<a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,d.y)));d.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,d.x)),a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,d,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,
-new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))*c.view.scale))),c.style),c,d,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,d,b){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,k=a.y,l=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==
-mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+l,k+e),new mxPoint(g+l,k+n),new mxPoint(g,k+n-e),new mxPoint(g,k)]):(e=l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+e,k),new mxPoint(g+l,k),new mxPoint(g+l-e,k+n),new mxPoint(g,k+n),new mxPoint(g+e,k)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(d.x<g||d.x>g+l?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(k,a,d)};mxStyleRegistry.putValue("parallelogramPerimeter",
-mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,d,b){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,k=a.y,l=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=l*Math.max(0,Math.min(1,f)),k=[new mxPoint(e+f,k),new mxPoint(e+l-f,k),new mxPoint(e+l,k+n),new mxPoint(e,k+n),new mxPoint(e+f,k)]):c==mxConstants.DIRECTION_WEST?
-(f=l*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+l,k),new mxPoint(e+l-f,k+n),new mxPoint(e+f,k+n),new mxPoint(e,k)]):c==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k+f),new mxPoint(e+l,k),new mxPoint(e+l,k+n),new mxPoint(e,k+n-f),new mxPoint(e,k+f)]):(f=n*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+l,k+f),new mxPoint(e+l,k+n-f),new mxPoint(e,k+n),new mxPoint(e,k)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(d.x<e||d.x>e+
-l?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(k,a,d)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,d,b){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?B.prototype.fixedSize:B.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,k=a.y,l=a.width,n=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?(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+l-f,k),new mxPoint(g+l,a),new mxPoint(g+l-f,k+n),new mxPoint(g,k+n),new mxPoint(g+f,a),new mxPoint(g,k)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+f,k),new mxPoint(g+l,k),new mxPoint(g+l-f,a),new mxPoint(g+l,k+n),new mxPoint(g+f,k+n),new mxPoint(g,a),new mxPoint(g+f,k)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,
-Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k+f),new mxPoint(t,k),new mxPoint(g+l,k+f),new mxPoint(g+l,k+n),new mxPoint(t,k+n-f),new mxPoint(g,k+n),new mxPoint(g,k+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(t,k+f),new mxPoint(g+l,k),new mxPoint(g+l,k+n-f),new mxPoint(t,k+n),new mxPoint(g,k+n-f),new mxPoint(g,k)]);t=new mxPoint(t,a);b&&(d.x<g||d.x>g+l?t.y=d.y:t.x=d.x);return mxUtils.getPerimeterPoint(k,t,d)};mxStyleRegistry.putValue("stepPerimeter",
-mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,d,b){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,k=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(n,g),new mxPoint(e+k,g+f),new mxPoint(e+k,g+l-f),new mxPoint(n,
-g+l),new mxPoint(e,g+l-f),new mxPoint(e,g+f),new mxPoint(n,g)]):(f=k*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+k-f,g),new mxPoint(e+k,a),new mxPoint(e+k-f,g+l),new mxPoint(e+f,g+l),new mxPoint(e,a),new mxPoint(e+f,g)]);n=new mxPoint(n,a);b&&(d.x<e||d.x>e+k?n.y=d.y:n.x=d.x);return mxUtils.getPerimeterPoint(g,n,d)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,c,d,b,
-f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,d);a.ellipse((b-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",R);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,c,d,b,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,
-d);a.begin();a.moveTo(b/2,e+g);a.lineTo(b/2,f);a.end();a.stroke();a.begin();a.moveTo((b-e)/2-g,e/2);a.quadTo((b-e)/2-g,e+g,b/2,e+g);a.quadTo((b+e)/2+g,e+g,(b+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
-2;U.prototype.paintBackground=function(a,c,d,b,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,d);a.ellipse(0,e,b-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,b/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",U);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=32;F.prototype.jettyHeight=12;F.prototype.redrawPath=function(a,c,d,b,f,e){var g=parseFloat(mxUtils.getValue(this.style,
-"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));d=g/2;var g=d+g/2,k=.3*f-c/2,l=.7*f-c/2;e?(a.moveTo(d,k),a.lineTo(g,k),a.lineTo(g,k+c),a.lineTo(d,k+c),a.moveTo(d,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(d,l+c)):(a.moveTo(d,0),a.lineTo(b,0),a.lineTo(b,f),a.lineTo(d,f),a.lineTo(d,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(d,l),a.lineTo(d,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(d,k),a.close());a.end()};mxCellRenderer.registerShape("component",
-F);mxUtils.extend(ea,mxDoubleEllipse);ea.prototype.outerStroke=!0;ea.prototype.paintVertexShape=function(a,c,d,b,f){var e=Math.min(4,Math.min(b/5,f/5));0<b&&0<f&&(a.ellipse(c+e,d+e,b-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,d,b,f),a.stroke())};mxCellRenderer.registerShape("endState",ea);mxUtils.extend(ka,ea);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=
+function fa(){mxRhombus.call(this)}function ma(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ia(){mxConnector.call(this)}function wa(a,c,b,d,f,e,g,h,n,m){g+=n;var na=d.clone();d.x-=f*(2*g+n);d.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};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)),qa=(.5-Ba)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/Ba);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*qa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-qa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=
+20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+Ba));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-qa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-qa)*c),a.lineTo(.5*c,(1-qa)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*qa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-qa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
+1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-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.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=
+function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);a.quadTo(.5*d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==g?(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,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,
+b,d,f){c=Math.max(0,Math.min(d,Math.min(f,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,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,c,b,d,f){c=f*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,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-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,f){c=f*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,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",c);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,d){var f=mxUtils.getValue(this.style,"size");return null!=f?d*Math.max(0,Math.min(1,f)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,d,f){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,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,
+b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,d,f){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,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",
+g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,d,f){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,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
+n);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);h.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};h.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)};h.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};h.prototype.curveTo=function(a,c,b,d,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,c,b,d,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};h.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),f=Math.abs(c-this.lastY),e=Math.sqrt(d*d+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),na=this.defaultVariation;5>g&&(g=5,na/=3);for(var h=b(a-this.lastX)*d/g,b=b(c-this.lastY)*f/g,d=d/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*na;this.originalLineTo.call(this.canvas,h*e+this.lastX-n*f,b*e+this.lastY-
+n*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};h.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 h(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,c,b,d,f){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(d/2,Math.min(f/
+2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(d*e,f*e)),a.moveTo(c+e,b),a.lineTo(c+d-e,b),a.quadTo(c+d,b,c+d,b+e),a.lineTo(c+d,b+f-e),a.quadTo(c+d,b+f,c+d-e,b+f),a.lineTo(c+e,b+f),a.quadTo(c,b+f,c,b+f-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};
+var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.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 f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};m.prototype.paintForeground=function(a,c,b,d,f){var e=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,e=Math.max(e,Math.min(d*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.moveTo(c+d-e,b);a.lineTo(c+d-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",m);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};w.prototype.paintForeground=function(a,
+c,b,d,f){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,
+parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),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,f-b),new mxPoint(Math.min(d,e+h),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,
+f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(A,mxActor);A.prototype.size=.2;A.prototype.fixedSize=20;A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(a,c,b,d,f){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,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",A);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,c,b,d,f){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*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(t,mxRectangleShape);t.prototype.isHtmlAllowed=function(){return!1};t.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("plus",t);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,f){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&(a.setShadow(!1),Ea.apply(this,[a,c,b,d,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.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};z.prototype.paintForeground=function(a,c,b,
+d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var h=this.style["symbol"+e+"Align"],na=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],m=this.style["symbol"+e+"Height"],t=
+this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||t,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),t+=y,r+=y);var y=c,k=b,y=h==mxConstants.ALIGN_CENTER?y+(d-n)/2:h==mxConstants.ALIGN_RIGHT?y+(d-n-t):y+t,k=na==mxConstants.ALIGN_MIDDLE?k+(f-m)/2:na==mxConstants.ALIGN_BOTTOM?k+(f-m-r):k+r;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,y,k,n,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(H,mxCylinder);H.prototype.redrawPath=function(a,c,b,d,f,e){e?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",H);mxUtils.extend(G,mxShape);G.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,
+f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};
+mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",J);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
+K);mxUtils.extend(x,mxShape);x.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};x.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};x.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",x);mxUtils.extend(C,mxRectangleShape);
+C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.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)};C.prototype.paintBackground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,c,b,d,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,d,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+e),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};C.prototype.paintForeground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",
+C);mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.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))};I.prototype.paintBackground=function(a,c,b,d,f){var e=this.corner,g=Math.min(d,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(f,Math.max(1.5*
+e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,d,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,d,f),a.setGradient(this.fill,this.gradient,c,b,d,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,
+h-1.5*e));a.lineTo(c+Math.max(0,g-e),b+h);a.lineTo(c,b+h);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=C.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",v.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=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?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n,h+e),new mxPoint(g+n,h+m),new mxPoint(g,h+m-e),new mxPoint(g,h)]):(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+n,h),new mxPoint(g+n-e,h+m),new mxPoint(g,h+m),new mxPoint(g+e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",
+mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,h=a.y,n=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+n-f,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+f,h)]):c==mxConstants.DIRECTION_WEST?
+(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h+f),new mxPoint(e+n,h+m-f),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<e||b.x>e+
+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?A.prototype.fixedSize:A.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=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?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n-f,h),new mxPoint(g+n,a),new mxPoint(g+n-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+n,h),new mxPoint(g+n-f,a),new mxPoint(g+n,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,
+Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(t,h),new mxPoint(g+n,h+f),new mxPoint(g+n,h+m),new mxPoint(t,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(t,h+f),new mxPoint(g+n,h),new mxPoint(g+n,h+m-f),new mxPoint(t,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);t=new mxPoint(t,a);d&&(b.x<g||b.x>g+n?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(h,t,b)};mxStyleRegistry.putValue("stepPerimeter",
+mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,h=a.width,n=a.height,m=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?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+n-f),new mxPoint(m,
+g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(m,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);m=new mxPoint(m,a);d&&(b.x<e||b.x>e+h?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(g,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,c,b,d,
+f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(d/2,e);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",R);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,
+b);a.begin();a.moveTo(d/2,e+g);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-g,e/2);a.quadTo((d-e)/2-g,e+g,d/2,e+g);a.quadTo((d+e)/2+g,e+g,(d+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
+2;U.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,d-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",U);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=32;F.prototype.jettyHeight=12;F.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,
+"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,h=.3*f-c/2,n=.7*f-c/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+c),a.lineTo(b,h+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,h+c),a.lineTo(0,h+c),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",
+F);mxUtils.extend(ea,mxDoubleEllipse);ea.prototype.outerStroke=!0;ea.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",ea);mxUtils.extend(ka,ea);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);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(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,f)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(E,mxRectangleShape);E.prototype.dx=20;E.prototype.dy=20;E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,c,d,b,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,f*g));g=Math.max(e,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,d+e);a.lineTo(c+b,d+e);a.end();a.stroke();a.begin();a.moveTo(c+g,d);a.lineTo(c+g,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",E);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=
-20;S.prototype.redrawPath=function(a,c,d,b,f){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint(c,d),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",S);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,d,b,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(b,0);a.lineTo(b,f);a.end();a.moveTo(0,f/2);a.lineTo(b,f/2);a.end()};mxCellRenderer.registerShape("crossbar",M);mxUtils.extend(N,mxActor);N.prototype.dx=20;N.prototype.dy=20;N.prototype.redrawPath=function(a,c,d,b,f){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint((b+c)/2,d),new mxPoint((b+c)/2,f),new mxPoint((b-c)/2,f),new mxPoint((b-c)/2,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",N);mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=
-function(a,c,d,b,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(f-e)/2;var e=d+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b-c,d),new mxPoint(b-c,0),new mxPoint(b,f/2),new mxPoint(b-c,f),new mxPoint(b-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
-T);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(a,c,d,b,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));d=(f-e)/2;var e=d+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(b-c,d),new mxPoint(b-c,0),new mxPoint(b,
-f/2),new mxPoint(b-c,f),new mxPoint(b-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",D);mxUtils.extend(Q,mxActor);Q.prototype.size=.1;Q.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,f/2,b,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Q);mxUtils.extend(V,
-mxActor);V.prototype.redrawPath=function(a,c,d,b,f){a.moveTo(0,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,d,b,f){a.moveTo(0,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,0,f);a.quadTo(b/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b/
-2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.8*c),new mxPoint(b,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,d,b,f){c=
-f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f-c),new mxPoint(b/2,f),new mxPoint(0,f-c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
-a.moveTo(c+b/2,d+f);a.lineTo(c+b,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,d+f/2);a.lineTo(c+b,d+f/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,d);a.lineTo(c+b/2,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,
-c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,d+.145*f);a.lineTo(c+.855*b,d+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,d+.145*f);a.lineTo(c+.145*b,d+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,d,b,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,d+f/2);a.lineTo(c+b,d+f/2);
-a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,d,b,f){a.begin();a.moveTo(c,d);a.lineTo(c+b,d);a.lineTo(c+b/2,d+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,d+f);a.lineTo(c+b,d+f);a.lineTo(c+b/2,d+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ma);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,d,b,f){var e=d+f-5;a.begin();a.moveTo(c,d);a.lineTo(c,d+f);
-a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+b,e);a.moveTo(c+b,d);a.lineTo(c+b,d+f);a.moveTo(c+b,e);a.lineTo(c+b-10,e-5);a.moveTo(c+b,e);a.lineTo(c+b-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ta);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,d,b,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
-d,b,f),a.fill(),a.begin(),a.moveTo(c,d),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,d):a.moveTo(c+b,d),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,d+f):a.moveTo(c+b,d+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,d+f):a.moveTo(c,d+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,d-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,
-d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,d),a.lineTo(c+b/2,d+f)):(a.moveTo(c,d+f/2),a.lineTo(c+b,d+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b,f/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,b-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
-ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(f,b);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;d=c+e;var g=(b-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,d);a.lineTo(e,d);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("cross",ca);mxUtils.extend(da,mxActor);da.prototype.size=
-.25;da.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b,f/2);d=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,f/2);a.lineTo(d,0);a.lineTo(b-c,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,b-c,f);a.lineTo(d,f);a.close();a.end()};mxCellRenderer.registerShape("display",da);mxUtils.extend(ia,mxConnector);ia.prototype.origPaintEdgeShape=ia.prototype.paintEdgeShape;ia.prototype.paintEdgeShape=function(a,c,d){for(var b=[],f=0;f<c.length;f++)b.push(mxUtils.clone(c[f]));
-var f=a.state.dashed,e=a.state.fixDash;ia.prototype.origPaintEdgeShape.apply(this,[a,b,d]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ia.prototype.origPaintEdgeShape.apply(this,[a,c,d])))};mxCellRenderer.registerShape("filledEdge",ia);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=
-this.format.getSelectionState(),d=a.apply(this,arguments);"umlFrame"==c.style.shape&&d.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return d}}();mxMarker.addMarker("dash",function(a,c,d,b,f,e,g,k,l,n){var t=f*(g+l+1),r=e*(g+l+1);return function(){a.begin();a.moveTo(b.x-t/2-r/2,b.y-r/2+t/2);a.lineTo(b.x+r/2-3*t/2,b.y-3*r/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,d,b,f,e,g,k,l,n){var t=f*(g+l+1),r=e*(g+l+1);return function(){a.begin();
-a.moveTo(b.x-t/2-r/2,b.y-r/2+t/2);a.lineTo(b.x+r/2-3*t/2,b.y-3*r/2-t/2);a.moveTo(b.x-t/2+r/2,b.y-r/2-t/2);a.lineTo(b.x-r/2-3*t/2,b.y-3*r/2+t/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,d,b,f,e,g,k,l,n){var t=b.clone(),r=wa.apply(this,arguments),y=f*(g+2*l),h=e*(g+2*l);return function(){r.apply(this,arguments);a.begin();a.moveTo(t.x-f*l,t.y-e*l);a.lineTo(t.x-2*y+f*l,t.y-2*h+e*l);a.moveTo(t.x-y-h+e*l,t.y-h+y-f*l);a.lineTo(t.x+h-y-e*l,t.y-h-y+f*l);a.stroke()}});
-mxMarker.addMarker("async",function(a,c,d,b,f,e,g,k,l,n){c=f*l*1.118;d=e*l*1.118;f*=g+l;e*=g+l;var t=b.clone();t.x-=c;t.y-=d;b.x+=1*-f-c;b.y+=1*-e-d;return function(){a.begin();a.moveTo(t.x,t.y);k?a.lineTo(t.x-f-e/2,t.y-e+f/2):a.lineTo(t.x+e/2-f,t.y-e-f/2);a.lineTo(t.x-f,t.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,g,k,l,n,t){e*=k+n;g*=k+n;var r=f.clone();return function(){c.begin();c.moveTo(r.x,r.y);l?c.lineTo(r.x-
-e-g/a,r.y-g+e/a):c.lineTo(r.x+g/a-e,r.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,b){return ua(a,["width"],c,function(c,d,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*g/2,e.y+f*c/4-d*g/2)},function(c,d,f,e,g,k){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ua=function(a,c,d,b,f){return O(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
-a.view.scale,k=d?f[0]:f[e],f=d?f[1]:f[e-1],e=f.x-k.x,l=f.y-k.y,n=Math.sqrt(e*e+l*l),k=b.call(this,n,e/n,l/n,k,f);return new mxPoint(k.x/g-c.x,k.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,k=g.length-1;c=a.view.translate;var l=a.view.scale,n=d?g[0]:g[k],g=d?g[1]:g[k-1],k=g.x-n.x,t=g.y-n.y,r=Math.sqrt(k*k+t*t);b.x=(b.x+c.x)*l;b.y=(b.y+c.y)*l;f.call(this,r,k/r,t/r,n,g,b,e)})},oa=function(a){return function(c){return[O(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+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(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,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,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(E,mxRectangleShape);E.prototype.dx=20;E.prototype.dy=20;E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));g=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+d,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",E);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=
+20;S.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};
+mxCellRenderer.registerShape("corner",S);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",M);mxUtils.extend(N,mxActor);N.prototype.dx=20;N.prototype.dy=20;N.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",N);mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=
+function(a,c,b,d,f){var e=f*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=(f-e)/2;var e=b+e,g=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,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
+T);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,
+f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",D);mxUtils.extend(Q,mxActor);Q.prototype.size=.1;Q.prototype.redrawPath=function(a,c,b,d,f){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,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Q);mxUtils.extend(V,
+mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/
+2,Math.min(f,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,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,b,d,f){c=
+f*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,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
+a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,
+c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);
+a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ma);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);
+a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ta);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
+b,d,f),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+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,
+b,d,f){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+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
+ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var g=(d-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ca);mxUtils.extend(da,mxActor);da.prototype.size=
+.25;da.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",da);mxUtils.extend(ia,mxConnector);ia.prototype.origPaintEdgeShape=ia.prototype.paintEdgeShape;ia.prototype.paintEdgeShape=function(a,c,b){for(var d=[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));
+var f=a.state.dashed,e=a.state.fixDash;ia.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(f,e),ia.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ia);"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,f,e,g,h,n,m){var t=f*(g+n+1),r=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-t/2-r/2,d.y-r/2+t/2);a.lineTo(d.x+r/2-3*t/2,d.y-3*r/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,g,h,n,m){var t=f*(g+n+1),r=e*(g+n+1);return function(){a.begin();
+a.moveTo(d.x-t/2-r/2,d.y-r/2+t/2);a.lineTo(d.x+r/2-3*t/2,d.y-3*r/2-t/2);a.moveTo(d.x-t/2+r/2,d.y-r/2-t/2);a.lineTo(d.x-r/2-3*t/2,d.y-3*r/2+t/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,g,h,n,m){var t=d.clone(),r=wa.apply(this,arguments),y=f*(g+2*n),k=e*(g+2*n);return function(){r.apply(this,arguments);a.begin();a.moveTo(t.x-f*n,t.y-e*n);a.lineTo(t.x-2*y+f*n,t.y-2*k+e*n);a.moveTo(t.x-y-k+e*n,t.y-k+y-f*n);a.lineTo(t.x+k-y-e*n,t.y-k-y+f*n);a.stroke()}});
+mxMarker.addMarker("async",function(a,c,b,d,f,e,g,h,n,m){c=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var t=d.clone();t.x-=c;t.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(t.x,t.y);h?a.lineTo(t.x-f-e/2,t.y-e+f/2):a.lineTo(t.x+e/2-f,t.y-e-f/2);a.lineTo(t.x-f,t.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,d,b,f,e,g,h,n,m,t){e*=h+m;g*=h+m;var r=f.clone();return function(){c.begin();c.moveTo(r.x,r.y);n?c.lineTo(r.x-
+e-g/a,r.y-g+e/a):c.lineTo(r.x+g/a-e,r.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,d){return ua(a,["width"],c,function(c,b,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+d;return new mxPoint(e.x+b*c/4+f*g/2,e.y+f*c/4-b*g/2)},function(c,b,f,e,g,h){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*c)/a.view.scale-d})},ua=function(a,c,d,b,f){return O(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
+a.view.scale,h=d?f[0]:f[e],f=d?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=b.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var n=a.view.scale,m=d?g[0]:g[h],g=d?g[1]:g[h-1],h=g.x-m.x,t=g.y-m.y,r=Math.sqrt(h*h+t*t);b.x=(b.x+c.x)*n;b.y=(b.y+c.y)*n;f.call(this,r,h/r,t/r,m,g,b,e)})},oa=function(a){return function(c){return[O(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.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 f=[O(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)&&f.push(ja(d));return f}},xa=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var g=[O(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,
"size",b?f: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 g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ja(e));return g}},Fa=function(a){return function(c){var b=[O(c,["size"],function(c){var b=Math.max(0,
Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.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(ja(c));return b}},va=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c}},ja=function(a,c){return O(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 f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=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)*f),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))))})},O=function(a,c,b,d,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=d;g.ignoreGrid=null!=f?f:!0;
-if(e){var k=g.positionChanged;g.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ca(a,!0,10),Ca(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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
-a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,k.x,k.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(l.getEvent())&&
-(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.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,f,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,k.x,k.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(l.getEvent())&&
-(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(l.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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,
-e.x+f,e.y-d,k.x,k.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(l.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,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-
-d,k.x,k.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=
+if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ca(a,!0,10),Ca(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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
+a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.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*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
+(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.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,f,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.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*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
+(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,
+e.x+f,e.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*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.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,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.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*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.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=[O(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(ja(a,b/2))}return c},label:va(),ext:va(),rectangle:va(),triangle:va(),rhombus:va(),umlLifeline:function(a){return[O(a,
["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",C.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[O(a,["width","height"],function(a){var c=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),b=Math.max(1.5*I.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,
-"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[O(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=
+"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[O(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",m.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(ja(a));return c},cross:function(a){return[O(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",ca.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[O(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.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=[O(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.prototype.size)));
+c.x)/b*2)))})]},note:function(a){return[O(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=[O(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.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(ja(a));return c},dataStorage:function(a){return[O(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.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=[O(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",v.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}),O(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.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}),O(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),
@@ -2560,22 +2562,22 @@ Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",N.prototype.d
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[O(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[O(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[O(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.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:xa(B.prototype.size,!0,null,!0,B.prototype.fixedSize),hexagon:xa(y.prototype.size,!0,.5,!0),curlyBracket:xa(k.prototype.size,!1),display:xa(da.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,q.prototype.size,!0),loopLimit:Da(.5,W.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=O;Graph.handleFactory=ya;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
+a.height-c.y)/a.height))})]},step:xa(A.prototype.size,!0,null,!0,A.prototype.fixedSize),hexagon:xa(y.prototype.size,!0,.5,!0),curlyBracket:xa(n.prototype.size,!1),display:xa(da.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,q.prototype.size,!0),loopLimit:Da(.5,W.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=O;Graph.handleFactory=ya;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=ya[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ya[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=ya[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),oa=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=
-d&&(d=e.transformControlPoint(a,d));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var l=za.x,n=za.y,t=Aa.x,r=Aa.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){a=function(a,c,b){a-=h.x;var d=c-h.y;c=(r*a-t*d)/(l*r-n*t);a=(n*a-l*d)/(n*t-l*r);y?(b&&(h=new mxPoint(h.x+l*c,h.y+n*c),f.push(h)),h=new mxPoint(h.x+t*a,h.y+r*a)):(b&&(h=new mxPoint(h.x+t*a,h.y+r*a),f.push(h)),h=new mxPoint(h.x+
-l*c,h.y+n*c));f.push(h)};var h=k;null==d&&(d=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.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,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};d.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];
+mxConstants.SHAPE_CONNECTOR);a=ya[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),oa=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=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=e.transformControlPoint(a,d));null==h&&null!=c&&(h=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=za.x,m=za.y,t=Aa.x,r=Aa.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,c,b){a-=k.x;var d=c-k.y;c=(r*a-t*d)/(n*r-m*t);a=(m*a-n*d)/(m*t-n*r);y?(b&&(k=new mxPoint(k.x+n*c,k.y+m*c),f.push(k)),k=new mxPoint(k.x+t*a,k.y+r*a)):(b&&(k=new mxPoint(k.x+t*a,k.y+r*a),f.push(k)),k=new mxPoint(k.x+
+n*c,k.y+m*c));f.push(k)};var k=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,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.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;t.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
+.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
E.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=
mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;aa.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)];G.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)];F.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)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.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)];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(.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,
+0),!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(.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)];R.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),
@@ -2586,76 +2588,77 @@ mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.protot
new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.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)];C.prototype.constraints=null;V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];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)];X.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()}
-Actions.prototype.init=function(){function a(a){b.escape();var d=b.getDeletableCells(b.getSelectionCells());if(null!=d&&0<d.length){var c=b.model.getParents(d);b.removeCells(d,a);if(null!=c){a=[];for(d=0;d<c.length;d++)b.model.contains(c[d])&&(b.model.isVertex(c[d])||b.model.isEdge(c[d]))&&a.push(c[d]);b.setSelectionCells(a)}}}var d=this.editorUi,e=d.editor,b=e.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){b.openLink(d.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));d.showDialog((new OpenDialog(this)).container,
-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){d.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(d);d.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
-function(){d.showDialog((new PageSetupDialog(d)).container,320,220,!0,!0)}).isEnabled=h;this.addAction("print...",function(){d.showDialog((new PrintDialog(d)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
-function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(b)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();try{var d=mxClipboard.paste(b);if(null!=d){a=!0;for(var c=0;c<d.length&&
-a;c++)a=a&&b.model.isEdge(d[c]);var f=b.view.translate,e=b.view.scale,k=f.x,r=f.y,f=null;if(1==d.length&&a){var l=b.getCellGeometry(d[0]);null!=l&&(f=l.getTerminalPoint(!0))}f=null!=f?f:b.getBoundingBoxFromGeometry(d,a);if(null!=f){var n=Math.round(b.snap(b.popupMenuHandler.triggerX/e-k)),h=Math.round(b.snap(b.popupMenuHandler.triggerY/e-r));b.cellsMoved(d,n-f.x,h-f.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=b.getSelectionCell();b.isEnabled()&&null!=a&&b.getModel().isVertex(a)&&
-(a=b.getCellGeometry(a),null!=a&&(d.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shit+X");this.addAction("pasteSize",function(a){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=d.copiedSize){b.getModel().beginUpdate();try{var e=b.getSelectionCells();for(a=0;a<e.length;a++)if(b.getModel().isVertex(e[a])){var c=b.getCellGeometry(e[a]);null!=c&&(c=c.clone(),c.width=d.copiedSize.width,c.height=d.copiedSize.height,b.getModel().setGeometry(e[a],c))}}finally{b.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(){b.setSelectionCells(b.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){b.turnShapes(b.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",
-function(){b.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){b.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){b.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){b.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!b.isSelectionEmpty()){b.getModel().beginUpdate();try{var a=b.isCellMovable(b.getSelectionCell())?1:0;b.toggleCellStyles(mxConstants.STYLE_MOVABLE,
-a);b.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);b.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);b.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);b.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);b.toggleCellStyles("connectable",a)}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){b.home()},null,null,"Home");this.addAction("exitGroup",function(){b.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){b.enterGroup()},
-null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){b.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){b.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){b.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){b.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==b.getSelectionCount()?b.setCellStyles("container","1"):b.setSelectionCell(b.groupCells(null,
-0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==b.getSelectionCount()&&0==b.getModel().getChildCount(b.getSelectionCell())?b.setCellStyles("container","0"):b.setSelectionCells(b.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){b.removeCellsFromParent()});this.addAction("edit",function(){b.isEnabled()&&b.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=b.getSelectionCell()||b.getModel().getRoot();
-d.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=d.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var b=a.getSelectionCell(),c="";if(mxUtils.isNode(b.value)){var f=b.value.getAttribute("tooltip");null!=f&&(c=f)}c=new TextareaDialog(d,mxResources.get("editTooltip")+":",c,function(c){a.setTooltipForCell(b,c)});d.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=b.getLinkForCell(b.getSelectionCell());
-null!=a&&b.openLink(a)});this.addAction("editLink...",function(){var a=d.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var b=a.getSelectionCell(),c=a.getLinkForCell(b)||"";d.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(b,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.addAction("insertLink...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(a,d){a=mxUtils.trim(a);if(0<a.length){var c=
-null,f=b.getLinkTitle(a);null!=d&&0<d.length&&(c=d[0].iconUrl,f=d[0].name||d[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));var e=b.getFreeInsertPoint(),c=new mxCell(f,new mxGeometry(e.x,e.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;b.setLinkForCell(c,a);b.cellSizeUpdated(c,!0);b.getModel().beginUpdate();try{c=b.addCell(c),
-b.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{b.getModel().endUpdate()}b.setSelectionCell(c);b.scrollCellToVisible(b.getSelectionCell())}})}).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){var a=d.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),c=a.getParentByName(b,"A",a.cellEditor.textarea),f="";if(null==c&&null!=b&&null!=b.getElementsByTagName)for(var e=b.getElementsByTagName("a"),k=0;k<e.length&&null==c;k++)e[k].textContent==
-b.textContent&&(a.selectNode(e[k]),c=e[k]);null!=c&&"A"==c.nodeName&&(f=c.getAttribute("href")||"");var r=a.cellEditor.saveSelection();d.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(r);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var d=0;d<a.length;d++){var c=
-a[d];if(b.getModel().getChildCount(c))b.updateGroupBounds([c],20);else{var f=b.view.getState(c),e=b.getCellGeometry(c);b.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=e&&b.isWrapping(c)?(e=e.clone(),e.height=f.text.boundingBox.height/b.view.scale,b.getModel().setGeometry(c,e)):b.updateCellSize(c)}}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=b.getView().getState(b.getSelectionCell());if(null!=a){var e="1";b.stopEditing();
-b.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,c=b.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=c;c=mxUtils.extractTextWithWhitespace(f.childNodes);b.cellLabelChanged(a.cell,c)}else c=mxUtils.htmlEntities(b.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>")),b.cellLabelChanged(a.cell,b.sanitizeHtml(c));
-b.setCellStyles("html",e);d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),d="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",function(){var a="0",e=b.getView().getState(b.getSelectionCell());
-null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(d,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&b.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){b.zoomTo(1);d.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){b.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
-this.addAction("zoomOut",function(a){b.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){b.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,d=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/a.width/d,(b.container.clientHeight-10)/a.height/d))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=
-a.y*b.view.scale-1,b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,d=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/(2*a.width)/d,(b.container.clientHeight-10)/a.height/d))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=Math.min(a.y,
-(b.container.scrollHeight-b.container.clientHeight)/2),b.container.scrollLeft=Math.min(a.x,(b.container.scrollWidth-b.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();b.zoomTo(Math.floor(20*(b.container.clientWidth-10)/b.pageFormat.width/b.pageScale)/20);if(mxUtils.hasScrollbars(b.container)){var a=b.getPagePadding();b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-
-b.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
-parseInt(100*b.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){b.setGridEnabled(!b.isGridEnabled());d.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return b.isGridEnabled()});m.setEnabled(!1);
-m=this.addAction("guides",function(){b.graphHandler.guidesEnabled=!b.graphHandler.guidesEnabled;d.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){b.tooltipHandler.setEnabled(!b.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=
-new ChangePageSetup(d);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.foldingEnabled});m.isEnabled=h;m=this.addAction("scrollbars",function(){d.setScrollbars(!d.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){d.setPageVisible(!b.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return b.pageVisible});
-m=this.addAction("connectionArrows",function(){b.connectionArrowsEnabled=!b.connectionArrowsEnabled;d.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return b.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){b.setConnectable(!b.connectionHandler.isEnabled());d.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return b.connectionHandler.isEnabled()});
-m=this.addAction("copyConnect",function(){b.connectionHandler.setCreateTarget(!b.connectionHandler.isCreateTarget());d.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(d.showDialog((new AboutDialog(d)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,d,c,f){return this.addAction(a,function(){if(null!=c&&b.cellEditor.isContentEditing())c();else{b.stopEditing(!1);b.getModel().beginUpdate();try{b.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
-d),(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&b.replaceElement(a)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&b.replaceElement(a)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.updateLabelElements(b.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&
-b.replaceElement(a)})}finally{b.getModel().endUpdate()}}},null,null,f)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){d.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
-this.addAction("strokeColor...",function(){d.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){d.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){d.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
-this.addAction("vertical",function(){d.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){d.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_DASHED,null),b.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});
-this.addAction("dashed",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_DASHED,"1"),b.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("dotted",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_DASHED,"1"),b.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
-"1 4"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("sharp",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),b.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});
-this.addAction("rounded",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),b.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!b.isSelectionEmpty()&&b.isEnabled()){b.getModel().beginUpdate();try{var a=b.getSelectionCells(),e=b.view.getState(a[0]),
-c=null!=e?e.style:b.getCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")?"0":"1";b.setCellStyles(mxConstants.STYLE_ROUNDED,f);b.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("curved",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),b.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=b.view.getState(b.getSelectionCell()),e="1";null!=a&&null!=b.getFoldingImage(a)&&(e="0");b.setCellStyles("collapsible",e);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",b.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var a=b.getSelectionCells();if(null!=a&&0<a.length){var d=b.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(a[0])||"",function(c){null!=c&&b.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){b.isEnabled()&&!b.isSelectionEmpty()&&d.setDefaultStyle(b.getSelectionCell())},null,null,Editor.ctrlKey+
-"+Shift+D");this.addAction("clearDefaultStyle",function(){b.isEnabled()&&d.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var d=e.graph.selectionCellsHandler.getHandler(a);if(d instanceof mxEdgeHandler){for(var c=b.view.translate,f=b.view.scale,g=c.x,c=c.y,a=b.getModel().getParent(a),k=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=k;)g+=k.x,c+=k.y,a=b.getModel().getParent(a),k=
-b.getCellGeometry(a);g=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g));f=Math.round(b.snap(b.popupMenuHandler.triggerY/f-c));d.addPointAt(d.state,g,f)}}});this.addAction("removeWaypoint",function(){var a=d.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var d=0;d<a.length;d++){var c=a[d];if(b.getModel().isEdge(c)){var f=
-b.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,b.getModel().setGeometry(c,f))}}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
-function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=b.getView().getState(b.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=b.cellEditor.saveSelection();d.showImageDialog(a,c,function(a,c,d){if(b.cellEditor.isContentEditing())b.cellEditor.restoreSelection(f),b.insertImage(a,c,d);else{var e=b.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;b.getModel().beginUpdate();
-try{if(0==e.length){var k=b.getFreeInsertPoint(),g=e=[b.insertVertex(b.getDefaultParent(),null,"",k.x,k.y,c,d,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];b.fireEvent(new mxEventObject("cellsInserted","cells",g))}b.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var r=b.view.getState(e[0]),h=null!=r?r.style:b.getCellStyle(e[0]);"image"!=h[mxConstants.STYLE_SHAPE]&&"label"!=h[mxConstants.STYLE_SHAPE]?b.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-e):0==a.length&&b.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==b.getSelectionCount()&&null!=c&&null!=d){var y=e[0],t=b.getModel().getGeometry(y);null!=t&&(t=t.clone(),t.width=c,t.height=d,b.getModel().setGeometry(y,t))}}finally{b.getModel().endUpdate()}null!=g&&(b.setSelectionCells(g),b.scrollCellToVisible(g[0]))}}},b.cellEditor.isContentEditing(),!b.cellEditor.isContentEditing())}}).isEnabled=h;this.addAction("insertImage...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
-(b.clearSelection(),d.actions.get("image").funct())}).isEnabled=h;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers"))):
-this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));m=this.addAction("outline",
-mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
-null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,d,e,b,h){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,d,e,b,h))};Actions.prototype.put=function(a,d){return this.actions[a]=d};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,d,e,b,h){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(d);this.enabled=null!=e?e:!0;this.iconCls=b;this.shortcut=h;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,d){mxEventSource.call(this);this.ui=a;this.data=d||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,d,e,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,d,e){};DrawioFile.prototype.saveFile=function(a,d,e,b){};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.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,e){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,d,e){};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.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){var e=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
-this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);
-this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
-DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<span title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</span>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("span"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,d,e,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<d?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),
-mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=e&&e(null)}),a)};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.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,d){if(null!=a&&null!=d){var e=a.lastIndexOf("."),b=0<e?a.substring(e):"",e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return a==d};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,d,e,b){DrawioFile.call(this,a,d);this.title=e;this.mode=b?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,d,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};
-LocalFile.prototype.saveFile=function(a,d,e,b){this.title=a;this.updateFileData();d=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&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(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):m(d)};LocalFile.prototype.rename=function(a,d,e){this.title=a;this.descriptorChanged();null!=d&&d()};
-LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(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":
+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,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.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 f=d.view.translate,e=d.view.scale,n=f.x,r=f.y,f=null;if(1==b.length&&a){var h=d.getCellGeometry(b[0]);null!=h&&(f=h.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/e-n)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/e-r));d.cellsMoved(b,m-f.x,k-f.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 e=d.getSelectionCells();for(a=0;a<e.length;a++)if(d.getModel().isVertex(e[a])){var c=d.getCellGeometry(e[a]);null!=c&&(c=c.clone(),c.width=b.copiedSize.width,c.height=b.copiedSize.height,d.getModel().setGeometry(e[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,
+a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},
+null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,
+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 f=d.value.getAttribute("tooltip");null!=f&&(c=f)}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.addAction("insertLink...",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,f=d.getLinkTitle(a);null!=b&&0<b.length&&(c=b[0].iconUrl,f=b[0].name||b[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));var e=d.getFreeInsertPoint(),c=new mxCell(f,new mxGeometry(e.x,e.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),
+d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),c=a.getParentByName(d,"A",a.cellEditor.textarea),f="";if(null==c&&null!=d&&null!=d.getElementsByTagName)for(var e=d.getElementsByTagName("a"),n=0;n<e.length&&null==c;n++)e[n].textContent==
+d.textContent&&(a.selectNode(e[n]),c=e[n]);null!=c&&"A"==c.nodeName&&(f=c.getAttribute("href")||"");var r=a.cellEditor.saveSelection();b.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(r);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 f=d.view.getState(c),e=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=e&&d.isWrapping(c)?(e=e.clone(),e.height=f.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,e)):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 e="1";d.stopEditing();
+d.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,c=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=c;c=mxUtils.extractTextWithWhitespace(f.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",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"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",e=d.getView().getState(d.getSelectionCell());
+null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
+this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){d.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=
+a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,
+(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-
+d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
+parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);
+l=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=
+new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});
+l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
+l=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a=
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var 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"));l=mxUtils.bind(this,function(a,b,c,f){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,f)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
+this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
+this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
+this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
+"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
+this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.view.getState(a[0]),
+c=null!=e?e.style:d.getCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+
+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var c=d.view.translate,f=d.view.scale,g=c.x,c=c.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)g+=n.x,c+=n.y,a=d.getModel().getParent(a),n=
+d.getCellGeometry(a);g=Math.round(d.snap(d.popupMenuHandler.triggerX/f-g));f=Math.round(d.snap(d.popupMenuHandler.triggerY/f-c));b.addPointAt(b.state,g,f)}}});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 f=
+d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
+function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,c,b);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;d.getModel().beginUpdate();
+try{if(0==e.length){var n=d.getFreeInsertPoint(),g=e=[d.insertVertex(d.getDefaultParent(),null,"",n.x,n.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var r=d.view.getState(e[0]),k=null!=r?r.style:d.getCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=c&&null!=b){var y=e[0],t=d.getModel().getGeometry(y);null!=t&&(t=t.clone(),t.width=c,t.height=b,d.getModel().setGeometry(y,t))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=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");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
+mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
+null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,d){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
+DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};
+DrawioFile.prototype.move=function(a,b,e){};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(){var a=this.getData();null!=a&&this.ui.setFileData(a);this.changeListener=mxUtils.bind(this,function(a,e){var b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",
+this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",
+this.changeListener)};
+DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null,
+0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()})))};
+DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus()};
+DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):
+null,null!=a&&0<a.length?mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()})):this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+"</div>"))};
+DrawioFile.prototype.autosave=function(a,b,e,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.autosaveThead==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();
+null!=e&&e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};
+DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
+LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
+LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(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.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
@@ -2667,8 +2670,9 @@ dispName:"Source Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none
type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"loopStyle",dispName:"Loop Style",type:"bool",defVal:!0}];Editor.commonVertexProperties=[{type:"separator"},{name:"fillOpacity",dispName:"Fill Opacity",
type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",
type:"enum",defVal:"east",enumList:[{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Port Const. Rot.",type:"bool",defVal:!1},{name:"snapToPoint",dispName:"Snap to Point",
-type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",
-type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",
+dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",
+dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;
Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
@@ -2677,17 +2681,17 @@ a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarW
Editor.guid=function(){return Editor.s4()+Editor.s4()+"-"+Editor.s4()+"-"+Editor.s4()+"-"+Editor.s4()+"-"+Editor.s4()+Editor.s4()+Editor.s4()};Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=
b[0],d=b.getElementsByTagName("div");null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:
mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var f=new mxCodec(d.ownerDocument);f.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 d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=
+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(H){}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 f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);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 e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&
+"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&
null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:"https://math.draw.io/current/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,
showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{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 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 f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};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,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);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 l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.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 q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
"1"==urlParams.embed||this.editorUi.editor.chromeless?q.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,
@@ -2714,45 +2718,45 @@ stroke:"#008a00",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#1ba1e2",font:"#ffffff"
font:"#ffffff"},{fill:"#6d8764",stroke:"#6d8764",font:"#ffffff"},{fill:"#647687",stroke:"#647687",font:"#ffffff"},{fill:"#76608a",stroke:"#76608a",font:"#ffffff"},{fill:"#a0522d",stroke:"#a0522d",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 f in c){for(var e=!1,d=0;d<a.length;d++)if(a[d].name==f&&a[d].type==c[f].type){e=!0;break}e||delete c[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=
-!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(A){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(B){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
f.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],c,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==b.length&&0==e);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var g=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 g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){t.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],k=b.parentRow.nextSibling;k&&k.getAttribute("data-pName")==a;)g.push(k.getAttribute("data-pValue")),k=k.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>
-b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,c,t.getSelectionCells());f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var l=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var h=n.length;h<c;h++)n.push(l);n=n.join(",");t.setCellStyles(b.dependentProps[a],n,t.getSelectionCells());
-f.push(b.dependentProps[a]);e.push(n)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var f=document.createElement("div");f.style.width="32px";f.style.height=
-"4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,k){null!=c&&(c=c.split(","),h.push({name:a,
-values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var l=g,r=0;null!=l.nextSibling;)if(l.nextSibling.getAttribute("data-pName")==a)l=l.nextSibling,r++;else break;var t={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=n(a,"",t,0==r%2,k);d(a,f,t);l.parentNode.insertBefore(r,l.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(a,c,b,d,f,e,g){if(0<f){var k=Array(f);c=null!=c?c.split(","):[];for(var l=0;l<f;l++)k[l]=null!=c[l]?c[l]:null!=d?d:"";h.push({name:a,values:k,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function l(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function n(c,b,n,t,h){var v=n.dispName,w=n.type,y=document.createElement("tr");y.className="gePropRow"+
-(h?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";y.setAttribute("data-pName",c);y.setAttribute("data-pValue",b);t=!1;null!=n.index&&(y.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",t=!0);var x=document.createElement("td");x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(x.style.textAlign="right");y.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==w)x.appendChild(e(c,b,n));else if("bool"==w||"boolean"==
-w)x.appendChild(l(c,b,n));else if("enum"==w){var m=n.enumList;for(h=0;h<m.length;h++)if(v=m[h],v.val==b){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(r,function(){var e=document.createElement("select");f(x,e);for(var g=0;g<m.length;g++){var k=m[g],l=document.createElement("option");l.value=mxUtils.htmlEntities(k.val);l.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));e.appendChild(l)}e.value=
-b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);d(c,a,n)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==w?x.appendChild(g(c,b,n.subType,n.subDefVal,n.countProperty,y,h)):"staticArr"==w?x.appendChild(k(c,b,n.subType,n.subDefVal,n.size,y,h)):(x.innerHTML=b,mxEvent.addListener(x,"click",mxUtils.bind(r,function(){function e(){var a=g.value;null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==
-w?parseInt(a):a)+"");d(c,a,n)}var g=document.createElement("input");f(x,g,!0);g.value=b;g.className="gePropEditor";if("int"==w||"float"==w)g.type="number",g.step="int"==w?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max));a.appendChild(g);mxEvent.addListener(g,"change",e);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})})));n.isDeletable&&(h=mxUtils.button("-",mxUtils.bind(r,
-function(a){d(c,"",n,n.index);mxEvent.consume(a)})),h.style.height="16px",h.style.width="25px",h.style["float"]="right",h.className="geColorBtn",x.appendChild(h));y.appendChild(x);return y}var r=this,t=this.editorUi.editor.graph,h=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var w=document.createElement("tr");w.className="gePropHeader";var y=document.createElement("th");y.className="gePropHeaderCell";var m=
-document.createElement("img");m.src=Sidebar.prototype.expandedImage;y.appendChild(m);mxUtils.write(y,mxResources.get("property",null,"Property"));w.style.cursor="pointer";var p=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else m.src=Sidebar.prototype.expandedImage,
-b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;p()});w.appendChild(y);y=document.createElement("th");y.className="gePropHeaderCell";y.innerHTML=mxResources.get("value",null,"Value");w.appendChild(y);v.appendChild(w);var B=!1,z=!1,q;for(q in c){var w=c[q],u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)z=!z;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||
-c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,M=[],N=[],y=0;y<S.length;y++){var T=b.style[S[y]];N.push(c[S[y]].subDefVal);M.push(null!=T?T.split(","):[])}w.dependentPropsDefVal=N;w.dependentPropsVals=M}v.appendChild(n(q,u,w,B,z));B=!B}}for(y=0;y<h.length;y++)for(w=h[y],c=w.parentRow,b=0;b<w.values.length;b++)q=n(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},
-0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(v);p();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 f=d.getModel().getStyle(b[c]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,e[g]);var k=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,
-a.fill||mxUtils.getValue(k,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(k,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(k,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(k,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(k,
-mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(k,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(k,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(k,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(b[c],f)}}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"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),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,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(k);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.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){t.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],h=b.parentRow.nextSibling;h&&h.getAttribute("data-pName")==a;)g.push(h.getAttribute("data-pValue")),h=h.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>
+b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,c,t.getSelectionCells());f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],m=b.dependentPropsVals[a];if(m.length>c)m=m.slice(0,c);else for(var k=m.length;k<c;k++)m.push(n);m=m.join(",");t.setCellStyles(b.dependentProps[a],m,t.getSelectionCells());
+f.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var f=document.createElement("div");f.style.width="32px";f.style.height=
+"4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,h){null!=c&&(c=c.split(","),k.push({name:a,
+values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:h}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var n=g,r=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,r++;else break;var t={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=m(a,"",t,0==r%2,h);d(a,f,t);n.parentNode.insertBefore(r,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function h(a,c,b,d,f,e,g){if(0<f){var h=Array(f);c=null!=c?c.split(","):[];for(var n=0;n<f;n++)h[n]=null!=c[n]?c[n]:null!=d?d:"";k.push({name:a,values:h,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function m(c,b,m,t,k){var v=m.dispName,w=m.type,y=document.createElement("tr");y.className="gePropRow"+
+(k?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";y.setAttribute("data-pName",c);y.setAttribute("data-pValue",b);t=!1;null!=m.index&&(y.setAttribute("data-index",m.index),v=(null!=v?v:"")+"["+m.index+"]",t=!0);var x=document.createElement("td");x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(x.style.textAlign="right");y.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==w)x.appendChild(e(c,b,m));else if("bool"==w||"boolean"==
+w)x.appendChild(n(c,b,m));else if("enum"==w){var l=m.enumList;for(k=0;k<l.length;k++)if(v=l[k],v.val==b){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(r,function(){var e=document.createElement("select");f(x,e);for(var g=0;g<l.length;g++){var h=l[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(h.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));e.appendChild(n)}e.value=
+b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);d(c,a,m)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==w?x.appendChild(g(c,b,m.subType,m.subDefVal,m.countProperty,y,k)):"staticArr"==w?x.appendChild(h(c,b,m.subType,m.subDefVal,m.size,y,k)):(x.innerHTML=b,mxEvent.addListener(x,"click",mxUtils.bind(r,function(){function e(){var a=g.value,a=0==a.length&&"string"!=w?0:a;m.allowAuto&&("auto"==a.trim().toLowerCase()?
+(a="auto",w="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=m.min&&a<m.min?a=m.min:null!=m.max&&a>m.max&&(a=m.max);a=mxUtils.htmlEntities(("int"==w?parseInt(a):a)+"");d(c,a,m)}var g=document.createElement("input");f(x,g,!0);g.value=b;g.className="gePropEditor";"int"!=w&&"float"!=w||m.allowAuto||(g.type="number",g.step="int"==w?"1":"any",null!=m.min&&(g.min=parseFloat(m.min)),null!=m.max&&(g.max=parseFloat(m.max)));a.appendChild(g);mxEvent.addListener(g,"change",e);mxEvent.addListener(g,"keypress",
+function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})})));m.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(r,function(a){d(c,"",m,m.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",x.appendChild(k));y.appendChild(x);return y}var r=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 w=document.createElement("tr");w.className="gePropHeader";var y=document.createElement("th");y.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;y.appendChild(l);mxUtils.write(y,mxResources.get("property",null,"Property"));w.style.cursor="pointer";var p=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-
+1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;p()});w.appendChild(y);y=document.createElement("th");y.className="gePropHeaderCell";y.innerHTML=mxResources.get("value",null,"Value");w.appendChild(y);v.appendChild(w);var A=!1,z=!1,q;for(q in c){var w=
+c[q],u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)z=!z;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,M=[],N=[],y=0;y<S.length;y++){var T=b.style[S[y]];N.push(c[S[y]].subDefVal);M.push(null!=T?T.split(","):[])}w.dependentPropsDefVal=N;w.dependentPropsVals=M}v.appendChild(m(q,u,w,A,z));A=!A}}for(y=0;y<k.length;y++)for(w=k[y],c=w.parentRow,b=0;b<w.values.length;b++)q=
+m(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(v);p();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 f=d.getModel().getStyle(b[c]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
+e[g]);var h=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,
+a.font||mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,
+null))));d.getModel().setStyle(b[c],f)}}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"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+
+g}f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),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,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);
+var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var h=document.createElement("div");h.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(h));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])}));b(g);b(h);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,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var k=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}k.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}n.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var 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("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}return d.apply(this,arguments)}};var r=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return r.apply(this,arguments)&&!mxClient.IS_SF};var l=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=l.apply(this,arguments);if(null==
-c){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&&(c=this.globalUrlVars[a])}return c};var n=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){n.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||
+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}return d.apply(this,arguments)}};var r=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return r.apply(this,arguments)&&!mxClient.IS_SF};var h=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=h.apply(this,arguments);if(null==
+c){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&&(c=this.globalUrlVars[a])}return c};var m=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){m.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 w=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){w.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 f=this.model.getCell(a[b]);null!=f&&c.push(f)}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 f=0;f<c.length;f++)if(this.model.isVertex(c[f])||this.model.isEdge(c[f])){var e=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),k=0;k<a.length&&g;k++)var l=mxUtils.trim(a[k]).toLowerCase(),
-g=g&&(0==l.length||0<=mxUtils.indexOf(e,l));else g=0==a.length;g&&d.push(c[f])}}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 f=0;f<
+d},d));else{var f=this.model.getCell(a[b]);null!=f&&c.push(f)}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 f=0;f<c.length;f++)if(this.model.isVertex(c[f])||this.model.isEdge(c[f])){var e=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),h=0;h<a.length&&g;h++)var n=mxUtils.trim(a[h]).toLowerCase(),
+g=g&&(0==n.length||0<=mxUtils.indexOf(e,n));else g=0==a.length;g&&d.push(c[f])}}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 f=0;f<
a.length;f++)this.highlightCell(a[f],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 f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,f,!1);null!=d&&(e.opacity=d);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},
1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=d.createElementNS?
d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);
@@ -2766,244 +2770,245 @@ mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mx
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];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.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 v=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,g,k,l,n){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){t.value=Math.max(1,
-Math.min(k,Math.max(parseInt(t.value),parseInt(v.value))));v.value=Math.max(1,Math.min(k,Math.min(parseInt(t.value),parseInt(v.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,k=0,l=ga.get(),n=1/c.pageScale,r=y.checked;if(r)var n=parseInt(Q.value),h=parseInt(V.value),n=Math.min(l.height*h/(e.height/c.view.scale),l.width*n/(e.width/c.view.scale));else n=parseInt(p.value)/(100*c.pageScale),isNaN(n)&&(d=1/c.pageScale,p.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*
-d);l.height=Math.ceil(l.height*d);n*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*l.width,k-=e.y*l.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,n,l,0,g,k,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var w=b.writeHead;b.writeHead=function(c){w.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 v=b.renderPage;b.renderPage=
-function(a,c,b,d,f,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var k=v.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}b.open(null,null,f,!0)}else{l=c.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";b.backgroundColor=l;b.autoOrigin=r;b.appendGraph(c,n,g,k,f,!0)}return b}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,
-W.value="100 %");var d=.75*d,e=v.value,g=t.value,k=!r.checked,n=null;k&&(k=e==l&&g==l);if(!k&&null!=a.pages&&a.pages.length){var h=0,k=a.pages.length-1;r.checked||(h=parseInt(e)-1,k=parseInt(g)-1);for(var w=h;w<=k;w++){var m=a.pages[w],e=m==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,h=!1,x=null,B=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(g=m.viewState.pageVisible,h=m.viewState.mathEnabled,x=m.viewState.background,
-B=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(h="0"!=m.mapping.diagramMap.get("mathEnabled"),x=m.mapping.diagramMap.get("background"),B=m.mapping.diagramMap.get("backgroundImage"),B=null!=B&&0<B.length?JSON.parse(B):null);e.background=x;e.backgroundImage=null!=B?new mxImage(B.src,B.width,B.height):null;e.pageVisible=g;e.mathEnabled=h;var q=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?w+1:q.apply(this,arguments)};document.body.appendChild(e.container);
-a.updatePageRoot(m);e.model.setRoot(m.root)}n=b(e,n,w!=k);e!=f&&e.container.parentNode.removeChild(e.container)}}else n=b(f);n.mathEnabled&&(k=n.wnd.document,k.writeln('<script type="text/x-mathjax-config">'),k.writeln("MathJax.Hub.Config({"),k.writeln("showMathMenu: false,"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),k.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),k.writeln('"HTML-CSS": {'),
-k.writeln("imageFont: null"),k.writeln("},"),k.writeln("TeX: {"),k.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),k.writeln("},"),k.writeln("tex2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("},"),k.writeln("asciimath2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("}"),k.writeln("});"),c&&(k.writeln("MathJax.Hub.Queue(function () {"),k.writeln("window.print();"),k.writeln("});")),k.writeln("\x3c/script>"),k.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));
-n.closeDocument();!n.mathEnabled&&c&&PrintDialog.printPreview(n)}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var k=1,l=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";
-r.setAttribute("value","all");r.setAttribute("type","radio");r.setAttribute("name","pages-printdialog");n.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var h=r.cloneNode(!0);r.setAttribute("checked","checked");h.setAttribute("value","range");n.appendChild(h);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
-v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";n.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var t=v.cloneNode(!0);n.appendChild(t);mxEvent.addListener(v,"focus",function(){h.checked=!0});mxEvent.addListener(t,"focus",function(){h.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(t,"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
-a.pages[g]){l=g+1;v.value=l;t.value=l;break}v.setAttribute("max",k);t.setAttribute("max",k);1<k&&e.appendChild(n);var w=document.createElement("div");w.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");w.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));w.appendChild(g);var p=document.createElement("input");p.style.cssText=
-"margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";w.appendChild(p);mxEvent.addListener(p,"focus",function(){m.checked=!0});e.appendChild(w);var n=n.cloneNode(!1),y=m.cloneNode(!0);y.setAttribute("value","fit");m.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(y);n.appendChild(g);w=document.createElement("table");w.style.display="inline-block";var B=document.createElement("tbody"),
+[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 v=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,g,h,n,m){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){w.value=Math.max(1,
+Math.min(h,Math.max(parseInt(w.value),parseInt(v.value))));v.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(v.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,h=0,n=ga.get(),m=1/c.pageScale,r=y.checked;if(r)var m=parseInt(Q.value),k=parseInt(V.value),m=Math.min(n.height*k/(e.height/c.view.scale),n.width*m/(e.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(d=1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*
+d);n.height=Math.ceil(n.height*d);m*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,n,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var t=b.writeHead;b.writeHead=function(c){t.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 v=b.renderPage;b.renderPage=
+function(a,c,b,d,f,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var h=v.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=r;b.appendGraph(c,m,g,h,f,!0)}return b}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,
+W.value="100 %");var d=.75*d,e=v.value,g=w.value,h=!r.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var k=0,h=a.pages.length-1;r.checked||(k=parseInt(e)-1,h=parseInt(g)-1);for(var t=k;t<=h;t++){var l=a.pages[t],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,x=null,A=null;null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(g=l.viewState.pageVisible,k=l.viewState.mathEnabled,x=l.viewState.background,
+A=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(k="0"!=l.mapping.diagramMap.get("mathEnabled"),x=l.mapping.diagramMap.get("background"),A=l.mapping.diagramMap.get("backgroundImage"),A=null!=A&&0<A.length?JSON.parse(A):null);e.background=x;e.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;e.pageVisible=g;e.mathEnabled=k;var q=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:q.apply(this,arguments)};document.body.appendChild(e.container);
+a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,t!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=b(f);m.mathEnabled&&(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln("showMathMenu: false,"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln('"HTML-CSS": {'),
+h.writeln("imageFont: null"),h.writeln("},"),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),c&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));
+m.closeDocument();!m.mathEnabled&&c&&PrintDialog.printPreview(m)}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var h=1,n=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";
+r.setAttribute("value","all");r.setAttribute("type","radio");r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var k=r.cloneNode(!0);r.setAttribute("checked","checked");k.setAttribute("value","range");m.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
+v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";m.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var w=v.cloneNode(!0);m.appendChild(w);mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(w,"focus",function(){k.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
+a.pages[g]){n=g+1;v.value=n;w.value=n;break}v.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(m);var t=document.createElement("div");t.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");t.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));t.appendChild(g);var p=document.createElement("input");p.style.cssText=
+"margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";t.appendChild(p);mxEvent.addListener(p,"focus",function(){l.checked=!0});e.appendChild(t);var m=m.cloneNode(!1),y=l.cloneNode(!0);y.setAttribute("value","fit");l.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(y);m.appendChild(g);t=document.createElement("table");t.style.display="inline-block";var A=document.createElement("tbody"),
q=document.createElement("tr"),u=q.cloneNode(!0),E=document.createElement("td"),S=E.cloneNode(!0),M=E.cloneNode(!0),N=E.cloneNode(!0),T=E.cloneNode(!0),D=E.cloneNode(!0);E.style.textAlign="right";N.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var Q=document.createElement("input");Q.style.cssText="margin:0 8px 0 8px;";Q.setAttribute("value","1");Q.setAttribute("min","1");Q.setAttribute("type","number");Q.style.width="40px";S.appendChild(Q);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));M.appendChild(g);mxUtils.write(N,mxResources.get("fitToBy"));var V=Q.cloneNode(!0);T.appendChild(V);mxEvent.addListener(Q,"focus",function(){y.checked=!0});mxEvent.addListener(V,"focus",function(){y.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));D.appendChild(g);q.appendChild(E);q.appendChild(S);q.appendChild(M);u.appendChild(N);u.appendChild(T);u.appendChild(D);B.appendChild(q);B.appendChild(u);w.appendChild(B);
-n.appendChild(w);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ga=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);
-var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";n.appendChild(W);e.appendChild(n);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(w=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-w.className="geBtn",g.appendChild(w));PrintDialog.previewEnabled&&(w=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),w.className="geBtn",g.appendChild(w));w=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});w.className="geBtn gePrimaryBtn";g.appendChild(w);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var B=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)):(B.apply(this,arguments),null!=this.mathEnabled&&
+mxResources.get("fitToSheetsAcross"));M.appendChild(g);mxUtils.write(N,mxResources.get("fitToBy"));var V=Q.cloneNode(!0);T.appendChild(V);mxEvent.addListener(Q,"focus",function(){y.checked=!0});mxEvent.addListener(V,"focus",function(){y.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));D.appendChild(g);q.appendChild(E);q.appendChild(S);q.appendChild(M);u.appendChild(N);u.appendChild(T);u.appendChild(D);A.appendChild(q);A.appendChild(u);t.appendChild(A);
+m.appendChild(t);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ga=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
+var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";m.appendChild(W);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+t.className="geBtn",g.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className="geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var A=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)):(A.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,d,e,b,h,m,p,q,u,c,f){u=null!=u?u:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=d){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k,d);g.appendChild(k)}d=document.createElement("div");d.style.padding="6px";d.innerHTML=e;g.appendChild(d);e=document.createElement("div");
-e.style.marginTop="16px";e.style.textAlign="center";null!=m&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),d.className="geBtn",e.appendChild(d),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(b,function(){u&&a.hideDialog();null!=h&&h()});r.className="geBtn";e.appendChild(r);null!=p&&(b=mxUtils.button(p,function(){u&&a.hideDialog();null!=q&&q()}),b.className="geBtn gePrimaryBtn",
-e.appendChild(b));this.init=function(){r.focus()};g.appendChild(e);this.container=g};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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";
+var ErrorDialog=function(a,b,e,d,k,l,p,q,u,c,f){u=null!=u?u:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="16px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";mxUtils.write(n,b);g.appendChild(n)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=e;g.appendChild(b);e=document.createElement("div");
+e.style.marginTop="16px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});r.className="geBtn";e.appendChild(r);null!=p&&(d=mxUtils.button(p,function(){u&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",
+e.appendChild(d));this.init=function(){r.focus()};g.appendChild(e);this.container=g};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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.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(r){}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(l){}};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(r){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(r){}})();
+null!=a&&6<a.length}catch(h){}};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(r){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(r){}})();
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}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight=
"10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",d.appendChild(g),c.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,
b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.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=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.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(k){}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 e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var r=mxUtils.parseXml(c),l=this.editor.extractGraphModel(r.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=
-l?mxUtils.getXml(l):""}catch(n){}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))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();
-try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(d[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,l,0==e?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,r,l,n,h,v,m){b=null!=
-b?b:this.editor.graph;r=null!=r?r:!1;v=null!=v?v:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var k=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(k);if(b.decompress(g)!=k)return k;k=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(k,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(k)}m?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),g.removeAttribute("version"),
-g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!l&&!r&&(n||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(l||!r&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,h,v,f);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){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=this.pages[f].mapping;
-this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),e.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,r,l,n,h,v){r=null!=r?r:!0;n=null!=n?n:this.getXmlFileData(r,null!=l?l:!1);v=null!=v?v:this.getCurrentFile();l=this.editor.graph;
-if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=v&&/(\.svg)$/i.test(v.getTitle()))){l=this.createTemporaryGraph(l.getStylesheet());var c=l.getGlobalVariable,f=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(f.root)}a=this.createFileData(n,l,v,window.location.href,a,b,d,e,r,h);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);return a};
-EditorUi.prototype.getHtml=function(a,b,d,e,r,l){l=null!=l?l:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==r&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",l);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=r&&(r=r.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.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(n){}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 e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var r=mxUtils.parseXml(c),h=this.editor.extractGraphModel(r.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=
+h?mxUtils.getXml(h):""}catch(m){}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))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();
+try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var h=this.updatePageRoot(new DiagramPage(d[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
+this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,r,h,m,k,v,l){b=null!=
+b?b:this.editor.graph;r=null!=r?r:!1;v=null!=v?v:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}l?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(h||!r&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=
+App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,v,f);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++){var f=
+this.pages[d].mapping;if(this.currentPage!=this.pages[d]&&null!=f&&f.needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel);f.writeRealtimeToNode(e);mxUtils.setTextContent(this.pages[d].node,this.editor.graph.compressNode(e));f.needsUpdate=!1}c.appendChild(this.pages[d].node)}return c};EditorUi.prototype.getFileData=function(a,b,d,e,r,h,m,k,v){r=null!=r?r:!0;m=null!=m?m:this.getXmlFileData(r,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 c=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(m,h,v,window.location.href,a,b,d,e,r,k);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=
+function(a,b,d,e,r,h){h=null!=h?h:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==r&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize",
+"0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=r&&(r=r.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==r?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=r?'<meta http-equiv="refresh" content="0;URL=\''+r+"'\"/>\n":"")+"</head>\n<body"+(null==r&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==r?'<script type="text/javascript" src="'+f+'">\x3c/script>':
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+r+'" 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,e,r){null!=r&&(r=r.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==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==r?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=r?'<meta http-equiv="refresh" content="0;URL=\''+r+"'\"/>\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==r?'<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="'+r+'" 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;var c=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);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,e,r,l,n){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!r),
+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,e,r,h,m){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!r),
f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,r));this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=
-this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var f=this.createDownloadRequest(c,a,e,b,n);this.editor.graph.pageVisible=d;return f}catch(x){this.handleError(x)}}));else{var k=null,h=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==a){var m=this.editor.graph.background;if(n||m==
-mxConstants.NONE)m=null;var p=this.editor.graph.getSvg(m,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();h('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",k=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();h(a)}),e)}}catch(G){this.handleError(G)}};
+this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(c,a,e,b,m);this.editor.graph.pageVisible=d;return f}catch(x){this.handleError(x)}}));else{var n=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var l=this.editor.graph.background;if(m||l==
+mxConstants.NONE)l=null;var p=this.editor.graph.getSvg(l,null,null,null,null,e);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 f=c+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(G){this.handleError(G)}};
EditorUi.prototype.createDownloadRequest=function(a,b,d,e,r){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&r&&(g=mxConstants.NONE);
return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&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,f=mxUtils.bind(this,function(d){var f=null!=a.data?a.data:"";null!=d&&0<d.length&&(0<f.length&&(f+="\n"),f+=d);d=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,
-null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,k=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()),l()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(k,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();k()}));l();k()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
+null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,h=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(g);g=window.setTimeout(h,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();h()}));m();h()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){editorUi.alert(a.tooltip)});return c}var b=null;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,
-null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var n=e.getCell(a.getAttribute("id"));if(null!=n){try{var h=a.getAttribute("value");if(null!=h){var v=mxUtils.parseXml(h).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))e.setValue(n,v);else for(var m=v.attributes,p=0;p<m.length;p++)d.setAttributeForCell(n,m[p].nodeName,0<m[p].nodeValue.length?m[p].nodeValue:null)}}catch(x){null!=
-window.console&&console.log("Error in value for "+n.id+": "+x)}try{var t=a.getAttribute("style");null!=t&&d.model.setStyle(n,t)}catch(x){null!=window.console&&console.log("Error in style for "+n.id+": "+x)}try{var q=a.getAttribute("icon");if(null!=q){var u=0<q.length?JSON.parse(q):null;null!=u&&u.append||d.removeCellOverlays(n);null!=u&&d.addCellOverlay(n,c(u))}}catch(x){null!=window.console&&console.log("Error in icon for "+n.id+": "+x)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),
-A=d.getCellGeometry(n);if(null!=A){A=A.clone();for(key in G){var J=parseFloat(G[key]);"dx"==key?A.x+=J:"dy"==key?A.y+=J:"dw"==key?A.width+=J:"dh"==key?A.height+=J:A[key]=parseFloat(G[key])}d.model.setGeometry(n,A)}}}catch(x){null!=window.console&&console.log("Error in icon for "+n.id+": "+x)}}}else if("model"==a.nodeName){for(var K=a.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(a.firstChild)).decode(K,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
-(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);
-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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});
-if(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(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,r);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!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(l){}this.handleError(r,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?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};
-EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,l,n){};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 f=null,e=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 g=0;g<b.length;g++)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[g]);d=null!=d&&0<d.length?d:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);
-var v=h.parentNode.previousSibling;d=v.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&v.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");v.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 t=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.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!=t?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=
-this.editor.graph,u=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=p.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",m.insertBefore(u,m.firstChild),v.style.paddingRight=18*m.childNodes.length+
-"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),v.style.paddingRight=18*m.childNodes.length+"px")})):null==t&&(t=p.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),m.insertBefore(t,m.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||
-(v.style.paddingRight=18*m.childNodes.length+"px",t.parentNode.removeChild(t),t=null)});mxEvent.consume(c)})),v.style.paddingRight=18*m.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var k=q.getCellGeometry(a[g]);null!=k&&k.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
-b.y-=q.view.translate.y;J(c,b)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),
-null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(h.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
-null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=f?f.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!=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,g,k,l,n,r,t,v){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,l,n),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,l,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var m=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var k=JSON.parse(mxUtils.getTextContent(g.documentElement));e(k,h);b=b.concat(k);A(a);
-this.spinner.stop();m=!0}catch(Q){}else if("mxfile"==g.documentElement.nodeName)try{for(var l=g.documentElement.getElementsByTagName("diagram"),g=0;g<l.length;g++){var k=mxUtils.getTextContent(l[g]),n=this.stringToCells(this.editor.graph.decompress(k)),r=this.editor.graph.getBoundingBoxFromGeometry(n);J(n,new mxRectangle(0,0,r.width,r.height),a)}m=!0}catch(Q){null!=window.console&&console.log("error in drop handler:",Q)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=r&&(/(\.v(dx|sdx?))($|\?)/i.test(r)||/(\.vs(x|sx?))($|\?)/i.test(r))?this.importVisio(v,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));m.insertBefore(p,m.firstChild);mxEvent.addListener(p,"click",G);mxEvent.addListener(h,
-"dblclick",function(a){mxEvent.getSource(a)==h&&G(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,"click",K);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)})),m.insertBefore(d,m.firstChild))}v.appendChild(m);v.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
+null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=e.getCell(a.getAttribute("id"));if(null!=m){try{var k=a.getAttribute("value");if(null!=k){var v=mxUtils.parseXml(k).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))e.setValue(m,v);else for(var l=v.attributes,p=0;p<l.length;p++)d.setAttributeForCell(m,l[p].nodeName,0<l[p].nodeValue.length?l[p].nodeValue:null)}}catch(x){null!=
+window.console&&console.log("Error in value for "+m.id+": "+x)}try{var t=a.getAttribute("style");null!=t&&d.model.setStyle(m,t)}catch(x){null!=window.console&&console.log("Error in style for "+m.id+": "+x)}try{var q=a.getAttribute("icon");if(null!=q){var u=0<q.length?JSON.parse(q):null;null!=u&&u.append||d.removeCellOverlays(m);null!=u&&d.addCellOverlay(m,c(u))}}catch(x){null!=window.console&&console.log("Error in icon for "+m.id+": "+x)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),
+B=d.getCellGeometry(m);if(null!=B){B=B.clone();for(key in G){var J=parseFloat(G[key]);"dx"==key?B.x+=J:"dy"==key?B.y+=J:"dw"==key?B.width+=J:"dh"==key?B.height+=J:B[key]=parseFloat(G[key])}d.model.setGeometry(m,B)}}}catch(x){null!=window.console&&console.log("Error in icon for "+m.id+": "+x)}}}else if("model"==a.nodeName){for(var K=a.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(a.firstChild)).decode(K,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.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{e.endUpdate()}null!=h&&this.chromelessResize&&this.chromelessResize(!0,h)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
+d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),m=e.getMonth()+1,k=e.getDate(),v=e.getHours(),l=e.getMinutes(),e=e.getSeconds(),c=c+("-"+(f+"-"+m+"-"+k+"-"+v+"-"+l+"-"+e));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,r);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!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):
+"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,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?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,h,m){};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 f=null,e=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 g=0;g<b.length;g++)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[g]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var v=k.parentNode.previousSibling;d=v.getAttribute("title");null!=
+d&&0<d.length&&".scratchpad"!=a.title&&v.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");v.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 t=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.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!=t?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=this.editor.graph,u=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
+k,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=p.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",l.insertBefore(u,l.firstChild),v.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=u&&null!=
+u.parentNode&&(u.parentNode.removeChild(u),v.style.paddingRight=18*l.childNodes.length+"px")})):null==t&&(t=p.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),l.insertBefore(t,l.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||(v.style.paddingRight=18*l.childNodes.length+"px",t.parentNode.removeChild(t),
+t=null)});mxEvent.consume(c)})),v.style.paddingRight=18*l.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);
+B(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;b.y-=q.view.translate.y;J(c,b)}mxEvent.consume(a)});
+k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.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",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility=
+"visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.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,g,h,m,n,r,t,v){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,n),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var l=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);B(a);this.spinner.stop();
+l=!0}catch(Q){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(n);J(n,new mxRectangle(0,0,r.width,r.height),a)}l=!0}catch(Q){null!=window.console&&console.log("error in drop handler:",Q)}}l||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&
+null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=r&&(/(\.v(dx|sdx?))($|\?)/i.test(r)||/(\.vs(x|sx?))($|\?)/i.test(r))?this.importVisio(v,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":
+"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(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"));l.insertBefore(p,l.firstChild);mxEvent.addListener(p,"click",G);mxEvent.addListener(k,
+"dblclick",function(a){mxEvent.getSource(a)==k&&G(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));l.insertBefore(d,l.firstChild);mxEvent.addListener(d,"click",K);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)})),l.insertBefore(d,l.firstChild))}v.appendChild(l);v.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(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};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=
760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});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.defaultGraphBackground=null,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,e,h){a=new ImageDialog(this,a,b,d,e,h);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,e,h){a=new LibraryDialog(this,a,b,d,e,h);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,e,k){a=new ImageDialog(this,a,b,d,e,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,e,k){a=new LibraryDialog(this,a,b,d,e,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.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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){var c=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 e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
-else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),a+=' <a href="https://drive.google.com/open?id='+h+'" 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,e,d,g)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,h,l,n,m,v,p,q,t){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,h,l,n,t,m,v);this.showDialog(a.container,p||340,q||150,!0,!1);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,e,h){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,h)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" 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,e,d,g)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,k,h,m,l,v,p,q,t){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,k,h,m,t,l,v);this.showDialog(a.container,p||340,q||150,!0,!1);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,e,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,k)).container,340,90,!0,!1)};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,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.doSaveLocalFile=function(a,b,d,e,h){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
+EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,k){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);
-try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,h).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,h,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=h?"&format="+h:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
-b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),n=0;n<f;++n){for(var h=1024*n,v=Math.min(h+1024,d),m=Array(v-h),p=0;h<v;++p,++h)m[p]=c[h].charCodeAt(0);e[n]=new Uint8Array(m)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,h,l,n){l=null!=l?l:!1;n=null!=n?n:"vsdx"!=h&&(!mxClient.IS_IOS||!navigator.standalone);h=this.getServiceCount(l);b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||
+try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,k,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
+b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),m=0;m<f;++m){for(var k=1024*m,v=Math.min(k+1024,d),l=Array(v-k),p=0;k<v;++p,++k)l[p]=c[k].charCodeAt(0);e[m]=new Uint8Array(l)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);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 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,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(t){this.handleError(t)}}))}catch(y){this.handleError(y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
-mxResources.get("download"),!1,l,n,null,1<h,4<h&&(!l||6>h)?3:4,a,d,e);this.showDialog(b.container,420,h==(mxClient.IS_IOS?0:1)?160:4<h?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 d=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),
+mxResources.get("download"),!1,h,m,null,1<k,4<k&&(!h||6>k)?3:4,a,d,e);this.showDialog(b.container,420,k==(mxClient.IS_IOS?0:1)?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 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"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,
-d,e,h){this.isLocalFileSave()?this.saveLocalFile(d,a,e,h,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,h,b,c)}),d,h,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,h,l,n){n=null!=n?n:!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 f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==
-App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,l,!0,c,d)}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,l,!0,c,d)}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,n,null,1<c,4<c?3:4,e,l,h);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,h,l){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,
-b,d,e,h,l,n,m,v,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 f=this.editor.graph.getSvg(c,a,n,m,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",k=mxUtils.bind(this,function(a){this.spinner.stop();h&&a.setAttribute("content",this.getFileData(!0,
+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,e,k){this.isLocalFileSave()?this.saveLocalFile(d,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,k,b,c)}),d,k,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,k,h,m){m=null!=m?m:!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 f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==
+App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,c,d)}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,c,d)}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,m,null,1<c,4<c?3:4,e,h,k);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,k,h){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,
+b,d,e,k,h,m,l,v,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 f=this.editor.graph.getSvg(c,a,m,l,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,
null,null,null,d,v));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(g,"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,f,!1,mxUtils.bind(this,function(){l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,k,this.thumbImageCache)):k(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,h,l){l=null!=l?l:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",
-"checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");l&&(a.appendChild(c),d=document.createElement("span"),mxUtils.write(d,b),a.appendChild(d),h||mxUtils.br(a),mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(a))})));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft=
+"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,k,h){h=null!=h?h:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",
+"checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),d=document.createElement("span"),mxUtils.write(d,b),a.appendChild(d),k||mxUtils.br(a),mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(a))})));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft=
"24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+
"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));
-mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){n.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}
+mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){m.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}
mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value",
-"self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",n=null,n=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();n.style.padding=mxClient.IS_FF?
-"4px 2px 4px 2px":"4px";n.style.marginLeft="4px";n.style.height="22px";n.style.width="22px";n.style.position="relative";n.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";n.className="geColorBtn";a.appendChild(n);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,h,l,n,m){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=
-b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=h&&0<h.length&&f.push("edit="+encodeURIComponent(h)),l&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&f.push("page="+a));a=!0;null!=n?d="#U"+encodeURIComponent(n):(c=this.getCurrentFile(),m||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&&f.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<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,h,l,n,m,v,p,q){this.getBasenames();var c={};""!=h&&h!=mxConstants.NONE&&(c.highlight=h);"auto"!==e&&(c.target=e);
-v||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];n&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(v&&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,!n);b='<div class="mxgraph" style="'+(l?"max-width:100%;":
+"self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();m.style.padding=mxClient.IS_FF?
+"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,k,h,m,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=
+b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&f.push("page="+a));a=!0;null!=m?d="#U"+encodeURIComponent(m):(c=this.getCurrentFile(),l||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&&f.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<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,k,h,m,l,v,p,q){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==e&&(c.target=e);
+v||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];m&&(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);l&&d.push("layers");0<d.length&&(v&&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,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(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,e){var c=document.createElement("div");
c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name",
-"type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var h=document.createElement("span");mxUtils.write(h,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(h);mxUtils.br(g);g.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("publicDiagramUrl"));g.appendChild(h);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(h=document.createElement("a"),h.style.paddingLeft="12px",h.style.color="gray",h.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(h,mxResources.get("share")),g.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),t=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
-q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var u=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(c,mxResources.get("allPages"),g,!g),A=this.addCheckbox(c,mxResources.get("layers"),!0),J=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,J),x=K.getEditInput();x.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?x.removeAttribute("disabled"):
-x.setAttribute("disabled","disabled");x.checked&&J.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,t.checked,q.value,p.getTarget(),p.getColor(),u.checked,G.checked,A.checked,J.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,h,l){var c=document.createElement("div");c.style.whiteSpace=
-"nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",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 r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));k.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";k.appendChild(r);c.appendChild(k);r=document.createElement("a");r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));
-k.appendChild(r);mxEvent.addListener(r,"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,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),
-m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var A=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,A),K=J.getEditInput(),x=this.addCheckbox(c,mxResources.get("layers"),!0);x.style.marginLeft=K.style.marginLeft;x.style.marginBottom="16px";x.style.marginTop="8px";mxEvent.addListener(A,"change",function(){A.checked?(x.removeAttribute("disabled"),K.removeAttribute("disabled")):(x.setAttribute("disabled","disabled"),K.setAttribute("disabled",
-"disabled"));K.checked&&A.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){h(q.getTarget(),q.getColor(),null==u?!0:u.checked,A.checked,J.getLink(),x.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
-document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0),f=this.editor.graph,h=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=h&&(h.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1,null!=h?h.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,h,l,n,m){n=null!=n?n:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=
-this.editor.graph,g="jpeg"==m?196:300,k=document.createElement("h3");mxUtils.write(k,a);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(k);mxUtils.write(c,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";c.appendChild(r);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 w=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=m),q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.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");l&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(q,"change",function(){q.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),x=document.createElement("input");x.style.marginTop=
-"16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||x.setAttribute("disabled","disabled");b&&(c.appendChild(x),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var C=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=m),I=null!=this.pages&&1<this.pages.length,R=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=m);R.style.marginLeft="24px";R.style.marginBottom="16px";I||(R.style.display=
-"none");mxEvent.addListener(C,"change",function(){C.checked&&I?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")});n&&I||R.setAttribute("disabled","disabled");var P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="8px";P.style.marginRight="10px";P.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");
-mxUtils.write(a,mxResources.get("openInNewWindow"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));P.appendChild(a);"svg"==m&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(P),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;h(r.value,w.checked,!q.checked,K.checked,C.checked,x.checked,p.value,u.checked,
-!R.checked,P.value)}),null,d,e);this.showDialog(d.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,h){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-c.appendChild(g)}var k=this.addCheckbox(c,mxResources.get("fit"),!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,t),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(c,mxResources.get("layers"),u,!u);A.style.marginLeft=q.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
-(u&&A.removeAttribute("disabled"),q.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&t.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(k.checked,r.checked,m.checked,t.checked,p.getLink(),A.checked)}),null,mxResources.get("embed"),h);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(a,b,d,e,h,l,n,m){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
-a&&(g+="max-width:100%;");var k="";d&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+c+'"'+k+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),
-f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var k=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));k.send(mxUtils.bind(this,function(){200<=k.getStatus()&&299>=k.getStatus()?c("data:image/png;base64,"+k.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
-b,d,e,h,l,n){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var k=f[g].getAttribute("href");null!=k&&"#"==k.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var r=" ",m="";e&&(r="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"+
-(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){n('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=m?' style="'+m+'"':"")+r+"/>")}))}else m="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),m+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),m+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=m&&c.setAttribute("style",m),n(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+
+"type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(n);mxUtils.br(g);g.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));g.appendChild(n);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),g.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),t=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
+q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var u=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(c,mxResources.get("allPages"),g,!g),B=this.addCheckbox(c,mxResources.get("layers"),!0),J=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,J),x=K.getEditInput();x.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?x.removeAttribute("disabled"):
+x.setAttribute("disabled","disabled");x.checked&&J.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,t.checked,q.value,p.getTarget(),p.getColor(),u.checked,G.checked,B.checked,J.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,h){var c=document.createElement("div");c.style.whiteSpace=
+"nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",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 r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));n.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";n.appendChild(r);c.appendChild(n);r=document.createElement("a");r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));
+n.appendChild(r);mxEvent.addListener(r,"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,l=null;if(null!=d||null!=e)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")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.width="50px",l.style.marginLeft="6px",l.style.marginBottom="10px",l.value=e+"px",c.appendChild(l),mxUtils.br(c);var p=this.addLinkSection(c,h);d=null!=this.pages&&1<this.pages.length;var q=null;
+if(null==g||g.constructor!=window.DriveFile||b)q=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var u=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,u),K=J.getEditInput(),x=this.addCheckbox(c,mxResources.get("layers"),!0);x.style.marginLeft=K.style.marginLeft;x.style.marginBottom="16px";x.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(x.removeAttribute("disabled"),K.removeAttribute("disabled")):(x.setAttribute("disabled","disabled"),K.setAttribute("disabled",
+"disabled"));K.checked&&u.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(p.getTarget(),p.getColor(),null==q?!0:q.checked,u.checked,J.getLink(),x.checked,null!=t?t.value:null,null!=l?l.value:null)}),null,mxResources.get("create"),f);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)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
+!0),f=this.editor.graph,n=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1,null!=n?n.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,k,h,m,l){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=
+this.editor.graph,g="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";c.appendChild(r);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 w=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=l),q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.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");h&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(q,"change",function(){q.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),x=document.createElement("input");x.style.marginTop=
+"16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||x.setAttribute("disabled","disabled");b&&(c.appendChild(x),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var C=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=l),I=null!=this.pages&&1<this.pages.length,R=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=l);R.style.marginLeft="24px";R.style.marginBottom="16px";I||(R.style.display=
+"none");mxEvent.addListener(C,"change",function(){C.checked&&I?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")});m&&I||R.setAttribute("disabled","disabled");var P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="8px";P.style.marginRight="10px";P.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");
+mxUtils.write(a,mxResources.get("openInNewWindow"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));P.appendChild(a);"svg"==l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(P),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;k(r.value,w.checked,!q.checked,K.checked,C.checked,x.checked,p.value,u.checked,
+!R.checked,P.value)}),null,d,e);this.showDialog(d.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+c.appendChild(g)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,t),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),B=this.addCheckbox(c,mxResources.get("layers"),u,!u);B.style.marginLeft=q.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
+(u&&B.removeAttribute("disabled"),q.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&t.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,t.checked,p.getLink(),B.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(a,b,d,e,k,h,m,l){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
+a&&(g+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),
+f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
+b,d,e,k,h,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var r=" ",l="";e&&(r="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":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=l?' style="'+l+'"':"")+r+"/>")}))}else l="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),l+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),l+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=l&&c.setAttribute("style",l),m(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,e){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(){e()}))}),0)):e()};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],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.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(l){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,e=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),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(B){null!=
-b&&b(B)}}),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,e,h,l,n){n=b.background;n==mxConstants.NONE&&(n=null);b=b.getSvg(n,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,h,l,n,m,p){p=null!=p?p:"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,h?this.getFileData(!0,null,null,null,d,m):null,p)}catch(t){"Invalid image"==t.message?this.downloadFile(p):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,n)}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,e={},l=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var k=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,k))]);f.push('"'+b[g].substring(k))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var h=1;h<b.length;h++){var m=b[h].indexOf(")"),p=null,q=b[h].indexOf("format(",m);0<q&&(p=c(b[h].substring(q+7,b[h].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==
-e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
-a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;l()}),mxUtils.bind(this,function(a){d--;l()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[h].substring(0,m)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,h,l,n,m,p,q,y,t,u,H){l=null!=l?l:!0;t=null!=t?t:this.editor.graph;u=null!=u?u:0;var c=p?null:t.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
-(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(c,null,null,H,null,null!=n?n:!0),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(m*g)+2*u;k=Math.ceil(m*k)+2*u;f.setAttribute("width",g);f.setAttribute("height",k);var n=f.getContext("2d");null!=
-c&&(n.beginPath(),n.rect(0,0,g,k),n.fillStyle=c,n.fill());n.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,u/m,u/m);a(f)},0):(n.drawImage(e,u/m,u/m),a(f))}catch(P){null!=h&&h(P)}});e.onerror=function(a){null!=h&&h(a)};try{q&&this.editor.graph.addSvgShadow(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(t,
-d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(x){null!=h&&h(x)}}),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 e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||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,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var k=a.getElementsByTagName(d),h=0;h<k.length;h++)mxUtils.bind(this,function(d){var k=e.convert(d.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var h=f[k];null==h?(c++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,d.setAttribute(g,
-e));c--;0==c&&b(a)})):d.setAttribute(g,h)}else null!=k&&d.setAttribute(g,k)})(k[h])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,h,l){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);h=null!=h?h:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}l=null!=l?l:"data:image/png;base64,";e=l+this.base64Encode(e)}b(e)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){h&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=
+this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,e=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),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
+f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(A){null!=
+b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,k,h,m,l,p){p=null!=p?p:"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,l):null,p)}catch(t){"Invalid image"==t.message?this.downloadFile(p):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,h,m)}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,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var h=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var m=1;m<b.length;m++){var k=b[m].indexOf(")"),l=null,p=b[m].indexOf("format(",k);0<p&&(l=c(b[m].substring(p+7,b[m].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==
+e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.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){e[a]=c;d--;h()}),mxUtils.bind(this,function(a){d--;h()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[m].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,h,m,l,p,q,y,t,u,H){h=null!=h?h:!0;t=null!=t?t:this.editor.graph;u=null!=u?u:0;var c=p?null:t.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
+(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(c,null,null,H,null,null!=m?m:!0),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*u;m=Math.ceil(l*m)+2*u;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");null!=
+c&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=c,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,u/l,u/l);a(f)},0):(n.drawImage(e,u/l,u/l),a(f))}catch(P){null!=k&&k(P)}});e.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(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(t,
+d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(x){null!=k&&k(x)}}),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 e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||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,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d),k=0;k<h.length;k++)mxUtils.bind(this,function(d){var h=e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var k=f[h];null==k?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,
+e));c--;0==c&&b(a)})):d.setAttribute(g,k)}else null!=h&&d.setAttribute(g,h)})(h[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,h){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}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:f})})});f()}catch(v){null!=d&&d(v)}};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"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(n){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
-function(a,b,d,e,h){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(a=0;a<m.length;a++){m[a].removeAttribute("id");var r=this.updatePageRoot(new DiagramPage(m[a])),
-p=this.pages.length;null==r.getName()&&r.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,r,r,p))}}finally{f.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(c=f.importGraphModel(k,b,d,e))}}catch(z){throw h||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}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,e){e=null!=
-e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,e);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=e,this.doImportVisio(f.response,b,d)}catch(w){d(w)}else d({})});
-f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||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(f){this.handleError(f)}});"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(r){d(r)}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,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,e,h,l,n){l=null!=l?l:!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){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()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,
-19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,l,!0),0<g.length)return g}catch(y){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,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/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),
-null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,l))}),mxUtils.bind(this,function(a){this.handleError(a)}));
-else{c=this.editor.graph;h=null;c.getModel().beginUpdate();try{h=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[h])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),h.value=a,c.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)&&
-c.setLinkForCell(h,h.value),h.geometry.width+=c.gridSize,h.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[h]}}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){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"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(m){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
+function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var l=n.getElementsByTagName("diagram");if(1==l.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){l[a].removeAttribute("id");var r=this.updatePageRoot(new DiagramPage(l[a])),
+t=this.pages.length;null==r.getName()&&(r.setName(mxResources.get("pageWithNumber",[t+1])),r.needsUpdate=!0);f.model.execute(new ChangePage(this,r,r,t))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}}catch(z){throw k||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}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,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,e);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=e,this.doImportVisio(f.response,b,
+d)}catch(w){d(w)}else d({})});f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||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(f){this.handleError(f)}});"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(r){d(r)}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,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(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 f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,
+d,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,h,!0),0<g.length)return g}catch(y){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,
+null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,h);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,h))}),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;"+(e?"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 e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,h,l,n,m,p,q,u){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,n)):c=this.importXml(a,d,e,q);null!=m&&m(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&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,h,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,q);null!=m&&m(a)})):null!=p&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(c=!0,this.importVisio(p,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,n)?(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?g(a.responseText):null!=m&&m(null))}),n)):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,n;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);
-c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}n=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(n&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,h,l,n,m,p,q,u,t){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var k=u||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,
-6)&&a[r].size>k){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,k=g.gridSize;h=null!=h?h:mxUtils.bind(this,function(a,b,d,e,f,g,k,h,l){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,e,f,g,k,h,l,c,t)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,r=p,v=[],w=mxUtils.bind(this,function(a,
-c){v[a]=c;if(0==--r){this.spinner.stop();if(null!=m)m(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}l(b)}}),y=0;y<p;y++)mxUtils.bind(this,function(c){var l=a[c],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==n||n(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,p=m.indexOf(","),r=decodeURIComponent(escape(atob(m.substring(p+1)))),
-v=mxUtils.parseXml(r),r=v.getElementsByTagName("svg");if(0<r.length){var r=r[0],x=t?null:r.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(m.substring(0,p+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],n=parseFloat(f.getAttribute("width")),
-r=parseFloat(f.getAttribute("height")),t=f.getAttribute("viewBox");if(null==t||0==t.length)f.setAttribute("viewBox","0 0 "+n+" "+r);else if(isNaN(n)||isNaN(r)){var q=t.split(" ");3<q.length&&(n=parseFloat(q[2]),r=parseFloat(q[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,r)),w=h(m,l.type,b+c*k,d+c*k,Math.max(1,Math.round(n*x)),Math.max(1,Math.round(r*x)),l.name);if(isNaN(n)||isNaN(r)){var u=new Image;u.onload=mxUtils.bind(this,function(){n=
-Math.max(1,u.width);r=Math.max(1,u.height);w[0].geometry.width=n;w[0].geometry.height=r;f.setAttribute("viewBox","0 0 "+n+" "+r);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[w[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(fa){}return null})):w(c,mxUtils.bind(this,function(){return h(x,"text/xml",b+c*k,d+c*k,0,0,l.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{r=
-!1;if("image/png"==l.type){var I=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=I&&0<I.length){var y=new Image;y.src=a.target.result;w(c,mxUtils.bind(this,function(){return h(I,"text/xml",b+c*k,d+c*k,y.width,y.height,l.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
-this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,m){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var p=f&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(e/n,e/m)):1;return h(g,l.type,b+c*k,d+c*k,Math.round(n*p),Math.round(m*p),l.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result,
-l.type,b+c*k,d+c*k,240,160,l.name,function(a){w(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?h(null,l.type,b+c*k,d+c*k,240,160,l.name,function(a){w(c,function(){return a})},l):"image"==l.type.substring(0,5)?m.readAsDataURL(l):m.readAsText(l)})(y)});g?this.confirmImageResize(function(a){f=a;v()},p):v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
+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 e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,k,h,m,l,p,q,u){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,q);null!=l&&l(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&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,q);null!=l&&l(a)})):null!=p&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(p,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(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?g(a.responseText):null!=l&&l(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==l||l(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,k;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);
+c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,k,h,m,l,p,q,u,t){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=u||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,
+6)&&a[r].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,h,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,d,e,f,g,h,k,m,c,t)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,r=p,v=[],w=mxUtils.bind(this,function(a,
+c){v[a]=c;if(0==--r){this.spinner.stop();if(null!=l)l(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}h(b)}}),y=0;y<p;y++)mxUtils.bind(this,function(c){var h=a[c],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,p=l.indexOf(","),r=decodeURIComponent(escape(atob(l.substring(p+1)))),
+v=mxUtils.parseXml(r),r=v.getElementsByTagName("svg");if(0<r.length){var r=r[0],x=t?null:r.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(l.substring(0,p+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),
+t=parseFloat(f.getAttribute("height")),r=f.getAttribute("viewBox");if(null==r||0==r.length)f.setAttribute("viewBox","0 0 "+m+" "+t);else if(isNaN(m)||isNaN(t)){var q=r.split(" ");3<q.length&&(m=parseFloat(q[2]),t=parseFloat(q[3]))}l=this.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,t)),w=k(l,h.type,b+c*n,d+c*n,Math.max(1,Math.round(m*x)),Math.max(1,Math.round(t*x)),h.name);if(isNaN(m)||isNaN(t)){var u=new Image;u.onload=mxUtils.bind(this,function(){m=
+Math.max(1,u.width);t=Math.max(1,u.height);w[0].geometry.width=m;w[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+m+" "+t);l=this.createSvgDataUri(mxUtils.getXml(f));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[w[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(fa){}return null})):w(c,mxUtils.bind(this,function(){return k(x,"text/xml",b+c*n,d+c*n,0,0,h.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{r=
+!1;if("image/png"==h.type){var I=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=I&&0<I.length){var y=new Image;y.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(I,"text/xml",b+c*n,d+c*n,y.width,y.height,h.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
+this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,l){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var t=f&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+c*n,d+c*n,Math.round(m*t),Math.round(l*t),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,
+h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?k(null,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,function(){return a})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(y)});g?this.confirmImageResize(function(a){f=a;v()},p):v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(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):e(!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 e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.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,e,h,l){h=null!=h?h:this.maxImageSize;var c=Math.max(1,a.width),
-f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/h,f/h);if(1<g){var k=Math.round(c/g),m=Math.round(f/g),p=document.createElement("canvas");p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var r=p.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=k;q.height=m;var u=q.toDataURL();r!==u&&(b=r,c=k,f=m)}}}catch(A){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var b=e,h=0;8>h;h++)b=1==(b&1)?3988292384^b>>>1:b>>>
-1,EditorUi.prototype.crcTable[e]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;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 c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,h){function c(a,c){var b=k;k+=c;return a.substring(b,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(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(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);h=a.substring(0,k);do{var m=f(a);if("IDAT"==c(a,4)){h=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):
-"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);h+=g(d.length)+b+d+g(e^4294967295);h+=a.substring(k-8,a.length);break}h+=a.substring(k-8,k-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,b,e){a=d.substring(a+
+340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!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 e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.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,e,k,h){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),
+f=Math.max(1,a.height);if(e&&this.isResampleImage(b,h))try{var g=Math.max(c/k,f/k);if(1<g){var n=Math.round(c/g),l=Math.round(f/g),t=document.createElement("canvas");t.width=n;t.height=l;t.getContext("2d").drawImage(a,0,0,n,l);var p=t.toDataURL();if(p.length<b.length){var r=document.createElement("canvas");r.width=n;r.height=l;var q=r.toDataURL();p!==q&&(b=p,c=n,f=l)}}}catch(B){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>
+1,EditorUi.prototype.crcTable[e]=d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;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 c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,c){var b=n;n+=c;return a.substring(b,n)}function f(a){a=c(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(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 n=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,n);do{var l=f(a);if("IDAT"==c(a,4)){k=a.substring(0,n-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):
+"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);k+=g(d.length)+b+d+g(e^4294967295);k+=a.substring(n-8,a.length);break}k+=a.substring(n-8,n-4+l);c(a,l);c(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,b,e){a=d.substring(a+
8,a+8+e);"zTXt"==b?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(r){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};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 m=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(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(x){a.handleError(x)}return b};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 e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");
-return e.apply(this,arguments)};var h=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=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!=e&&e(a,c)};h.call(this,a,c,d)};m.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 l=b.getGlobalVariable;b.getGlobalVariable=function(c){return"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:l.apply(this,arguments)};var n=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||
-!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))n.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||
+new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var l=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(x){a.handleError(x)}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 e=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 e.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=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!=e&&e(a,c)};k.call(this,a,c,d)};l.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 h=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:h.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||
+!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),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 q=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_IE||
-b.container.addEventListener("paste",mxUtils.bind(this,function(a){var c=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var b=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<b.types.length;e++)if("text/"===b.types[e].substring(0,5)){d=!0;break}if(!d){var f=b.items;for(index in f){var g=f[index];if("file"===g.kind){if(c.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,b,d,e,f,g){c.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.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);
+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,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.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);
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),q())}));mxEvent.addListener(u,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u,!0),q())}));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 t=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==u?!0:t.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 c=this.editor.graph,b=c.cellEditor.text2,d=null;null!=b&&(mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
-mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,b,d,e,f,g){c.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=
-0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));c.insertImage(decodeURIComponent(b),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
+function(a){return mxEvent.getSource(a)==u?!0:t.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,e,f,g){b.insertImage(a,f,g)},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 e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):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){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 z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var H=document.createElement("div");H.style.position="absolute";H.style.top="95px";H.style.left="220px";H.style.width="30px";H.style.height="30px";H.style.background="whiteSmoke";document.body.appendChild(H);this.vRuler=new mxRuler(this.editor.graph,
z,!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,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;
-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 A=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
-A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=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!=A&&(A.parentNode.removeChild(A),A=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=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,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var l=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,m=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,n))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;m()},mxEvent.isControlDown(a)):m()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),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 G=this.isSelectionAllowed;
+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,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=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,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");
+null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,l=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;l()},mxEvent.isControlDown(a)):l()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),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,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=
function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();
@@ -3011,19 +3016,19 @@ this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]
function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);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())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,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,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var h=e.lastIndexOf("%3E");0<=h&&h<e.length-3&&(e=e.substring(0,h+3))}catch(v){}try{var c=b.getElementsByTagName("span"),
-m=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(m)&&(f=!0,e=m)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),
+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,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var c=b.getElementsByTagName("span"),
+l=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(f=!0,e=l)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,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 c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&
!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=b,d=d.getElementsByTagName("img"),
0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-
-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=c+"px";h.style.left=b+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=
+(null==this.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)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-
+3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=
+function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,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){var d=
c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".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,e))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,
-c.target.result,a.name))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});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(),
+c.target.result,a.name))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});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(),
e=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))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,e,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,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}))))};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,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),
@@ -3034,38 +3039,38 @@ this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&wind
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,e=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(f){if(f.source==(window.opener||window.parent)){var g=f.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(R){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(I){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
-h=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==g.action){var k=h(g.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",
-result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
-try{h.init()}catch(I){n.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();h=1==g.enableRecent;k=1==g.enableSearch;h=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,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;n.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,k?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(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==
-g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("textContent"==g.action){this.editor.graph.setEnabled(!1);var l=this.editor.graph,h="";if(null!=this.pages)for(k=0;k<this.pages.length;k++){var m=l;this.currentPage!=this.pages[k]&&(m=this.createTemporaryGraph(l.getStylesheet()),m.model.setRoot(this.pages[k].root));h+=this.pages[k].getName()+" "+m.getIndexableText()+" "}else h=l.getIndexableText();this.editor.graph.setEnabled(!0);
-n.postMessage(JSON.stringify({event:"textContent",data:h,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==
-g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);n.postMessage(JSON.stringify(b),"*")}),u=
+h=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==g.action){var m=h(g.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
+try{h.init()}catch(I){k.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();h=1==g.enableRecent;m=1==g.enableSearch;h=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,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"==
+g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("textContent"==g.action){this.editor.graph.setEnabled(!1);var l=this.editor.graph,h="";if(null!=this.pages)for(m=0;m<this.pages.length;m++){var n=l;this.currentPage!=this.pages[m]&&(n=this.createTemporaryGraph(l.getStylesheet()),n.model.setRoot(this.pages[m].root));h+=this.pages[m].getName()+" "+n.getIndexableText()+" "}else h=l.getIndexableText();this.editor.graph.setEnabled(!0);
+k.postMessage(JSON.stringify({event:"textContent",data:h,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==
+g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),u=
mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var l=this.createTemporaryGraph(l.getStylesheet()),w=l.getGlobalVariable,x=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?x.getName():"pagenumber"==a?1:w.apply(this,
arguments)};document.body.appendChild(l.container);l.model.setRoot(x.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,l)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).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!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);p=this.createLoadMessage("export");if("html2"==g.format||"html"==g.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=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=g.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(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.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(h),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}h="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));p.data=this.createSvgDataUri(h)}n.postMessage(JSON.stringify(p),"*")}return}if("load"==g.action)d=1==g.autosave,
-this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,g.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(k),this.embedFilenameSpan=k),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var C=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=
+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"==g.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"==g.action)d=1==g.autosave,
+this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.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),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var C=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(X){this.handleError(X)}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())});e=h();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=h();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,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!=g&&"function"===typeof g.substring&&
+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!=g&&"function"===typeof g.substring&&
"data:application/vnd.visio;base64,"==g.substring(0,34)?(h="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){C(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),h)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
-299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&C(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){C(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=h(g),C(g,f))}}));var n=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&C(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){C(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=h(g),C(g,f))}}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="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 e={},f=null,h=null,m=null,p=null,q="",u="auto",t="auto",z=null,H=null,G=40,A=40,J=100,K=0,x=this.editor.graph;x.getGraphBounds();for(var C=
+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 e={},f=null,k=null,l=null,p=null,q="",u="auto",t="auto",z=null,H=null,G=40,B=40,J=100,K=0,x=this.editor.graph;x.getGraphBounds();for(var C=
function(){null!=b?b(aa):(x.setSelectionCells(aa),x.scrollCellToVisible(x.getSelectionCell()))},I=x.getFreeInsertPoint(),R=I.x,P=I.y,I=P,X=null,U="auto",p=null,F=[],ea=null,ka=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 L=mxUtils.trim(a.substring(1,ba)),E=mxUtils.trim(a.substring(ba+1));"label"==L?X=x.sanitizeHtml(E):
-"style"==L?f=E:"parentstyle"==L?h=E:"identity"==L&&0<E.length&&"-"!=E?m=E:"parent"==L&&0<E.length&&"-"!=E?p=E:"namespace"==L&&0<E.length&&"-"!=E?q=E:"width"==L?u=E:"height"==L?t=E:"left"==L&&0<E.length?z=E:"top"==L&&0<E.length?H=E:"ignore"==L?ka=E.split(","):"connect"==L?F.push(JSON.parse(E)):"link"==L?ea=E:"padding"==L?K=parseFloat(E):"edgespacing"==L?G=parseFloat(E):"nodespacing"==L?A=parseFloat(E):"levelspacing"==L?J=parseFloat(E):"layout"==L&&(U=E)}}}var S=this.editor.csvToArray(c[Y]),L=ba=null;
-if(null!=m||null!=p)for(var M=0;M<S.length;M++)m==S[M]&&(ba=M),p==S[M]&&(L=M);null==X&&(X="%"+S[0]+"%");if(null!=F)for(var N=0;N<F.length;N++)null==e[F[N].to]&&(e[F[N].to]={});x.model.beginUpdate();try{for(M=Y+1;M<c.length;M++){var T=this.editor.csvToArray(c[M]);if(T.length==S.length){var D=null,Q=null!=ba?q+T[ba]:null;null!=Q&&(D=x.model.getCell(Q));null==D&&(D=new mxCell(X,new mxGeometry(R,I,0,0),f||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=Q);for(var V=0;V<T.length;V++)x.setAttributeForCell(D,
+"style"==L?f=E:"parentstyle"==L?k=E:"identity"==L&&0<E.length&&"-"!=E?l=E:"parent"==L&&0<E.length&&"-"!=E?p=E:"namespace"==L&&0<E.length&&"-"!=E?q=E:"width"==L?u=E:"height"==L?t=E:"left"==L&&0<E.length?z=E:"top"==L&&0<E.length?H=E:"ignore"==L?ka=E.split(","):"connect"==L?F.push(JSON.parse(E)):"link"==L?ea=E:"padding"==L?K=parseFloat(E):"edgespacing"==L?G=parseFloat(E):"nodespacing"==L?B=parseFloat(E):"levelspacing"==L?J=parseFloat(E):"layout"==L&&(U=E)}}}var S=this.editor.csvToArray(c[Y]),L=ba=null;
+if(null!=l||null!=p)for(var M=0;M<S.length;M++)l==S[M]&&(ba=M),p==S[M]&&(L=M);null==X&&(X="%"+S[0]+"%");if(null!=F)for(var N=0;N<F.length;N++)null==e[F[N].to]&&(e[F[N].to]={});x.model.beginUpdate();try{for(M=Y+1;M<c.length;M++){var T=this.editor.csvToArray(c[M]);if(T.length==S.length){var D=null,Q=null!=ba?q+T[ba]:null;null!=Q&&(D=x.model.getCell(Q));null==D&&(D=new mxCell(X,new mxGeometry(R,I,0,0),f||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=Q);for(var V=0;V<T.length;V++)x.setAttributeForCell(D,
S[V],T[V]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D,D.style);for(N=0;N<F.length;N++)e[F[N].to][D.getAttribute(F[N].to)]=D;null!=ea&&"link"!=ea&&(x.setLinkForCell(D,D.getAttribute(ea)),x.setAttributeForCell(D,ea,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var ga=this.editor.graph.getPreferredSizeForCell(D);D.vertex&&(null!=z&&null!=D.getAttribute(z)&&(D.geometry.x=R+parseFloat(D.getAttribute(z))),null!=H&&null!=D.getAttribute(H)&&(D.geometry.y=
-P+parseFloat(D.getAttribute(H))),"@"==u.charAt(0)&&null!=D.getAttribute(u.substring(1))?D.geometry.width=parseFloat(D.getAttribute(u.substring(1))):D.geometry.width="auto"==u?ga.width+K:parseFloat(u),"@"==t.charAt(0)&&null!=D.getAttribute(t.substring(1))?D.geometry.height=parseFloat(D.getAttribute(t.substring(1))):D.geometry.height="auto"==t?ga.height+K:parseFloat(t),I+=D.geometry.height+A);p=null!=L?x.model.getCell(q+T[L]):null;null!=p?(p.style=x.replacePlaceholders(p,h),x.addCell(D,p)):d.push(x.addCell(D))}}for(var W=
+P+parseFloat(D.getAttribute(H))),"@"==u.charAt(0)&&null!=D.getAttribute(u.substring(1))?D.geometry.width=parseFloat(D.getAttribute(u.substring(1))):D.geometry.width="auto"==u?ga.width+K:parseFloat(u),"@"==t.charAt(0)&&null!=D.getAttribute(t.substring(1))?D.geometry.height=parseFloat(D.getAttribute(t.substring(1))):D.geometry.height="auto"==t?ga.height+K:parseFloat(t),I+=D.geometry.height+B);p=null!=L?x.model.getCell(q+T[L]):null;null!=p?(p.style=x.replacePlaceholders(p,k),x.addCell(D,p)):d.push(x.addCell(D))}}for(var W=
d.slice(),aa=d.slice(),N=0;N<F.length;N++)for(var Z=F[N],M=0;M<d.length;M++){var D=d[M],pa=D.getAttribute(Z.from);if(null!=pa){x.setAttributeForCell(D,Z.from,null);for(var ra=pa.split(","),V=0;V<ra.length;V++){var fa=e[Z.to][ra[V]];null!=fa&&(X=Z.label,null!=Z.fromlabel&&(X=(D.getAttribute(Z.fromlabel)||"")+(X||"")),null!=Z.tolabel&&(X=(X||"")+(fa.getAttribute(Z.tolabel)||"")),aa.push(x.insertEdge(null,null,X||"",Z.invert?fa:D,Z.invert?D:fa,Z.style||x.createCurrentEdgeStyle())),mxUtils.remove(Z.invert?
D:fa,W))}}}if(null!=ka)for(M=0;M<d.length;M++)for(D=d[M],V=0;V<ka.length;V++)x.setAttributeForCell(D,mxUtils.trim(ka[V]),null);var ma=new mxParallelEdgeLayout(x);ma.spacing=G;var ta=function(){ma.execute(x.getDefaultParent());for(var a=0;a<d.length;a++){var b=x.getCellGeometry(d[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==u&&(b.width=Math.round(x.snap(b.width)));"auto"==t&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==U){var la=new mxCircleLayout(x);la.resetEdges=
-!1;var sa=la.isVertexIgnored;la.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){la.execute(x.getDefaultParent());ta()},!0,C);C=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&aa.length==2*d.length-1&&1==W.length){x.view.validate();var ha=new mxCompactTreeLayout(x,"horizontaltree"==U);ha.levelDistance=A;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(x.getDefaultParent(),0<W.length?W[0]:null)},
-!0,C);C=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==W.length){x.view.validate();var ca=new mxHierarchicalLayout(x,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=A;ca.parallelEdgeSpacing=G;ca.interRankCellSpacing=J;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(x.getDefaultParent(),aa);x.moveCells(aa,R,P)},!0,C);C=null}else if("organic"==U||"auto"==U&&aa.length>d.length){x.view.validate();var da=new mxFastOrganicLayout(x);
-da.forceConstant=3*A;da.resetEdges=!1;var ia=da.isVertexIgnored;da.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ma=new mxParallelEdgeLayout(x);ma.spacing=G;this.executeLayout(function(){da.execute(x.getDefaultParent());ta()},!0,C);C=null}this.hideDialog()}finally{x.model.endUpdate()}null!=C&&C()}}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=
+!1;var sa=la.isVertexIgnored;la.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){la.execute(x.getDefaultParent());ta()},!0,C);C=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&aa.length==2*d.length-1&&1==W.length){x.view.validate();var ha=new mxCompactTreeLayout(x,"horizontaltree"==U);ha.levelDistance=B;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(x.getDefaultParent(),0<W.length?W[0]:null)},
+!0,C);C=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==W.length){x.view.validate();var ca=new mxHierarchicalLayout(x,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=B;ca.parallelEdgeSpacing=G;ca.interRankCellSpacing=J;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(x.getDefaultParent(),aa);x.moveCells(aa,R,P)},!0,C);C=null}else if("organic"==U||"auto"==U&&aa.length>d.length){x.view.validate();var da=new mxFastOrganicLayout(x);
+da.forceConstant=3*B;da.resetEdges=!1;var ia=da.isVertexIgnored;da.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ma=new mxParallelEdgeLayout(x);ma.spacing=G;this.executeLayout(function(){da.execute(x.getDefaultParent());ta()},!0,C);C=null}this.hideDialog()}finally{x.model.endUpdate()}null!=C&&C()}}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 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 e=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*
@@ -3076,122 +3081,122 @@ c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null=
var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));
if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==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 e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+
-'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.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(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();
+"";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 e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+
+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.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!=k&&(this.offlineStatus.innerHTML=
+b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"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 q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);
this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=
d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){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,e,h,l){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,h,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),k=Math.floor(g.width*h/c.view.scale),m=Math.floor(g.height*
-h/c.view.scale);f.length<=MAX_REQUEST_SIZE&&k*m<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!=e?e:"none")+"&w="+k+"&h="+m+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&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,d,e){this.ui=a;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,d,e){this.ui=a;this.oldIndex=d;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(a,d){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,d=this.ui.editor,e=d.graph,b=d.graph.compress(e.zapGremlins(mxUtils.getXml(d.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);
-e.setViewState(a.viewState);d.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,d,e,b){SelectPage.call(this,a,e);this.relatedPage=d;this.index=b;this.previousIndex=null}mxUtils.extend(ChangePage,SelectPage);
+null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,h){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),p=Math.floor(g.height*
+k/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<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!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);
+e.setViewState(a.viewState);b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(a,b,e,d){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
-EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var d=0;d<this.pages.length;d++)if(this.pages[d]==this.currentPage){a=d;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var d=0;d<this.pages.length;d++)if(this.pages[d].getId()==a)return this.pages[d];return null};
-EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,d=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(a.view,arguments)});var e=null,b=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
+EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){a=b;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
+EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;this.tabContainer.style.height=
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&
-this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,d){for(var e=d.getProperty("edit").changes,h=0;h<e.length;h++)if(e[h]instanceof SelectPage||e[h]instanceof RenamePage||e[h]instanceof MovePage||e[h]instanceof mxRootChange){b();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),h=parseFloat(a.getAttribute("pageHeight")),m=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!=d?"0"!=d:this.defaultPageVisible,background:null!=m&&0<m.length?m:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(b)||isNaN(h)?this.pageFormat:new mxRectangle(0,0,b,b),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,d){d.setAttribute("grid",null==a||a.gridEnabled?"1":"0");d.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize);d.setAttribute("guides",null==a||a.guidesEnabled?"1":"0");d.setAttribute("tooltips",null==a||a.tooltips?"1":"0");d.setAttribute("connect",null==a||a.connect?"1":"0");d.setAttribute("arrows",null==a||a.arrows?"1":"0");d.setAttribute("fold",null==a||a.foldingEnabled?"1":"0");d.setAttribute("page",null==a&&this.defaultPageVisible||
-null!=a&&a.pageVisible?"1":"0");d.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var e=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=e&&(d.setAttribute("pageWidth",e.width),d.setAttribute("pageHeight",e.height));d.setAttribute("background",null!=a&&null!=a.background?a.background:this.defaultGraphBackground);null!=a&&null!=a.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));d.setAttribute("math",null!=a&&a.mathEnabled?
-"1":"0");d.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0")};
+this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),l=a.getAttribute("background"),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!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,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){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("fold",null==a||a.foldingEnabled?"1":"0");b.setAttribute("page",null==a&&this.defaultPageVisible||
+null!=a&&a.pageVisible?"1":"0");b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var e=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",
+null!=a&&a.shadowVisible?"1":"0")};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
a.pageFormat,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.view.scale=null!=a.scale?a.scale:1,null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):
(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.background=this.defaultGraphBackground,this.backgroundImage=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 d=this.editor.extractGraphModel(a.node);if(null!=d){a.graphModelNode=d;a.viewState=this.editor.graph.createViewState(d);var e=new mxCodec(d.ownerDocument);a.root=e.decode(d).root}else a.root=this.editor.graph.model.createRoot()}return a};
-EditorUi.prototype.selectPage=function(a,d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();e.add(b);e.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))};
-EditorUi.prototype.selectNextPage=function(a){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),a?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,d){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();d=null!=d?d:this.pages.length;var e=new ChangePage(this,a,a,d);this.editor.graph.model.execute(e)}return a};
-EditorUi.prototype.createPage=function(a){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(a[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=a[e]);return e};
-EditorUi.prototype.removePage=function(a){var d=this.editor.graph;if(d.isEnabled()){d.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;e=this.pages[b]}else e=this.insertPage(),d.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));d.model.execute(new ChangePage(this,a,e))}finally{d.model.endUpdate()}}return a};
-EditorUi.prototype.duplicatePage=function(a,d){var e=this.editor.graph,b=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=e.cloneCells([e.model.root])[0],b.viewState=e.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollTop=null,b.viewState.currentRoot=null,b.viewState.defaultParent=null,b.setName(d),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
-EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};EditorUi.prototype.movePage=function(a,d){this.editor.graph.model.execute(new MovePage(this,a,d))};
+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 b=this.editor.extractGraphModel(a.node);if(null!=b){a.graphModelNode=b;a.viewState=this.editor.graph.createViewState(b);var e=new mxCodec(b.ownerDocument);a.root=e.decode(b).root}else a.root=this.editor.graph.model.createRoot()}return a};
+EditorUi.prototype.selectPage=function(a,b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var d=new SelectPage(this,a);d.execute();e.add(d);e.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))};
+EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};
+EditorUi.prototype.createPage=function(a){var b=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));b.setName(null!=a?a:this.createPageName());return b};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e};
+EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled()){b.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var d=mxUtils.indexOf(this.pages,a);d==this.pages.length-1?d--:d++;e=this.pages[d]}else e=this.insertPage(),b.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));b.model.execute(new ChangePage(this,a,e))}finally{b.model.endUpdate()}}return a};
+EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,d=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),d=a.node.cloneNode(!1),d.removeAttribute("id"),d=new DiagramPage(d),d.root=e.cloneCells([e.model.root])[0],d.viewState=e.getViewState(),d.viewState.scale=1,d.viewState.scrollLeft=null,d.viewState.scrollTop=null,d.viewState.currentRoot=null,d.viewState.defaultParent=null,d.setName(b),d=this.insertPage(d,mxUtils.indexOf(this.pages,a)+1));return d};
+EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.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,d=document.createElement("div");d.style.position="relative";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="12px";d.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),h=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(b,e){this.pages[b]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),h=b):mxEvent.consume(c)}));mxEvent.addListener(e,
-"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=h&&b!=h&&this.movePage(h,b);a.stopPropagation();a.preventDefault()}));d.appendChild(e)})(m,this.createTabForPage(this.pages[m],b,this.pages[m]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d);
-b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(d.clientWidth>this.tabContainer.clientWidth-e){null!=b&&(b.style.position="absolute",b.style.right="0px",d.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 q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<d.scrollLeft?100:50);mxUtils.setOpacity(q,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
-0<d.scrollLeft?100:50);mxUtils.setOpacity(q,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<d.scrollLeft?100:50);mxUtils.setOpacity(q,d.scrollLeft<d.scrollWidth-d.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 d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="8px 4px 8px 4px";d.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";d.style.borderBottomStyle="solid";d.style.backgroundColor=this.tabContainer.style.backgroundColor;
-d.style.cursor="move";d.style.color="gray";a&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(d.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return d};
-EditorUi.prototype.createControlTab=function(a,d){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
-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 d=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,
+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 e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#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)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=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-e){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 q=this.createControlTab(4,
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);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(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,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 e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
+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 d=0;d<this.pages.length;d++)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)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),h=mxEvent.getClientY(a);d.popup(b,h,null,a);this.setCurrentMenu(d);
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b);
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,d,e){e=this.createTab(e);var b=a.getName();e.setAttribute("title",b);mxUtils.write(e,b);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(a,e);42<d&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var e=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,h=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;h=a==this.currentPage;e.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&h||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!b){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 q=mxEvent.getClientX(m),u=mxEvent.getClientY(m);p.popup(q,u,null,m);this.setCurrentMenu(p,d)}mxEvent.consume(m)}}))};
-EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(e,b){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);e.addSeparator(b);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){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,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){a=b.previous;b.previous=b.name;b.name=a;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),d="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,h){h.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(h.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&h.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(d,
-a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,h));return h};a.beforeDecode=function(a,b,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(b.getAttribute("relatedPage"));if(null==d.relatedPage){var e=b.ownerDocument.createElement("diagram");e.setAttribute("id",b.getAttribute("relatedPage"));e.setAttribute("name",b.getAttribute("name"));d.relatedPage=new DiagramPage(e);e=b.getAttribute("viewState");null!=e&&(d.relatedPage.viewState=JSON.parse(e),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);e=b.firstChild;if(null!=e)for(d.relatedPage.root=a.decodeCell(e,!1),d=e.nextSibling,e.parentNode.removeChild(e),e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var h=e.getAttribute("id");null==a.lookup(h)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};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 d=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,e,q,u){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var h=this.view.getState(e[g]),m=null!=h?h.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(e[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=d.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return n.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),l.view.getState(a),b="tree"==(null!=
-b?b.style:l.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function q(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.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;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(c[0],!0),!0);var f=q(a),g=d.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=l.view.getState(a),k=l.view.scale;if(null!=h){var n=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=l.getOutgoingEdges(l.model.getTerminal(c[0],!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,t=g=c=0;t<m.length;t++){var r=l.model.getTerminal(m[t],!1);if(f==q(r)){var x=l.view.getState(r);r!=a&&null!=x&&(p&&b!=x.getCenterX()<h.getCenterX()||!p&&b!=x.getCenterY()<h.getCenterY())&&mxUtils.intersects(n,x)&&(c=10+Math.max(c,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/k),g=10+Math.max(g,(Math.min(n.y+n.height,x.y+x.height)-Math.max(n.y,x.y))/k))}}p?g=0:c=0;for(t=0;t<m.length;t++)if(r=l.model.getTerminal(m[t],!1),f==q(r)&&(x=l.view.getState(r),r!=a&&null!=
-x&&(p&&b!=x.getCenterX()<h.getCenterX()||!p&&b!=x.getCenterY()<h.getCenterY()))){var u=[];l.traverse(x.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});l.moveCells(u,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function c(a){l.model.beginUpdate();try{var b=q(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=
-e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);l.moveCells(g,h,k);return l.addCells(d,e)}finally{l.model.endUpdate()}}function f(a){l.model.beginUpdate();try{var b=l.model.getParent(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],
-a]);l.model.setTerminal(c[0],a,!0);var d=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var h=l.model.getTerminal(d[g],!1);null!=h&&f.push(h)}var k=l.view.getBounds(f),n=q(a),m=l.view.translate,p=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(k.x+k.width)/p-m.x-e.x+10,c[1].geometry.y+=a.geometry.height-e.y+40):n==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=
-null==k?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(k.x+k.width)/p-m.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height-e.y+40):(c[1].geometry.x=n==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width-e.x+40):c[1].geometry.x+(a.geometry.width-e.x+40),c[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(k.y+k.height)/p-m.y+-e.y+10);return l.addCells(c,b)}finally{l.model.endUpdate()}}function g(a,b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function k(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():
-c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(l.model.getTerminal(c[0],!0),d,a),c=l.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&&l.setSelectionCell(d[c].cell)))))}var r=this,l=r.editor.graph,n=l.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
-mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){w.apply(this,arguments);if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(l.getSelectionCell())&&(a.addSeparator(),0<l.getIncomingEdges(c).length&&
-this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&
-(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=
-l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+D");var v=l.removeCells;l.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 e=[],f=0;f<a.length;f++){var g=a[f];n.isEdge(g)&&d(g)&&(e.push(g),g=n.getTerminal(g,!1));b(g)?(l.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=l.getIncomingEdges(a[f]),
-a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var B=l.duplicateCells;l.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=B.call(this,a,c);if(h.length==
-a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=l.getIncomingEdges(h[e]),g=l.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var n=this.cloneCells([g[0]])[0];this.addEdge(n,l.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var y=l.moveCells;l.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var n=f,m=this.view.getState(f),p=null!=m?m.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding",
-"0")){for(var q=0;q<a.length;q++)if(b(a[q])||l.model.isEdge(a[q])&&null==l.model.getTerminal(a[q],!0)){f=l.model.getParent(a[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var t=l.getIncomingEdges(a[0]);if(0<t.length){var r=l.view.getState(l.model.getTerminal(t[0],!0));if(null!=r){var u=l.view.getState(n);null!=u&&(c=(u.getCenterX()-r.getCenterX())/l.view.scale,d=(u.getCenterY()-r.getCenterY())/l.view.scale)}}}}k=y.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(q=0;q<
-k.length;q++)if(this.model.isEdge(k[q]))b(n)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[q],!0))&&this.model.setTerminal(k[q],n,!0);else if(b(a[q])&&(t=l.getIncomingEdges(a[q]),0<t.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==l.getIncomingEdges(k[q]).length){m=n;if(null==m||m==l.model.getParent(a[q]))m=l.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,l.getDefaultParent(),m,k[q])}}finally{this.model.endUpdate()}return k};
-if(null!=r.sidebar){var t=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=t.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=l.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),
-83:r.actions.get("selectSiblings")},H=r.onKeyDown;r.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&&b(l.getSelectionCell())&&1==l.getSelectionCount()){var d=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(l.getSelectionCell()):f(l.getSelectionCell()):13==a.which&&(d=u(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&l.model.isEdge(d[0])?l.setSelectionCell(l.model.getTerminal(d[0],!1)):l.setSelectionCell(d[d.length-
-1]),null!=r.hoverIcons&&r.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(k(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(k(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(k(l.getSelectionCell(),mxConstants.DIRECTION_EAST),
-mxEvent.consume(a)):40==a.keyCode&&(k(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error",R)}mxEvent.isConsumed(a)||H.apply(this,arguments)};var G=l.connectVertex;l.connectVertex=function(a,d,e,g,h,k){var n=l.getIncomingEdges(a);return b(a)&&0<n.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):
-G.call(this,a,d,e,g,h,k)};l.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&l.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 A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.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=
+EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName();e.setAttribute("title",d);mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var 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 q=mxEvent.getClientX(l),u=mxEvent.getClientY(l);p.popup(q,u,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.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,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,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,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
+a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){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,e,q,u){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(e[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return m.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=
+b?b.style:h.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.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;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
+10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),m=h.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=h.getOutgoingEdges(h.model.getTerminal(d[0],!0));if(null!=p){for(var n=f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<p.length;t++){var r=h.model.getTerminal(p[t],!1);if(f==q(r)){var x=h.view.getState(r);r!=a&&null!=x&&(n&&b!=x.getCenterX()<k.getCenterX()||!n&&b!=x.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,x)&&(d=10+Math.max(d,(Math.min(l.x+l.width,x.x+x.width)-Math.max(l.x,x.x))/m),g=10+Math.max(g,(Math.min(l.y+l.height,x.y+x.height)-Math.max(l.y,x.y))/m))}}n?g=0:d=0;for(t=0;t<p.length;t++)if(r=h.model.getTerminal(p[t],!1),f==q(r)&&(x=h.view.getState(r),r!=a&&null!=
+x&&(n&&b!=x.getCenterX()<k.getCenterX()||!n&&b!=x.getCenterY()<k.getCenterY()))){var u=[];h.traverse(x.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});h.moveCells(u,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function c(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=
+e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b=h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],
+a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=q(a),p=h.view.translate,n=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/n-p.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function g(a,b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():
+c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(h.model.getTerminal(c[0],!0),d,a),c=h.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&&h.setSelectionCell(d[c].cell)))))}var r=this,h=r.editor.graph,m=h.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){w.apply(this,arguments);if(1==h.getSelectionCount()){c=h.getSelectionCell();var e=h.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(h.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(h.getSelectionCell())&&(a.addSeparator(),0<h.getIncomingEdges(c).length&&
+this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&
+(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=
+h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+D");var v=h.removeCells;h.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 e=[],f=0;f<a.length;f++){var g=a[f];m.isEdge(g)&&d(g)&&(e.push(g),g=m.getTerminal(g,!1));b(g)?(h.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),
+a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var A=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=A.call(this,a,c);if(k.length==
+a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var y=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,p=this.view.getState(f),n=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding",
+"0")){for(var t=0;t<a.length;t++)if(b(a[t])||h.model.isEdge(a[t])&&null==h.model.getTerminal(a[t],!0)){f=h.model.getParent(a[t]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var q=h.getIncomingEdges(a[0]);if(0<q.length){var r=h.view.getState(h.model.getTerminal(q[0],!0));if(null!=r){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-r.getCenterX())/h.view.scale,d=(u.getCenterY()-r.getCenterY())/h.view.scale)}}}}m=y.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(t=0;t<
+m.length;t++)if(this.model.isEdge(m[t]))b(l)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[t],!0))&&this.model.setTerminal(m[t],l,!0);else if(b(a[t])&&(q=h.getIncomingEdges(a[t]),0<q.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==h.getIncomingEdges(m[t]).length){p=l;if(null==p||p==h.model.getParent(a[t]))p=h.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,h.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};
+if(null!=r.sidebar){var t=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=t.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),
+83:r.actions.get("selectSiblings")},H=r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var d=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(d=u(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&h.model.isEdge(d[0])?h.setSelectionCell(h.model.getTerminal(d[0],!1)):h.setSelectionCell(d[d.length-
+1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_EAST),
+mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error",R)}mxEvent.isConsumed(a)||H.apply(this,arguments)};var G=h.connectVertex;h.connectVertex=function(a,d,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):
+G.call(this,a,d,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.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 J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.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 K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",function(){var a=
+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.editorUi.editor.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 e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var h=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;");h.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);h.insertEdge(m,!1);var l=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;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);l.insertEdge(n,!1);a.insert(c);a.insert(g);a.insert(m);a.insert(n);a.insert(b);a.insert(d);a.insert(e);a.insert(h);a.insert(l);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],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!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 l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=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;");h.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);h.insertEdge(m,!1);a.insert(c);a.insert(g);a.insert(l);a.insert(m);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(h);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 b=new mxCell("Organization",
-new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");c.geometry.relative=!0;c.edge=!0;
-b.insertEdge(c,!0);e.insertEdge(c,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(c);a.insert(g);a.insert(b);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],
-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;");d.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;");
+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",
+new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");c.geometry.relative=!0;c.edge=!0;
+d.insertEdge(c,!0);e.insertEdge(c,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;d.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(c);a.insert(g);a.insert(d);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],
+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 d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],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(550,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 d(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 f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.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;";
+0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],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(550,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 b(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 f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.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;";
g.className="geTitle";b.appendChild(g);return g}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";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=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 f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);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";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);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 e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}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; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }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-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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); }a.geMenuItem:active { opacity: 0.4; }.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; }";
-document.getElementsByTagName("head")[0].appendChild(b)}catch(n){}var h=function(a,b,c,d,e,f,g){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";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }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-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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); }a.geMenuItem:active { opacity: 0.4; }.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; }";
+document.getElementsByTagName("head")[0].appendChild(d)}catch(m){}var k=function(a,b,c,d,e,f,g){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";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};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 m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="30px");m.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 q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="30px");l.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 q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.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;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);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="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
@@ -3203,99 +3208,99 @@ mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResou
null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),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 g=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);g.apply(this,arguments)};var k=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){k.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 r=Menus.prototype.init;Menus.prototype.init=function(){r.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("insertText").label=mxResources.get("text");
-b.actions.get("insertText").label=mxResources.get("text");b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("insertRectangle").label=mxResources.get("rectangle");b.actions.get("insertEllipse").label=mxResources.get("ellipse");b.actions.get("insertRhombus").label=mxResources.get("rhombus");b.actions.get("insertImage").label=mxResources.get("image")+"...";b.actions.get("insertLink").label=mxResources.get("link")+"...";b.actions.get("createShape").label=mxResources.get("shape")+
-"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importFile",new Action("File...",function(){c.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&b.importFiles(a.files,null,null,b.maxImageSize)});a.click()}));b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){c.popupMenuHandler.hideMenu();
-b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){d(b)}));b.actions.put("toggleFormat",
-new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,
-"new open - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile&&(b.menus.addMenuItems(a,["-","share"],c),null!=d.realtime&&b.menus.addMenuItems(a,["chatWindowTitle"],
-c),a.addSeparator(c));b.menus.addMenuItems(a,"- outline layers - find tags".split(" "),c);mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,c){f.apply(this,arguments);a.addSeparator(c);b.menus.addSubmenu("openRecent",a,c)}}this.put("save",new Menu(mxUtils.bind(this,
-function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||b.menus.addMenuItems(a,["-","revisionHistory"],c);b.menus.addMenuItems(a,["-","autosave"],
-c)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){g.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=h&&b.menus.addSubmenu("language",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips"],
-c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&(a.addSeparator(c),b.menus.addMenuItem(a,"plugins",c))})));this.put("insertAdvanced",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);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);a.addSeparator(c);b.menus.addSubmenu("insertLayout",a,c);b.menus.addSubmenu("insertAdvanced",a,c)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-l=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);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<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[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 l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=g.menus.get(a),f=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),m);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";
+null);g.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){n.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 r=Menus.prototype.init;Menus.prototype.init=function(){r.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("insertText").label=mxResources.get("text");
+c.actions.get("insertText").label=mxResources.get("text");c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("insertRectangle").label=mxResources.get("rectangle");c.actions.get("insertEllipse").label=mxResources.get("ellipse");c.actions.get("insertRhombus").label=mxResources.get("rhombus");c.actions.get("insertImage").label=mxResources.get("image")+"...";c.actions.get("insertLink").label=mxResources.get("link")+"...";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 - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime?c.menus.addMenuItems(a,["chatWindowTitle"],
+b):c.menus.addMenuItems(a,["-","refresh"],b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags".split(" "),b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,
+b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):(c.menus.addMenuItems(a,["save","saveAs","-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],
+b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,
+["scrollbars","tooltips"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&(a.addSeparator(b),c.menus.addMenuItem(a,"plugins",b))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));
+mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=
+c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var h=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=g.menus.get(a),f=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),n);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.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,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="",mxUtils.setOpacity(f,d||40)):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 b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?k.insertBefore(h,g.statusContainer):k.appendChild(h);null!=f?(h.style.backgroundImage=
+"right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?l.insertBefore(h,g.statusContainer):l.appendChild(h);null!=f?(h.style.backgroundImage=
"url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=
""):(h.setAttribute("disabled","disabled"),mxUtils.setOpacity(h,null!=f?10:20),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function c(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",
-b.appendChild(a[c]));null!=g.statusContainer?k.insertBefore(b,g.statusContainer):k.appendChild(b);return b}function d(){for(var d=k.firstChild;null!=d;){var f=d.nextSibling;"geMenuItem"!=d.className&&"geItem"!=d.className||d.parentNode.removeChild(d);d=f}m=k.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(d=900>e)||a("diagram");c([d?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
+b.appendChild(a[c]));null!=g.statusContainer?l.insertBefore(b,g.statusContainer):l.appendChild(b);return b}function d(){for(var d=l.firstChild;null!=d;){var f=d.nextSibling;"geMenuItem"!=d.className&&"geItem"!=d.className||d.parentNode.removeChild(d);d=f}n=l.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(d=900>e)||a("diagram");c([d?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
null,mxResources.get("shapes"),g.actions.get("image"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",g.actions.get("image"),
d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)]);f=a("insert",!0,d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);c([f,b(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)]);if(411<=e&&(f=g.actions.get("undo"),d=g.actions.get("redo"),f=b("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),d=b("",d.funct,
-null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),c([f,d]),480<=e)){var d=g.actions.get("zoomIn"),f=g.actions.get("zoomOut"),l=g.actions.get("resetView");
-c([b("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),c([f,d]),480<=e)){var d=g.actions.get("zoomIn"),f=g.actions.get("zoomOut"),h=g.actions.get("resetView");
+c([b("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.translate.x,c=k.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-k.view.scale)&&b==k.view.translate.x&&c==k.view.translate.y&&g.actions.get(k.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",h,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=e?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=e?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null])}d=g.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&540<=e?(f=p.addMenu("",d.funct),f.setAttribute("title",mxResources.get("language")),f.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),k.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}l.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var k=document.createElement("div");k.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,p=new Menubar(g,k);g.statusContainer=
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),l.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}h.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,k=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.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(g,l);g.statusContainer=
g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var q=g.descriptorChanged;g.descriptorChanged=function(){q.apply(this,arguments);var a=g.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);k.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else k.removeAttribute("title")};g.setStatusText(g.editor.getStatus());k.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";k.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=
+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")};g.setStatusText(g.editor.getStatus());l.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";l.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=
document.createElement("div");g.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 f=g.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var u=g.menus.get("viewZoom");if(null!=
u){this.tabContainer.style.right="70px";var C=p.addMenu("100%",u.funct);C.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");C.style.whiteSpace="nowrap";C.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";C.style.backgroundPosition="right 6px center";C.style.backgroundRepeat="no-repeat";C.style.backgroundColor="#ffffff";C.style.paddingRight="10px";C.style.display="block";C.style.position="absolute";C.style.textDecoration="none";C.style.textDecoration="none";C.style.right=
"0px";C.style.bottom="0px";C.style.overflow="hidden";C.style.visibility="hidden";C.style.textAlign="center";C.style.color="#000";C.style.fontSize="12px";C.style.color="#707070";C.style.width="59px";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(g.tabContainer.style.height)-1+"px";C.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";r.appendChild(C);u=mxUtils.bind(this,function(){C.innerHTML=Math.round(100*g.editor.graph.view.scale)+
-"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(g.tabContainer);r.appendChild(k);r.appendChild(g.diagramContainer);f.appendChild(r);g.updateTabContainer();
+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(g.tabContainer);r.appendChild(l);r.appendChild(g.diagramContainer);f.appendChild(r);g.updateTabContainer();
d();mxEvent.addListener(window,"resize",function(){d();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.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\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\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\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.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\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+\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\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\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,d,e){this.init(a,d,e)};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;
+(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\nchatJoined={1} has joined\nchatLeft={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\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\nfileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?\noverwrite=Overwrite\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+\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\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\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,e){this.init(a,b,e)};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;
-GraphViewer.prototype.init=function(a,d,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=
-0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),
-null!=a)){var b=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var b=this;this.graph.getImageFromBundles=function(a){return b.getImageUrl(a)};
-mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==d.nodeName){var e=d.getElementsByTagName("diagram");if(0<e.length){var h=this.graph.getGlobalVariable,b=this;this.graph.getGlobalVariable=function(a){var c=e[b.currentPage];return"page"==a?c.getAttribute("name")||"Page-"+(b.currentPage+1):"pagenumber"==a?b.currentPage+1:h.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
+GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=
+0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
+null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};
+mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:k.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};var f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged",
-f);f();urlParams.page=b.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
-this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};b=this;this.graph.customLinkClicked=function(a){var c=!0;if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");
-b.selectPageById(a.substring(d+1))||(c=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);return c};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var h=this.getObservableParent(a),
-m=new e(mxUtils.bind(this,function(d){0<a.offsetWidth&&(m.disconnect(),b())}));m.observe(h,{attributes:!0})}else b()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
+f);f();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
+this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){var b=!0;if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");
+d.selectPageById(a.substring(c+1))||(b=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);return b};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),
+l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),d())}));l.observe(k,{attributes:!0})}else d()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,d=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var b=mxUtils.bind(this,function(){if(!e){e=!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"}e=!1}}),h=null,m=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==h||m||(m=!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},h=c,window.setTimeout(function(){m=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",b),this.graph.addListener("size",
-b)):new ResizeSensor(this.graph.container,b));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,d.width+2*this.graph.border),this.updateContainerHeight(a,d.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=h=null,b=mxUtils.bind(this,function(){window.clearTimeout(p);m||(p=window.setTimeout(mxUtils.bind(this,
-this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",b):new ResizeSensor(this.graph.container,b))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",b);var q=mxUtils.bind(this,function(){var b=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||d.width+2*this.graph.border>a.offsetWidth||d.height+2*this.graph.border>this.graphConfig["max-height"])){var c=
-null;null!=this.graphConfig["max-height"]&&(c=this.graphConfig["max-height"]/(d.height+2*this.graph.border));this.fitGraph(c)}else this.graph.view.setTranslate(Math.floor((this.graph.border-d.x)/this.graph.view.scale),Math.floor((this.graph.border-d.y)/this.graph.view.scale)),h=a.offsetWidth;a.style.minWidth=b});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){d=this.graph.getGraphBounds();h=null;q()}};
-GraphViewer.prototype.updateContainerWidth=function(a,d){a.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(a,d){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=d+"px"};
-GraphViewer.prototype.showLayers=function(a,d){var e=this.graphConfig.layers;if(null!=e||null!=d)if(e=null!=e?e.split(" "):null,null!=d||0<e.length){var b=null!=d?d.getModel():null,h=a.getModel();h.beginUpdate();try{for(var m=h.getChildCount(h.root),p=0;p<m;p++)h.setVisible(h.getChildAt(h.root,p),null!=d?b.isVisible(b.getChildAt(b.root,p)):!1);if(null==b)for(p=0;p<e.length;p++)h.setVisible(h.getChildAt(h.root,parseInt(e[p])),!0)}finally{h.endUpdate()}}};
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!e){e=!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"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!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(){l=!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 p=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);l||(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 q=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(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};
+GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),p=0;p<l;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<e.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(e[p])),!0)}finally{k.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.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(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var d=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?d.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(d.style.marginTop=this.toolbarHeight+"px");var e=d.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var b=null,h=null,m=mxUtils.bind(this,function(a){null!=b&&(window.clearTimeout(b),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);b=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
-0);b=null;h=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";h=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=b&&(window.clearTimeout(b),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
+0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,u=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,k=null,r=0;r<c.length;r++){var l=c[r];if("pages"==l){k=d.ownerDocument.createElement("div");
-k.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(k,70);var n=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");n.style.borderRightStyle="none";n.style.paddingLeft="0px";n.style.paddingRight="0px";e.appendChild(k);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");w.style.paddingLeft="0px";w.style.paddingRight="0px";l=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";n.style.display=k.style.display;w.style.display=k.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)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"==l){if(this.layersEnabled){var v=this.graph.getModel(),B=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
-g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=B.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
-"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){B.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});B.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l],
-null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(c=d.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),e.appendChild(c));this.minToolbarWidth=34*f;var y=d.style.border,c=mxUtils.bind(this,function(){var a=d.getBoundingClientRect(),b=mxUtils.getScrollOrigin(document.body),b="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-b.x,top:-b.y},a={left:a.left-b.left,top:a.top-b.top,bottom:a.bottom-b.top,right:a.right-b.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,d.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==y&&(d.style.border="1px solid #d0d0d0");document.body.appendChild(e);var c=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
-g=null),d.style.border=y)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==d||a==e||a==g)return;a=a.parentNode}c()});mxEvent.addListener(document,"mouseleave",function(a){c()})});mxEvent.addListener(d,"mouseenter",c)};
-GraphViewer.prototype.addClickHandler=function(a,d){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,b){if(null==b){var h=mxEvent.getSource(e);"a"==h.nodeName.toLowerCase()&&(b=h.getAttribute("href"))}null!=d?null==b||a.isExternalProtocol(b)||a.isBlankLink(b)||window.setTimeout(function(){d.destroy()},0):null!=b&&null==d&&a.isCustomLink(b)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&a.customLinkClicked(b)&&mxEvent.consume(e)}),
-mxUtils.bind(this,function(a){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(a,d,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,n=null,r=0;r<c.length;r++){var h=c[r];if("pages"==h){n=b.ownerDocument.createElement("div");
+n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var m=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");m.style.borderRightStyle="none";m.style.paddingLeft="0px";m.style.paddingRight="0px";e.appendChild(n);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");w.style.paddingLeft="0px";w.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";m.style.display=n.style.display;w.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)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"==h){if(this.layersEnabled){var v=this.graph.getModel(),A=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=A.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
+"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){A.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});A.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
+null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);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),e.appendChild(c));this.minToolbarWidth=34*f;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};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==y&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
+g=null),b.style.border=y)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==g)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",c)};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&a.customLinkClicked(d)&&mxEvent.consume(e)}),
+mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev=
"1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),d=document.createElement("div");mxClient.IS_QUIRKS?(d.style.position="absolute",d.style.left=a.x+"px",d.style.top=a.y+"px",d.style.width=document.body.offsetWidth+"px",d.style.height=document.body.offsetHeight+"px"):d.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";d.style.zIndex=this.lightboxZIndex;d.style.backgroundColor="#000000";mxUtils.setOpacity(d,70);document.body.appendChild(d);
-var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){b.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 b=new EditorUi(new Editor(!0),document.createElement("div"),!0);b.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";b.refresh=
-function(){};var h=mxUtils.bind(this,function(a){27==a.keyCode&&b.destroy()}),m=b.destroy;b.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",h);document.body.removeChild(d);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=b.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",h)):(d.style.display="none",e.style.display="none");var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=b.createTemporaryGraph;b.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(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,b);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);b.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");b.chromelessToolbar.style.bottom=
-"60px";b.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(b.chromelessToolbar);b.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",b.chromelessToolbar.style.display="block",b.chromelessToolbar.style.position="absolute",
-b.chromelessToolbar.style.bottom="",b.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");b.lightboxFit();b.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(d,"click",function(){b.destroy()})}),0);return b};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var d=document.getElementsByClassName(a);a=[];for(var e=0;e<d.length;e++)a.push(d[e]);return a}for(var b=document.getElementsByTagName("*"),d=[],e=0;e<b.length;e++){var h=b[e].className;null!=h&&0<h.length&&(h=h.split(" "),0<=mxUtils.indexOf(h,a)&&d.push(b[e]))}return d};
-GraphViewer.createViewerForElement=function(a,d){var e=a.getAttribute("data-mxgraph");if(null!=e){var b=JSON.parse(e),h=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,b);null!=d&&d(e)};null!=b.url?GraphViewer.getUrl(b.url,function(a){h(a)}):h(b.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(d){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,d,e){if(null!=GraphViewer.cachedUrls[a])d(GraphViewer.cachedUrls[a]);else{var b=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;b.open("GET",a);b.onload=function(){d(null!=b.getText?b.getText():b.responseText)};b.onerror=e;b.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},d=function(e,b){function h(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
-new h,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"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var k=!1,p=function(){b.resizedAttached&&(k&&(b.resizedAttached.call(),k=!1),a(p))};a(p);var q,t,u,H,G=function(){if((u=b.offsetWidth)!=q||(H=b.offsetHeight)!=t)k=!0,q=u,t=H;g()},A=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};A(d,"scroll",G);A(f,"scroll",G)}var q=function(){GraphViewer.resizeSensorEnabled&&b()},u=Object.prototype.toString.call(e),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var u=0,f=e.length;u<f;u++)p(e[u],q);else p(e,q);this.detach=function(){if(c)for(var a=0,b=e.length;a<b;a++)d.detach(e[a]);else d.detach(e)}};
-d.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=d})();
+GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
+var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){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()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",k)):(b.style.display="none",e.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(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.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&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.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(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(e){throw a.innerHTML=e.message,e;}})};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
+GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function 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"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,u,H,G=function(){if((u=b.offsetWidth)!=q||(H=b.offsetHeight)!=t)n=!0,q=u,t=H;g()},B=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};B(d,"scroll",G);B(f,"scroll",G)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(e),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var u=0,f=e.length;u<f;u++)p(e[u],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}};
+b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index 1a754285..44cf0462 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -1,6 +1,7 @@
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
// NOTE: Modified to support data URIs for images, ie. data:image/*
+// Modified to allow "word-break: break-word" in styles. It is done by adding "break-word" which is at index 55 of J array J[55] to "cssLitGroup" of "word-break"
(function(){var c=void 0,n=!0,s=null,C=!1,J=["aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow,springgreen,steelblue,tan,teal,thistle,tomato,transparent,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","),
"all-scroll,col-resize,crosshair,default,e-resize,hand,help,move,n-resize,ne-resize,no-drop,not-allowed,nw-resize,pointer,progress,row-resize,s-resize,se-resize,sw-resize,text,vertical-text,w-resize,wait".split(","),"armenian,decimal,decimal-leading-zero,disc,georgian,lower-alpha,lower-greek,lower-latin,lower-roman,square,upper-alpha,upper-latin,upper-roman".split(","),"100,200,300,400,500,600,700,800,900,bold,bolder,lighter".split(","),"block-level,inline-level,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),
"condensed,expanded,extra-condensed,extra-expanded,narrower,semi-condensed,semi-expanded,ultra-condensed,ultra-expanded,wider".split(","),"inherit,inline,inline-block,inline-box,inline-flex,inline-grid,inline-list-item,inline-stack,inline-table,run-in".split(","),"behind,center-left,center-right,far-left,far-right,left-side,leftwards,right-side,rightwards".split(","),"large,larger,small,smaller,x-large,x-small,xx-large,xx-small".split(","),"dashed,dotted,double,groove,outset,ridge,solid".split(","),
@@ -25,7 +26,7 @@ position:{cssPropBits:0,cssLitGroup:[J[23]],cssFns:[]},quotes:{cssPropBits:8,css
cssLitGroup:[J[14],J[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[J[52],J[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[J[42],J[56],J[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[J[19],J[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[J[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[J[26],J[71]],cssFns:[]},"text-wrap":{cssPropBits:0,
cssLitGroup:[J[46],J[71],J[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[J[71]],cssFns:"matrix(),perspective(),rotate(),rotate3d(),rotatex(),rotatey(),rotatez(),scale(),scale3d(),scalex(),scaley(),scalez(),skew(),skewx(),skewy(),translate(),translate3d(),translatex(),translatey(),translatez()".split(",")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[J[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[J[10],J[48],J[50],J[71]],cssFns:["cubic-bezier()",
"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[J[48],J[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[J[30],J[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[J[12],J[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[J[27],J[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[J[17],J[69]],
-cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
+cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72],J[55]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
J[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[11],J[31],J[42],J[48],J[56],J[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[J[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[J[48],J[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[J[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},O;for(O in L)"string"===typeof L[O]&&Object.hasOwnProperty.call(L,O)&&(L[O]=L[L[O]]);"undefined"!==typeof window&&(window.cssSchema=L);var U,X;
@@ -663,7 +664,7 @@ mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){g||a.setShadow(!1);a.b
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};
mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),k=this.graph.model.getTerminal(g,!0)==a;if(!b||k)k=this.graph.view.getVisibleTerminal(g,!k),this.traverse(k,b,c,g,e)}};
-mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(cell)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
@@ -2461,13 +2462,14 @@ Graph.prototype.isCellFoldable=function(a){var c=this.view.getState(a),c=null!=c
Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var d=a.value.getAttribute("tooltip");if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),c=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var b=[];this.isEnabled()&&d.push("link");for(var f=0;f<a.length;f++)0>mxUtils.indexOf(d,a[f].nodeName)&&0<a[f].nodeValue.length&&b.push({name:a[f].nodeName,value:a[f].nodeValue});b.sort(function(a,b){return a.name<b.name?
-1:a.name>b.name?1:0});for(f=0;f<b.length;f++)"link"==b[f].name&&this.isCustomLink(b[f].value)||(c+=("link"!=b[f].name?"<b>"+b[f].name+":</b> ":"")+mxUtils.htmlEntities(b[f].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;">'+c+"</div>"))}}return c};Graph.prototype.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};
-Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
-Graph.prototype.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&c.push(a.charAt(d))}return c.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
-HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
-HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
-HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
-HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":
-IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
+Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.prototype.compressNode=function(a){return this.compress(this.zapGremlins(mxUtils.getXml(a)))};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};
+Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};Graph.prototype.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&c.push(a.charAt(d))}return c.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;
+HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";
+HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
+HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);
+HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
+HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+
+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,
mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
@@ -3169,9 +3171,8 @@ c=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&
"right";var d=document.createElement("textarea");d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();
a.preventDefault()},!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var f=document.createElement("select");f.style.width="180px";f.className=
"geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),
-f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),a.editor.graph.openLink(a.getUrl());else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==
-f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};
-EditDiagramDialog.showNewWindowOption=!0;
+f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;
+(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(p){c=p}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+p.value:a+"."+p.value;"xml"===p.value?(n.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),t.setAttribute("disabled","true")):(n.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),t.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}
function d(){q.style.backgroundColor=q.value*r.value>MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,
mxResources.get("filename")+":");f.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");f.appendChild(k);var p=document.createElement("select");p.style.width="180px";k=document.createElement("option");k.setAttribute("value",
@@ -7163,17 +7164,18 @@ DrawioFile=function(a,e){mxEventSource.call(this);this.ui=a;this.data=e||""};mxU
DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,e,d,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,e,d){};DrawioFile.prototype.saveFile=function(a,e,d,c){};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.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,e,d){};DrawioFile.prototype.isMovable=function(){return!1};
DrawioFile.prototype.move=function(a,e,d){};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.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){var d=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
-this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);
-this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
-DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<span title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</span>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("span"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,e,d,c){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<e?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=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!=d&&d(a)}),
-mxUtils.bind(this,function(a){null!=c&&c(a)}))}else null!=d&&d(null)}),a)};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.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var d=a.lastIndexOf("."),c=0<d?a.substring(d):"",d=e.lastIndexOf(".");return c===(0<d?e.substring(d):"")}return a==e};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,e,d,c){DrawioFile.call(this,a,e);this.title=d;this.mode=c?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,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};
+DrawioFile.prototype.open=function(){var a=this.getData();null!=a&&this.ui.setFileData(a);this.changeListener=mxUtils.bind(this,function(a,d){var c=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=c&&c.ignoreEdit||this.fileChanged()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",
+this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",
+this.changeListener)};
+DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null,
+0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()})))};
+DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus()};
+DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):
+null,null!=a&&0<a.length?mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()})):this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+"</div>"))};
+DrawioFile.prototype.autosave=function(a,e,d,c){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<e?a:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThead==g&&(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!=d&&d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),a);this.autosaveThread=g};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.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};
+DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var d=a.lastIndexOf("."),c=0<d?a.substring(d):"",d=e.lastIndexOf(".");return c===(0<d?e.substring(d):"")}return a==e};DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,e,d,c){DrawioFile.call(this,a,e);this.title=d;this.mode=c?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,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};
LocalFile.prototype.saveFile=function(a,e,d,c){this.title=a;this.updateFileData();e=this.getData();var g=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,g?"image/png":"text/xml",g);else if(c.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+
(g?"&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!=d&&d()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):k(e)};LocalFile.prototype.rename=function(a,e,d){this.title=a;this.descriptorChanged();null!=e&&e()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,e,d){LocalFile.call(this,a,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,e,d){DrawioFile.call(this,a,e);this.title=d};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};
@@ -7184,7 +7186,7 @@ StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,argum
StorageLibrary.prototype.isRenamable=function(a,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,e,d){StorageFile.call(this,a,e,d);a=d;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+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,e,d){return!1};UrlLibrary.prototype.saveAs=function(a,e,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,e,d){function c(c,q,t,m,v,x){function w(){mxEvent.addListener(u,"click",null!=x?x:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,b.checked);e()})):(a.setMode(t,b.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}var u=document.createElement("a");u.style.overflow="hidden";u.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block";u.className="geBaseButton";u.style.boxSizing="border-box";u.style.fontSize="11px";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 10px 12px 10px";u.style.width="88px";u.style.height="100px";u.style.whiteSpace="nowrap";u.setAttribute("title",q);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.overflow="hidden";if(null!=c){var A=document.createElement("img");
A.setAttribute("src",c);A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="60px";A.style.height="60px";A.style.paddingBottom="6px";u.appendChild(A)}else g.style.paddingTop="5px",g.style.whiteSpace="normal",mxClient.IS_IOS?(u.style.padding="0px 10px 20px 10px",u.style.top="6px"):mxClient.IS_FF&&(g.style.paddingTop="0px",g.style.marginTop="-2px");u.appendChild(g);mxUtils.write(g,q);if(null!=v)for(c=0;c<v.length;c++)mxUtils.br(g),mxUtils.write(g,v[c]);if(null!=m&&null==a[m]){A.style.visibility=
-"hidden";mxUtils.setOpacity(g,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(u);var z=window.setTimeout(function(){null==a[m]&&(k.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[m]&&(window.clearTimeout(z),mxUtils.setOpacity(g,100),A.style.visibility="",k.stop(),w(),"drive"==m&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else w();
+"hidden";mxUtils.setOpacity(g,10);var y=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});y.spin(u);var k=window.setTimeout(function(){null==a[m]&&(y.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[m]&&(window.clearTimeout(k),mxUtils.setOpacity(g,100),A.style.visibility="",y.stop(),w(),"drive"==m&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else w();
n.appendChild(u);++f>=d&&(mxUtils.br(n),f=0)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=a.addLanguageMenu(g,!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 l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";k.appendChild(l);mxUtils.write(k,mxResources.get("help"));g.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"};g.appendChild(p);mxEvent.addListener(p,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
@@ -7218,14 +7220,14 @@ b=document.createElement("img");b.setAttribute("src",Editor.facebookImage);b.set
f.className="geBtn",k.appendChild(f))}b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(b);f=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>e.length?mxClient.IS_SF||null!=document.documentMode?b.className="geBtn gePrimaryBtn":(k.appendChild(f),
f.className="geBtn gePrimaryBtn",b.className="geBtn"):(k.appendChild(n),b.className="geBtn",n.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c};EmbedDialog.showPreviewOption=!0;
var GoogleSitesDialog=function(a,e){function d(){var a=null!=B.getTitle()?B.getTitle():this.defaultFilename;if(x.checked&&""!=t.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(c+="&title="+encodeURIComponent(a));0<C.length&&(c+="&s="+C);""!=q.value&&"0"!=q.value&&(c+="&border="+q.value);""!=h.value&&(c+="&height="+h.value);c+="&pan="+(u.checked?"1":"0");c+="&zoom="+(w.checked?"1":"0");c+="&fit="+(v.checked?"1":"0");c+="&resize="+
-(m.checked?"1":"0");c+="&x0="+Number(f.value);c+="&y0="+n;g.mathEnabled&&(c+="&math=1");A.checked?c+="&edit=_blank":z.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));b.value=c}else B.constructor==DriveFile||B.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=B.getHash().substring(1),c=B.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+
+(m.checked?"1":"0");c+="&x0="+Number(f.value);c+="&y0="+n;g.mathEnabled&&(c+="&math=1");A.checked?c+="&edit=_blank":y.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));b.value=c}else B.constructor==DriveFile||B.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=B.getHash().substring(1),c=B.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+
encodeURIComponent(a)),""!=h.value&&(a=parseInt(h.value)+parseInt(f.value),c+="&height="+a),b.value=c):b.value=""}var c=document.createElement("div"),g=a.editor.graph,k=g.getGraphBounds(),l=g.view.scale,p=Math.floor(k.x/l-g.view.translate.x),n=Math.floor(k.y/l-g.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginBottom="8px";b.style.marginTop="2px";b.style.width="410px";c.appendChild(b);
mxUtils.br(c);this.init=function(){b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=p;c.appendChild(f);mxUtils.write(c,mxResources.get("height")+":");var h=document.createElement("input");h.setAttribute("type",
"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/l);c.appendChild(h);mxUtils.br(c);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=e||"";
c.appendChild(t);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";c.appendChild(q);mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";c.appendChild(u);mxUtils.write(c,mxResources.get("pan")+" ");var w=document.createElement("input");
-w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);c.appendChild(z);mxUtils.write(c,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,
+w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);c.appendChild(y);mxUtils.write(c,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,
mxResources.get("asNew")+" ");mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;m.style.marginLeft="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft=
-"8px";c.appendChild(x);mxUtils.write(c,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),B=a.getCurrentFile();mxEvent.addListener(u,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(t,"change",d);d();
+"8px";c.appendChild(x);mxUtils.write(c,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),B=a.getCurrentFile();mxEvent.addListener(u,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(t,"change",d);d();
mxEvent.addListener(b,"click",function(){b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";k.appendChild(l);c.appendChild(k);this.container=c},CreateGraphDialog=function(a,e,d){var c=document.createElement("div");c.style.textAlign=
"right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var k=new Graph(e);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 l="curved=1;";k.cellRenderer.installCellOverlayListeners=
function(a,b,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(f.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(f){b.fireEvent(new mxEventObject("pointerdown","event",f,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(f.node,"touchstart",function(f){b.fireEvent(new mxEventObject("pointerdown","event",f,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
@@ -7239,7 +7241,7 @@ CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image
IMAGE_PATH+"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
null!=c?c.src:"";var k=!1,l=function(){k||""==g.value||a.isOffline()?(p.value="",n.value=""):a.loadImage(mxUtils.trim(g.value),function(a){p.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";p.value="";n.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,f=null;mxEvent.addListener(b,"dragleave",function(a){null!=
-f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(c){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(b));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,f,c,v,h){g.value=a;l()},function(){},
+f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(c){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(b));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,f,c,h,d){g.value=a;l()},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 c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&(g.value=decodeURIComponent(c),l())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(g);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,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!=c?c.width:"";d.appendChild(p);mxUtils.write(d,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=c?c.height:"";d.appendChild(n);c=mxUtils.button(mxResources.get("reset"),function(){g.value="";p.value="";n.value="";k=!1});mxEvent.addListener(c,"mousedown",
function(){k=!0});mxEvent.addListener(c,"touchstart",function(){k=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(g,"change",l);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&&(g.value=a.url,l()));g.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
@@ -7265,44 +7267,44 @@ l=[];a.editor.graph.getModel().beginUpdate();try{l=a.editor.graph.importCells(h.
n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=d&&p.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&n.setAttribute("selected","selected");var b=document.createElement("option");b.setAttribute("value","plantUmlPng");mxUtils.write(b,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==d&&(p.appendChild(n),p.appendChild(b),p.appendChild(f));var h=g();l.value=h;e.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.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){l.value=a.target.result};b.readAsText(a)}},!1));e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=g();if(0==l.value.length||l.value==h)h=a,l.value=h});d=mxUtils.button(mxResources.get("close"),function(){l.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);n=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();c(l.value,p.value)});e.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(d);this.container=e},NewDialog=function(a,e,d,c,g,k,l,p,n,b,f,h,t,q,u){function w(){for(var a=!0;E<O.length&&(a||0!=mxUtils.mod(E,30));)a=O[E++],m(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 z(){if(aa)d||a.hideDialog(),q(aa,Z,H.value);else if(c)d||a.hideDialog(),c(P,H.value);else{var b=H.value;null!=b&&
-0<b.length&&a.pickFolder(a.mode,function(f){a.createFile(b,P,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,f)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function A(a,b,f,c,h){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");P=b;T=f;S=a;aa=c;Z=h;S.style.backgroundColor=p;S.style.border=n}function m(b,f,c,h,v,m,d,x,q){var e=document.createElement("div");e.className="geTemplate";e.style.height=
-Q+"px";e.style.width=K+"px";null!=h&&0<h.length&&e.setAttribute("title",h);if(null!=m)e.style.backgroundImage="url("+m+")",e.style.backgroundSize="contain",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",mxEvent.addListener(e,"click",function(a){A(e,null,null,b,d)}),mxEvent.addListener(e,"dblclick",function(a){z()});else if(null!=b&&0<b.length){c=q||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";e.style.backgroundImage="url("+c+")";e.style.backgroundPosition="center center";
-e.style.backgroundRepeat="no-repeat";var t=!1;mxEvent.addListener(e,"click",function(c){F.setAttribute("disabled","disabled");e.style.backgroundColor="transparent";e.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;mxUtils.get(c,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(A(e,a.getText(),f),t&&z())}))});mxEvent.addListener(e,"dblclick",function(a){t=!0})}else e.innerHTML=
-'<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",v&&A(e),null!=x?mxEvent.addListener(e,"click",x):(mxEvent.addListener(e,"click",function(a){A(e)}),mxEvent.addListener(e,"dblclick",function(a){z()}));N.appendChild(e)}function v(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,f;for(f in U){var c=document.createElement("div"),h=mxResources.get(f),v=U[f];null==
+function(){a.hideDialog();c(l.value,p.value)});e.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(d);this.container=e},NewDialog=function(a,e,d,c,g,k,l,p,n,b,f,h,t,q,u){function w(){for(var a=!0;E<O.length&&(a||0!=mxUtils.mod(E,30));)a=O[E++],m(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 y(){if(aa)d||a.hideDialog(),q(aa,Z,F.value);else if(c)d||a.hideDialog(),c(P,F.value);else{var b=F.value;null!=b&&
+0<b.length&&a.pickFolder(a.mode,function(f){a.createFile(b,P,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,f)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function A(a,b,f,c,h){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");G.removeAttribute("disabled");P=b;T=f;S=a;aa=c;Z=h;S.style.backgroundColor=p;S.style.border=n}function m(b,f,c,h,v,m,d,x,e){var q=document.createElement("div");q.className="geTemplate";q.style.height=
+Q+"px";q.style.width=K+"px";null!=h&&0<h.length&&q.setAttribute("title",h);if(null!=m)q.style.backgroundImage="url("+m+")",q.style.backgroundSize="contain",q.style.backgroundPosition="center center",q.style.backgroundRepeat="no-repeat",mxEvent.addListener(q,"click",function(a){A(q,null,null,b,d)}),mxEvent.addListener(q,"dblclick",function(a){y()});else if(null!=b&&0<b.length){c=e||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";q.style.backgroundImage="url("+c+")";q.style.backgroundPosition="center center";
+q.style.backgroundRepeat="no-repeat";var t=!1;mxEvent.addListener(q,"click",function(c){G.setAttribute("disabled","disabled");q.style.backgroundColor="transparent";q.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;mxUtils.get(c,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(A(q,a.getText(),f),t&&y())}))});mxEvent.addListener(q,"dblclick",function(a){t=!0})}else q.innerHTML=
+'<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",v&&A(q),null!=x?mxEvent.addListener(q,"click",x):(mxEvent.addListener(q,"click",function(a){A(q)}),mxEvent.addListener(q,"dblclick",function(a){y()}));N.appendChild(q)}function v(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,f;for(f in U){var c=document.createElement("div"),h=mxResources.get(f),v=U[f];null==
h&&(h=f.substring(0,1).toUpperCase()+f.substring(1));18<h.length&&(h=h.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",h+" ("+v.length+")");mxUtils.write(c,c.getAttribute("title"));null!=b&&(c.style.padding=b);Y.appendChild(c);null==a&&(a=c,a.style.backgroundColor=l);(function(b,f){mxEvent.addListener(c,"click",function(){a!=f&&(a.style.backgroundColor="",a=f,
-a.style.backgroundColor=l,N.scrollTop=0,N.innerHTML="",E=0,O=U[b],y=null,w())})})(f,c)}w()}d=null!=d?d:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";p=null!=p?p:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";d&&x.appendChild(C);var B=document.createElement("img");B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width=
+a.style.backgroundColor=l,N.scrollTop=0,N.innerHTML="",E=0,O=U[b],z=null,w())})})(f,c)}w()}d=null!=d?d:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";p=null!=p?p:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";d&&x.appendChild(C);var B=document.createElement("img");B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width=
"40px";B.style.height="40px";B.style.marginRight="10px";B.style.paddingBottom="4px";B.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";!e&&d&&C.appendChild(B);d&&mxUtils.write(C,
-(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");B=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?B=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?B=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?B=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?B=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(B=a.trello.extension);var H=document.createElement("input");H.setAttribute("value",
-a.defaultFilename+B);H.style.marginRight="20px";H.style.marginLeft="10px";H.style.width=e?"220px":"430px";this.init=function(){d&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};d&&C.appendChild(H);var C=!1,E=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");z();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(h||t){var L=[],y=null,D=function(a){F.setAttribute("disabled",
-"disabled");for(var b=0;b<L.length;b++)L[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},C=!0,B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="30px";x.appendChild(B);var G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";D(0);N.scrollTop=0;N.innerHTML="";E=0;y!=O&&(O=y,w(),y=null)});L.push(G);B.appendChild(G);var M=function(a){Y.style.display="none";N.style.left="30px";D(a?-1:1);null==y&&(y=O);N.scrollTop=0;
-N.innerHTML="";var b=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});b.spin(N);E=0;var f=function(a,f){b.stop();O=a;f?N.innerHTML=f:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",w())};a?t(J.value,f):h(f)};h&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),B.appendChild(G),L.push(G));if(t){G=document.createElement("span");G.style.marginLeft=
-"10px";G.innerHTML=mxResources.get("search")+":";B.appendChild(G);var J=document.createElement("input");J.style.marginRight="10px";J.style.marginLeft="10px";J.style.width="220px";mxEvent.addListener(J,"keypress",function(a){13==a.keyCode&&M(!0)});B.appendChild(J);G=mxUtils.button(mxResources.get("search"),function(){M(!0)});G.className="geBtn";B.appendChild(G)}D(0)}var T=null,P=null,S=null,aa=null,Z=null,N=document.createElement("div");N.style.border="1px solid #d3d3d3";N.style.position="absolute";
+(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");B=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?B=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?B=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?B=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?B=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(B=a.trello.extension);var F=document.createElement("input");F.setAttribute("value",
+a.defaultFilename+B);F.style.marginRight="20px";F.style.marginLeft="10px";F.style.width=e?"220px":"430px";this.init=function(){d&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};d&&C.appendChild(F);var C=!1,E=0,G=mxUtils.button(mxResources.get("create"),function(){G.setAttribute("disabled","disabled");y();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(h||t){var L=[],z=null,D=function(a){G.setAttribute("disabled",
+"disabled");for(var b=0;b<L.length;b++)L[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},C=!0,B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="30px";x.appendChild(B);var H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";D(0);N.scrollTop=0;N.innerHTML="";E=0;z!=O&&(O=z,w(),z=null)});L.push(H);B.appendChild(H);var M=function(a){Y.style.display="none";N.style.left="30px";D(a?-1:1);null==z&&(z=O);N.scrollTop=0;
+N.innerHTML="";var b=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});b.spin(N);E=0;var f=function(a,f){b.stop();O=a;f?N.innerHTML=f:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",w())};a?t(J.value,f):h(f)};h&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),B.appendChild(H),L.push(H));if(t){H=document.createElement("span");H.style.marginLeft=
+"10px";H.innerHTML=mxResources.get("search")+":";B.appendChild(H);var J=document.createElement("input");J.style.marginRight="10px";J.style.marginLeft="10px";J.style.width="220px";mxEvent.addListener(J,"keypress",function(a){13==a.keyCode&&M(!0)});B.appendChild(J);H=mxUtils.button(mxResources.get("search"),function(){M(!0)});H.className="geBtn";B.appendChild(H)}D(0)}var T=null,P=null,S=null,aa=null,Z=null,N=document.createElement("div");N.style.border="1px solid #d3d3d3";N.style.position="absolute";
N.style.left="160px";N.style.right="34px";C=(d?72:40)+(C?30:0);N.style.top=C+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var Y=document.createElement("div");Y.style.cssText="position:absolute;left:30px;width:128px;top:"+C+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Q=140,K=140,U={},R=1;U.basic=[{title:"blankDiagram",select:!0}];var O=U.basic;if(!e){x.appendChild(Y);x.appendChild(N);var V=!1;/^https?:\/\//.test(f)&&
!a.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));mxUtils.get(f,function(a){if(!V){V=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var f=a.getAttribute("section");null==f&&(f=b.indexOf("/"),f=b.substring(0,f));b=U[f];null==b&&(R++,b=[],U[f]=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}v()}})}mxEvent.addListener(H,"keypress",function(a){13==a.keyCode&&z()});f=document.createElement("div");f.style.marginTop=e?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";C=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});C.className="geBtn";!a.editor.cancelFirst||g&&null==k||f.appendChild(C);e||a.isOffline()||!d||null!=c||g||(B=mxUtils.button(mxResources.get("help"),
-function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),B.className="geBtn",f.appendChild(B));e||"1"==urlParams.embed||g||(e=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(H.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()}),e.className="geBtn",f.appendChild(e));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(f){a.openFiles(b.files,!0)});b.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(F);a.editor.cancelFirst||null!=c||g&&null==k||f.appendChild(C);x.appendChild(f);
+a.nextSibling}v()}})}mxEvent.addListener(F,"keypress",function(a){13==a.keyCode&&y()});f=document.createElement("div");f.style.marginTop=e?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";C=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});C.className="geBtn";!a.editor.cancelFirst||g&&null==k||f.appendChild(C);e||a.isOffline()||!d||null!=c||g||(B=mxUtils.button(mxResources.get("help"),
+function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),B.className="geBtn",f.appendChild(B));e||"1"==urlParams.embed||g||(e=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(F.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()}),e.className="geBtn",f.appendChild(e));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(f){a.openFiles(b.files,!0)});b.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(G);a.editor.cancelFirst||null!=c||g&&null==k||f.appendChild(C);x.appendChild(f);
this.container=x},CreateDialog=function(a,e,d,c,g,k,l,p,n,b,f,h,t,q,u){function w(b,f,c,m){function d(){mxEvent.addListener(q,"click",function(){var b=c;if(l){var f=v.value,h=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>h){var b=null!=b?b:B.value,m="";b==App.MODE_GOOGLE?m=a.drive.extension:b==App.MODE_GITHUB?m=a.gitHub.extension:b==App.MODE_TRELLO?m=a.trello.extension:b==App.MODE_DROPBOX?m=a.dropbox.extension:b==App.MODE_ONEDRIVE?m=a.oneDrive.extension:b==App.MODE_DEVICE&&(m=".xml");0<=h&&(f=f.substring(0,
-h));v.value=f+m}}z(c)})}var q=document.createElement("a");q.style.overflow="hidden";var t=document.createElement("img");t.src=b;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";q.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";q.className="geBaseButton";q.style.position="relative";q.style.margin="4px";q.style.padding="8px 8px 10px 8px";q.style.whiteSpace="nowrap";q.appendChild(t);mxClient.IS_QUIRKS&&(q.style.cssFloat=
+h));v.value=f+m}}y(c)})}var q=document.createElement("a");q.style.overflow="hidden";var t=document.createElement("img");t.src=b;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";q.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";q.className="geBaseButton";q.style.position="relative";q.style.margin="4px";q.style.padding="8px 8px 10px 8px";q.style.whiteSpace="nowrap";q.appendChild(t);mxClient.IS_QUIRKS&&(q.style.cssFloat=
"left",q.style.zoom="1");q.style.color="gray";q.style.fontSize="11px";var u=document.createElement("div");q.appendChild(u);mxUtils.write(u,f);if(null!=m&&null==a[m]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var w=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});w.spin(q);var g=window.setTimeout(function(){null==a[m]&&(w.stop(),q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=a[m]&&(window.clearTimeout(g),mxUtils.setOpacity(u,100),t.style.visibility="",w.stop(),d())}))}else d();x.appendChild(q);++C==h&&(mxUtils.br(x),C=0)}function z(b){var f=v.value;if(null==b||null!=f&&0<f.length)a.hideDialog(),d(f,b)}l=null!=l?l:!0;p=null!=p?p:!0;h=null!=h?h:4;var A=document.createElement("div");null==c&&a.addLanguageMenu(A);var m=document.createElement("h2");mxUtils.write(m,g||mxResources.get("create"));m.style.marginTop="0px";m.style.marginBottom="24px";A.appendChild(m);
+function(){null!=a[m]&&(window.clearTimeout(g),mxUtils.setOpacity(u,100),t.style.visibility="",w.stop(),d())}))}else d();x.appendChild(q);++C==h&&(mxUtils.br(x),C=0)}function y(b){var f=v.value;if(null==b||null!=f&&0<f.length)a.hideDialog(),d(f,b)}l=null!=l?l:!0;p=null!=p?p:!0;h=null!=h?h:4;var A=document.createElement("div");null==c&&a.addLanguageMenu(A);var m=document.createElement("h2");mxUtils.write(m,g||mxResources.get("create"));m.style.marginTop="0px";m.style.marginBottom="24px";A.appendChild(m);
mxUtils.write(A,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",e);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};A.appendChild(v);null!=t&&null!=q&&"image/"==q.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==q&&mxClient.IS_SVG?(g=document.createElement("div"),
g.innerHTML=mxUtils.trim(t),t=g.getElementsByTagName("svg")[0],q=parseInt(t.getAttribute("width")),u=parseInt(t.getAttribute("height")),t.setAttribute("viewBox","0 0 "+q+" "+u),t.setAttribute("width","120px"),t.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src","data:"+q+(u?";base64,":";utf8,")+t)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),
-A.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){z("_blank")})));mxUtils.br(A);var x=document.createElement("div");x.style.textAlign="center";var C=0;x.style.marginTop="6px";A.appendChild(x);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),
+A.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){y("_blank")})));mxUtils.br(A);var x=document.createElement("div");x.style.textAlign="center";var C=0;x.style.marginTop="6px";A.appendChild(x);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),
B.appendChild(g),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),B.appendChild(g),a.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),
g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),B.appendChild(g),a.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),B.appendChild(g),w(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&
(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),B.appendChild(g),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),B.appendChild(g),a.mode!=App.MODE_DEVICE&&p||g.setAttribute("selected",
"selected"),f&&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")),B.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!=b&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(b)}),g.className="geBtn",p.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&p.appendChild(g);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),t.className="geBtn",p.appendChild(t));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),
-function(){z("_blank")}),n.className="geBtn",p.appendChild(n));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){z(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",p.appendChild(k));a.editor.cancelFirst||p.appendChild(g);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?z(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});A.appendChild(p);this.container=A},PopupDialog=function(a,e,d,c,g){g=null!=g?g:!0;var k=document.createElement("div");
+null!=b&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(b)}),g.className="geBtn",p.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&p.appendChild(g);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),t.className="geBtn",p.appendChild(t));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),
+function(){y("_blank")}),n.className="geBtn",p.appendChild(n));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){y(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",p.appendChild(k));a.editor.cancelFirst||p.appendChild(g);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});A.appendChild(p);this.container=A},PopupDialog=function(a,e,d,c,g){g=null!=g?g:!0;var k=document.createElement("div");
k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=c&&c()});l.className="geBtn";l.style.marginBottom="8px";l.style.width="280px";k.appendChild(l);mxUtils.br(k);var p=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=d&&d();a.openLink(e,null,!0)});p.className="geBtn gePrimaryBtn";p.style.width=l.style.width;k.appendChild(p);
mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,e,d,c,g,k){k=null!=k?k:!0;var l=a.editor.graph,p=document.createElement("div");mxUtils.write(p,e);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 n=document.createElement("input");
n.setAttribute("value",d);n.setAttribute("type","text");n.setAttribute("spellcheck","false");n.setAttribute("autocorrect","off");n.setAttribute("autocomplete","off");n.setAttribute("autocapitalize","off");n.style.marginTop="6px";n.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";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(){n.value="";n.focus()});e.appendChild(n);e.appendChild(d);p.appendChild(e);var b=function(b,f,h,d){var e="data:"==b.substring(0,5);!a.isOffline()||
-e&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(m){a.spinner.stop();a.hideDialog();var v=!1===d?1:null!=f&&null!=h?Math.max(f/m.width,h/m.height):Math.min(1,Math.min(520/m.width,520/m.height));k&&(b=a.convertDataUri(b));c(b,Math.round(Number(m.width)*v),Math.round(Number(m.height)*v))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),
+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(){n.value="";n.focus()});e.appendChild(n);e.appendChild(d);p.appendChild(e);var b=function(b,f,h,d){var q="data:"==b.substring(0,5);!a.isOffline()||
+q&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(m){a.spinner.stop();a.hideDialog();var v=!1===d?1:null!=f&&null!=h?Math.max(f/m.width,h/m.height):Math.min(1,Math.min(520/m.width,520/m.height));k&&(b=a.convertDataUri(b));c(b,Math.round(Number(m.width)*v),Math.round(Number(m.height)*v))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),
c(b)):(b=a.convertDataUri(b),f=null==f?120:f,h=null==h?100:h,a.hideDialog(),c(b,f,h))},f=function(f,h){if(null!=f){var d=g?null:l.getModel().getGeometry(l.getSelectionCell());null!=d?b(f,d.width,d.height,h):b(f,null,null,h)}else a.hideDialog(),c(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=p.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(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.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,h,d,e,q,t){f(a,t)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
+a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.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,h,d,q,e,t){f(a,t)},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 h=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&f(decodeURIComponent(h))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";
a.editor.cancelFirst&&d.appendChild(e);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&&(n.value=a.url));n.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(b){a.importFiles(h.files,0,0,a.maxImageSize,function(a,b,c,h,m,v){f(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 t=mxUtils.button(mxResources.get("open"),function(){h.click()});t.className="geBtn";d.appendChild(t)}}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,11)&&"data:image/svg"!=n.value.substring(0,14)&&(t=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,n.value,function(a){n.value=a});a.showDialog(b.container,200,185,!0,!0);
@@ -7310,21 +7312,21 @@ b.init()}),t.className="geBtn",d.appendChild(t));"undefined"!=typeof google&&"un
"geBtn",d.appendChild(t),null!=a.drive&&"1"==urlParams.photos&&(t=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)}))}),t.className="geBtn",d.appendChild(t)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&f(n.value)});t=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});t.className="geBtn gePrimaryBtn";d.appendChild(t);a.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.backgroundPosition=
"center 65%",p.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),p.appendChild(e));p.appendChild(d);this.container=p},LinkDialog=function(a,e,d,c,g){function k(a,b,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(b);z.appendChild(f)}var l=document.createElement("div");mxUtils.write(l,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 n=document.createElement("input");
+b.style.width="26px";b.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(b);y.appendChild(f)}var l=document.createElement("div");mxUtils.write(l,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 n=document.createElement("input");
n.setAttribute("placeholder",mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="440px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var 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(){n.value="";n.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var t=document.createElement("select");t.style.width="420px";if(g&&null!=a.pages){null!=e&&"data:page/id,"==e.substring(0,13)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(n.setAttribute("value",e),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.style.width="420px";p.appendChild(f);p.appendChild(n);p.appendChild(b);mxUtils.br(p);p.appendChild(h);g=!1;for(b=0;b<a.pages.length;b++){var q=
document.createElement("option");mxUtils.write(q,a.pages[b].getName()||mxResources.get("pageWithNumber",[b+1]));q.setAttribute("value","data:page/id,"+a.pages[b].getId());e==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);t.appendChild(q)}if(!g&&h.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");t.appendChild(u);mxEvent.addListener(t,
"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}p.appendChild(t)}else n.setAttribute("value",e),p.appendChild(n),p.appendChild(b);l.appendChild(p);var w=mxUtils.button(d,function(){a.hideDialog();c(h.checked?"pageNotFound"!==t.value?t.value:e:n.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){h.checked?t.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(t,"focus",function(){f.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});mxEvent.addListener(n,"focus",function(){h.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var b=l.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(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.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")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");
-z.style.marginTop="20px";z.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&z.appendChild(d);p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});p.style.verticalAlign="middle";p.className="geBtn";z.appendChild(p);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=
+mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.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")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");
+y.style.marginTop="20px";y.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&y.appendChild(d);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||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&
(b="https://drive.google.com/#folders/"+a.docs[0].id);n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(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,f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(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(f).addView(c).addView(h).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){n.value=a[0].link;n.focus()}})});null!=
a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){n.value=b.value[0].webUrl;n.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],f=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+f+"/blob/"+c+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),
-c(h.checked?t.value:n.value,LinkDialog.selectedDocs))});z.appendChild(w);a.editor.cancelFirst||z.appendChild(d);l.appendChild(z);this.container=l},AboutDialog=function(a){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):
+c(h.checked?t.value:n.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(d);l.appendChild(y);this.container=l},AboutDialog=function(a){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):
(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));e.appendChild(d);mxUtils.br(e);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";e.appendChild(d);mxUtils.br(e);mxUtils.br(e);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';
e.appendChild(d);mxEvent.addListener(e,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=e},FeedbackDialog=function(a){var e=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");e.appendChild(d);var c=document.createElement("input");
c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(l.checked?"\nDiagram:\n"+a.getFileData():"")+"\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(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
@@ -7334,36 +7336,36 @@ mxEvent.addListener(c,"change",function(){0<c.value.length&&0<k.test(c.value)?g.
e.appendChild(n);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst?(d.appendChild(p),d.appendChild(g)):(d.appendChild(g),d.appendChild(p));e.appendChild(d);this.container=e};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,e,d){var c=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));c.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";c.appendChild(k);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.setEnabled(!1);p.setPanning(!0);p.panningHandler.ignoreCell=!0;p.panningHandler.useLeftButtonForPanning=!0;p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;var n=0,b=null,f=0,h=p.getGlobalVariable;p.getGlobalVariable=function(a){return"page"==a&&null!=b&&null!=b[f]?b[f].getAttribute("name"):"pagenumber"==a?f+1:h.apply(this,arguments)};p.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-p.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(p.container)}));var t=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%"}),q=a.getCurrentFile(),u=null,w=null,z=null,A=null,m=mxUtils.button("",function(){null!=z&&p.zoomIn()});m.className="geSprite geSprite-zoomin";m.setAttribute("title",mxResources.get("zoomIn"));
-m.style.outline="none";m.style.border="none";m.style.margin="2px";m.setAttribute("disabled","disabled");mxUtils.setOpacity(m,20);var v=mxUtils.button("",function(){null!=z&&p.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var x=mxUtils.button("",function(){null!=z&&(p.maxFitScale=8,p.fit(8),p.center())});x.className=
-"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var C=mxUtils.button("",function(){null!=z&&(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");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!=z){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,f=mxUtils.getXml(z.documentElement);a.isLocalFileSave()?a.saveLocalFile(f,b,"text/xml"):
-(f="undefined"===typeof pako?"&xml="+encodeURIComponent(f):"&data="+encodeURIComponent(a.editor.graph.compress(f)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+f)).simulate(document,"_blank"))}});H.className="geBtn";H.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=A&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(A):a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(A);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.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 L=null;mxEvent.addListener(F,"change",function(a){null!=
-L&&(L(a),mxEvent.consume(a))});var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),window.openWindow(a.getUrl()))});y.className="geBtn";y.setAttribute("disabled","disabled");null!=d&&(y.style.display="none");var D=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});D.className="geBtn gePrimaryBtn";D.setAttribute("disabled",
-"disabled");null!=d&&(D.style.display="none",E.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var G=document.createElement("div");G.className="geToolbarContainer";G.style.backgroundColor="transparent";G.style.padding="2px";G.style.border="none";G.style.left="199px";G.style.top="442px";var M=null;if(null!=e&&0<e.length){l.style.cursor="move";var J=document.createElement("table");J.style.border=
+p.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(p.container)}));var t=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%"}),q=a.getCurrentFile(),u=null,w=null,y=null,A=null,m=mxUtils.button("",function(){null!=y&&p.zoomIn()});m.className="geSprite geSprite-zoomin";m.setAttribute("title",mxResources.get("zoomIn"));
+m.style.outline="none";m.style.border="none";m.style.margin="2px";m.setAttribute("disabled","disabled");mxUtils.setOpacity(m,20);var v=mxUtils.button("",function(){null!=y&&p.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var x=mxUtils.button("",function(){null!=y&&(p.maxFitScale=8,p.fit(8),p.center())});x.className=
+"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,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");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 F=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,f=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?a.saveLocalFile(f,b,"text/xml"):
+(f="undefined"===typeof pako?"&xml="+encodeURIComponent(f):"&data="+encodeURIComponent(a.editor.graph.compress(f)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+f)).simulate(document,"_blank"))}});F.className="geBtn";F.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=A&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(A):a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(A);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.setAttribute("disabled","disabled");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var L=null;mxEvent.addListener(G,"change",function(a){null!=
+L&&(L(a),mxEvent.consume(a))});var z=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),window.openWindow(a.getUrl()))});z.className="geBtn";z.setAttribute("disabled","disabled");null!=d&&(z.style.display="none");var D=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});D.className="geBtn gePrimaryBtn";D.setAttribute("disabled",
+"disabled");null!=d&&(D.style.display="none",E.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var M=null;if(null!=e&&0<e.length){l.style.cursor="move";var J=document.createElement("table");J.style.border=
"1px solid lightGray";J.style.borderCollapse="collapse";J.style.borderSpacing="0px";J.style.width="100%";var T=document.createElement("tbody"),P=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=e.length-1;0<=S;S--){var aa=function(c){var h=new Date(c.modifiedDate),d=null;if(0<=h.getTime()){var g=function(c){t.stop();var e=mxUtils.parseXml(c),u=a.editor.extractGraphModel(e.documentElement,!0);if(null!=u){var w=function(b){null!=b&&(b=
-g(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},g=function(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,p.getModel());p.maxFitScale=1;p.fit(8);p.center();return a};F.style.display="none";F.innerHTML="";z=e;A=c;b=parseSelectFunction=null;f=0;if("mxfile"==u.nodeName){e=u.getElementsByTagName("diagram");b=[];for(c=0;c<e.length;c++)b.push(e[c]);
-f=Math.min(n,b.length-1);0<b.length&&w(b[f]);if(1<b.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<b.length;c++)e=document.createElement("option"),mxUtils.write(e,b[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);L=function(){f=n=parseInt(F.value);w(b[n])}}else g(u);B.innerHTML="";mxUtils.write(B,h.toLocaleDateString()+" "+h.toLocaleTimeString());B.setAttribute("title",d.getAttribute("title"));
-m.removeAttribute("disabled");v.removeAttribute("disabled");x.removeAttribute("disabled");C.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),H.removeAttribute("disabled"),D.removeAttribute("disabled"),y.removeAttribute("disabled"));mxUtils.setOpacity(m,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(C,60)}else F.style.display="none",F.innerHTML="",B.innerHTML="",mxUtils.write(B,mxResources.get("errorLoadingFile"))},
+g(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},g=function(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,p.getModel());p.maxFitScale=1;p.fit(8);p.center();return a};G.style.display="none";G.innerHTML="";y=e;A=c;b=parseSelectFunction=null;f=0;if("mxfile"==u.nodeName){e=u.getElementsByTagName("diagram");b=[];for(c=0;c<e.length;c++)b.push(e[c]);
+f=Math.min(n,b.length-1);0<b.length&&w(b[f]);if(1<b.length)for(G.removeAttribute("disabled"),G.style.display="",c=0;c<b.length;c++)e=document.createElement("option"),mxUtils.write(e,b[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),G.appendChild(e);L=function(){f=n=parseInt(G.value);w(b[n])}}else g(u);B.innerHTML="";mxUtils.write(B,h.toLocaleDateString()+" "+h.toLocaleTimeString());B.setAttribute("title",d.getAttribute("title"));
+m.removeAttribute("disabled");v.removeAttribute("disabled");x.removeAttribute("disabled");C.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),F.removeAttribute("disabled"),D.removeAttribute("disabled"),z.removeAttribute("disabled"));mxUtils.setOpacity(m,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(C,60)}else G.style.display="none",G.innerHTML="",B.innerHTML="",mxUtils.write(B,mxResources.get("errorLoadingFile"))},
d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===P?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());d.appendChild(k);d.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
-(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){w!=c&&(t.stop(),null!=u&&(u.style.backgroundColor=""),w=c,u=d,u.style.backgroundColor="#ebf2f9",A=z=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",p.getModel().clear(),E.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),C.setAttribute("disabled",
-"disabled"),x.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(m,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(C,20),t.spin(l),c.getXml(function(a){w==c&&g(a)},function(a){t.stop();F.style.display="none";F.innerHTML="";B.innerHTML="";mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){D.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(d)}return d}(e[S]);null!=aa&&S==e.length-1&&(M=aa)}J.appendChild(T);k.appendChild(J)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(l.style.display="none",G.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(l.style.display="none",G.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";G.appendChild(F);G.appendChild(m);G.appendChild(v);G.appendChild(C);G.appendChild(x);a.editor.cancelFirst?(g.appendChild(k),g.appendChild(H),g.appendChild(y),g.appendChild(E),g.appendChild(D)):(g.appendChild(H),g.appendChild(y),g.appendChild(E),g.appendChild(D),g.appendChild(k));c.appendChild(g);c.appendChild(G);c.appendChild(B);this.container=
+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){w!=c&&(t.stop(),null!=u&&(u.style.backgroundColor=""),w=c,u=d,u.style.backgroundColor="#ebf2f9",A=y=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",p.getModel().clear(),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),C.setAttribute("disabled",
+"disabled"),x.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(m,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(C,20),t.spin(l),c.getXml(function(a){w==c&&g(a)},function(a){t.stop();G.style.display="none";G.innerHTML="";B.innerHTML="";mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){D.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(d)}return d}(e[S]);null!=aa&&S==e.length-1&&(M=aa)}J.appendChild(T);k.appendChild(J)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(l.style.display="none",H.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(l.style.display="none",H.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";H.appendChild(G);H.appendChild(m);H.appendChild(v);H.appendChild(C);H.appendChild(x);a.editor.cancelFirst?(g.appendChild(k),g.appendChild(F),g.appendChild(z),g.appendChild(E),g.appendChild(D)):(g.appendChild(F),g.appendChild(z),g.appendChild(E),g.appendChild(D),g.appendChild(k));c.appendChild(g);c.appendChild(H);c.appendChild(B);this.container=
c},DraftDialog=function(a,e,d,c,g,k,l,p){var n=document.createElement("div"),b=document.createElement("div");b.style.marginTop="0px";b.style.whiteSpace="nowrap";b.style.overflow="auto";mxUtils.write(b,e);n.appendChild(b);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var h=new Graph(f);
h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;e=mxUtils.parseXml(d);var t=a.editor.extractGraphModel(e.documentElement,!0),q=0,u=null,w=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[q]?u[q].getAttribute("name"):"pagenumber"==a?q+1:w.apply(this,arguments)};h.getLinkForCell=function(){return null};e=mxUtils.button("",function(){h.zoomIn()});e.className=
"geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){h.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);b=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});b.className="geSprite geSprite-fit";b.setAttribute("title",
-mxResources.get("fit"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);var z=mxUtils.button("",function(){h.zoomActual();h.center()});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";mxUtils.setOpacity(z,60);g=mxUtils.button(l||mxResources.get("discard"),g);g.className="geBtn";var A=document.createElement("select");A.style.maxWidth="80px";A.style.position=
+mxResources.get("fit"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);var y=mxUtils.button("",function(){h.zoomActual();h.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);g=mxUtils.button(l||mxResources.get("discard"),g);g.className="geBtn";var A=document.createElement("select");A.style.maxWidth="80px";A.style.position=
"relative";A.style.top="-2px";A.style.verticalAlign="bottom";A.style.marginRight="6px";A.style.display="none";c=mxUtils.button(k||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.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";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function c(f){null!=f&&(f=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(f))).documentElement));return f}mxEvent.addListener(A,"change",function(a){q=parseInt(A.value);c(u[q]);mxEvent.consume(a)});if("mxfile"==t.nodeName){var d=t.getElementsByTagName("diagram");
-u=[];for(var e=0;e<d.length;e++)u.push(d[e]);0<u.length&&c(u[q]);if(1<u.length)for(A.style.display="",e=0;e<u.length;e++)d=document.createElement("option"),mxUtils.write(d,u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==q&&d.setAttribute("selected","selected"),A.appendChild(d)}else b(t)};l.appendChild(A);l.appendChild(e);l.appendChild(d);l.appendChild(z);l.appendChild(b);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.className=
+u=[];for(var e=0;e<d.length;e++)u.push(d[e]);0<u.length&&c(u[q]);if(1<u.length)for(A.style.display="",e=0;e<u.length;e++)d=document.createElement("option"),mxUtils.write(d,u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==q&&d.setAttribute("selected","selected"),A.appendChild(d)}else b(t)};l.appendChild(A);l.appendChild(e);l.appendChild(d);l.appendChild(y);l.appendChild(b);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.className=
"geBtn";p=null!=p?mxUtils.button(mxResources.get("ignore"),p):null;null!=p&&(p.className="geBtn");a.editor.cancelFirst?(k.appendChild(e),null!=p&&k.appendChild(p),k.appendChild(g),k.appendChild(c)):(k.appendChild(c),k.appendChild(g),null!=p&&k.appendChild(p),k.appendChild(e));n.appendChild(k);n.appendChild(l);this.container=n},FindWindow=function(a,e,d,c,g){function k(a,b,f){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var c=0;c<b.length;c++)if("label"!=b[c].nodeName){var h=
mxUtils.trim(b[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&h.substring(0,f.length)===f||null!=a&&a.test(h))return!0}}return!1}function l(){var a=n.model.getDescendants(n.model.getRoot()),c=t.value.toLowerCase(),h=q.checked?new RegExp(c):null,v=null;b!=c&&(b=c,f=null);var d=null==f;if(0<c.length)for(var e=0;e<a.length;e++){var w=n.view.getState(a[e]);if(null!=w&&null!=w.cell.value&&(d||null==v)&&(n.model.isVertex(w.cell)||n.model.isEdge(w.cell))&&(n.isHtmlLabel(w.cell)?
(u.innerHTML=n.getLabel(w.cell),label=mxUtils.extractTextWithWhitespace([u])):label=n.getLabel(w.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==h&&(label.substring(0,c.length)===c||k(h,w.cell,c))||null!=h&&(h.test(label)||k(h,w.cell,c))))if(d){v=w;break}else null==v&&(v=w);d=d||w==f}null!=v?(f=v,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==c.length||null!=v}
var p=a.actions.get("find"),n=a.editor.graph,b=null,f=null,h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("find"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width="200px";t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";h.appendChild(t);mxUtils.br(h);var q=document.createElement("input");
q.setAttribute("type","checkbox");q.style.marginRight="4px";h.appendChild(q);mxUtils.write(h,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(h);var w=mxUtils.button(mxResources.get("reset"),function(){t.value="";t.style.backgroundColor="";b=f=null;t.focus()});w.setAttribute("title",mxResources.get("reset"));w.style.marginTop="6px";w.style.marginRight="4px";w.className="geBtn";h.appendChild(w);w=mxUtils.button(mxResources.get("find"),function(){try{t.style.backgroundColor=
-l()?"":"#ffcfcf"}catch(z){a.handleError(z)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.className="geBtn gePrimaryBtn";h.appendChild(w);mxEvent.addListener(t,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)p.funct();else if(b!=t.value.toLowerCase()||13==a.keyCode)try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(A){t.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"keydown",function(b){70==b.keyCode&&
+l()?"":"#ffcfcf"}catch(y){a.handleError(y)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.className="geBtn gePrimaryBtn";h.appendChild(w);mxEvent.addListener(t,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)p.funct();else if(b!=t.value.toLowerCase()||13==a.keyCode)try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(A){t.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"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"),h,e,d,c,g,!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)):n.container.focus()}))},
TagsWindow=function(a,e,d,c,g){var k=a.editor.graph,l="tags",p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding="10px";p.style.height="100%";var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("allTags"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.width="260px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";p.appendChild(n);if(!a.isOffline()||mxClient.IS_CHROMEAPP){n.style.width=
"240px";var b=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");b.firstChild.style.marginBottom="6px";b.style.marginLeft="6px";p.appendChild(b)}mxEvent.addListener(n,"dblclick",function(){var b=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(p);
@@ -7381,9 +7383,9 @@ mxUtils.write(c," "+b.title);f.appendChild(c);var d=function(a){if(null==a||"INP
b.image+'"/>':null==b.desc&&(h.style.padding="20px",h.style.color="rgb(179, 179, 179)",mxUtils.write(h,mxResources.get("noPreview")));null!=t&&(t.style.backgroundColor="");t=c;t.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",d);mxEvent.addListener(c,"dblclick",function(a){m.checked=!m.checked;mxEvent.consume(a)});q.push(function(){return m.checked?b.id:null});0==k&&0==v&&d()})(b.entries[v])})(d[k]);c.style.padding="30px";c.appendChild(n);
c.appendChild(f);c.appendChild(h);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=n.style.width,d.style.paddingTop="12px");var w=document.createElement("input");w.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),
n.style.paddingRight="20px",n.appendChild(w),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),w.checked=!0,w.defaultChecked=!0,mxEvent.addListener(n,"click",function(a){mxEvent.getSource(a)!=w&&(w.checked=!w.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(n.style.position="relative",n.style.top="-6px"),d.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=
-[],f=0;f<q.length;f++){var c=q[f].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});e.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";p=document.createElement("tr");z.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),l=document.createElement("td"),A=mxUtils.bind(this,function(b,f,c){var h=document.createElement("input");
-h.type="checkbox";z.appendChild(h);h.checked=a.sidebar.isEntryVisible(c);var v=document.createElement("span");mxUtils.write(v,f);f=document.createElement("div");f.style.display="block";f.appendChild(h);f.appendChild(v);mxEvent.addListener(v,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});b.appendChild(f);return function(){return h.checked?c:null}});p.appendChild(e);p.appendChild(g);p.appendChild(l);n.appendChild(p);z.appendChild(n);for(var q=[],m=0,k=0;k<d.length;k++)for(n=0;n<d[k].entries.length;n++)m++;
-for(var v=[e,g,l],x=0,k=0;k<d.length;k++)(function(a){for(var b=0;b<a.entries.length;b++){var f=a.entries[b];q.push(A(v[Math.floor(x/(m/3))],f.title,f.id));x++}})(d[k]);c.appendChild(z);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,d.appendChild(w),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),d.appendChild(n),
+[],f=0;f<q.length;f++){var c=q[f].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});e.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table"),n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";p=document.createElement("tr");y.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),l=document.createElement("td"),A=mxUtils.bind(this,function(b,f,c){var h=document.createElement("input");
+h.type="checkbox";y.appendChild(h);h.checked=a.sidebar.isEntryVisible(c);var v=document.createElement("span");mxUtils.write(v,f);f=document.createElement("div");f.style.display="block";f.appendChild(h);f.appendChild(v);mxEvent.addListener(v,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});b.appendChild(f);return function(){return h.checked?c:null}});p.appendChild(e);p.appendChild(g);p.appendChild(l);n.appendChild(p);y.appendChild(n);for(var q=[],m=0,k=0;k<d.length;k++)for(n=0;n<d[k].entries.length;n++)m++;
+for(var v=[e,g,l],x=0,k=0;k<d.length;k++)(function(a){for(var b=0;b<a.entries.length;b++){var f=a.entries[b];q.push(A(v[Math.floor(x/(m/3))],f.title,f.id));x++}})(d[k]);c.appendChild(y);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,d.appendChild(w),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),d.appendChild(n),
mxEvent.addListener(n,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));c.appendChild(d);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],f=0;f<q.length;f++){var c=q[f].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length?b.join(";"):"",w.checked);a.hideDialog()});e.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";
d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(n),d.appendChild(e)):(d.appendChild(e),d.appendChild(n));c.appendChild(d);this.container=c},PluginsDialog=function(a){function e(){if(0==g.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var b=0;b<g.length;b++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var d=document.createElement("span");d.className="geSprite geSprite-delete";d.style.position="relative";d.style.cursor="pointer";d.style.top=
"5px";d.style.marginRight="4px";d.style.display="inline-block";h.appendChild(d);mxUtils.write(h,g[b]);c.appendChild(h);mxUtils.br(c);mxEvent.addListener(d,"click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);e()})}}(b))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var g=mxSettings.getPlugins().slice();d.appendChild(c);e();var k=mxUtils.button(mxResources.get("add"),
@@ -7393,32 +7395,32 @@ function(){var b="",c=urlParams.p;if(null!=c&&0<c.length){for(var d=c.split(";")
document.createElement("td");p.style.whiteSpace="nowrap";p.setAttribute("colspan","2");mxUtils.write(p,mxResources.get("loading")+"...");l.appendChild(p);k.appendChild(l);var l=document.createElement("tr"),n=document.createElement("td"),b=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};b.appendChild(f);
l.appendChild(n);l.appendChild(b);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";b.appendChild(h);l.appendChild(n);l.appendChild(b);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var t=
document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";b.appendChild(t);l.appendChild(n);l.appendChild(b);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("bottom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";b.appendChild(q);l.appendChild(n);l.appendChild(b);k.appendChild(l);l=document.createElement("tr");
-n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");l.appendChild(n);var u=document.createElement("input");u.setAttribute("type","checkbox");b.appendChild(u);l.appendChild(b);k.appendChild(l);g.appendChild(k);c.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,z=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),v=w.width,
-e=w.height,g=parseInt(f.value),k=parseInt(h.value),v=Math.max(1,v-g-parseInt(t.value)),e=Math.max(1,e-k-parseInt(q.value));b.width=v;b.height=e;u.checked&&(c.fillStyle="#000000",c.arc(v/2,e/2,Math.min(v/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,g,k,v,e,0,0,v,e);d(b.toDataURL())});z.setAttribute("disabled","disabled");w.onload=function(){z.removeAttribute("disabled");p.innerHTML="";mxUtils.write(p,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+
-": "+w.height)};w.src=e;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&z.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(g),e.appendChild(z)):(e.appendChild(z),e.appendChild(g));c.appendChild(e);this.container=c},EditGeometryDialog=function(a,e){var d=a.editor.graph,c=1==e.length?d.getCellGeometry(e[0]):null,g=document.createElement("div"),k=document.createElement("table"),l=document.createElement("tbody"),
+n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");l.appendChild(n);var u=document.createElement("input");u.setAttribute("type","checkbox");b.appendChild(u);l.appendChild(b);k.appendChild(l);g.appendChild(k);c.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),v=w.width,
+e=w.height,g=parseInt(f.value),k=parseInt(h.value),v=Math.max(1,v-g-parseInt(t.value)),e=Math.max(1,e-k-parseInt(q.value));b.width=v;b.height=e;u.checked&&(c.fillStyle="#000000",c.arc(v/2,e/2,Math.min(v/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,g,k,v,e,0,0,v,e);d(b.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=e;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&y.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(g),e.appendChild(y)):(e.appendChild(y),e.appendChild(g));c.appendChild(e);this.container=c},EditGeometryDialog=function(a,e){var d=a.editor.graph,c=1==e.length?d.getCellGeometry(e[0]):null,g=document.createElement("div"),k=document.createElement("table"),l=document.createElement("tbody"),
p=document.createElement("tr"),n=document.createElement("td"),b=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=c&&c.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};b.appendChild(f);p.appendChild(n);p.appendChild(b);l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");
mxUtils.write(n,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=c?c.x:"";b.appendChild(h);p.appendChild(n);p.appendChild(b);l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:"";b.appendChild(t);p.appendChild(n);
p.appendChild(b);l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c&&null!=c.offset?c.offset.x:"";b.appendChild(q);p.appendChild(n);p.appendChild(b);l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+
":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c&&null!=c.offset?c.offset.y:"";b.appendChild(u);p.appendChild(n);p.appendChild(b);l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=c?c.width:"";b.appendChild(w);p.appendChild(n);p.appendChild(b);
-l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=c?c.height:"";b.appendChild(z);p.appendChild(n);p.appendChild(b);l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var A=document.createElement("input");
+l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=c?c.height:"";b.appendChild(y);p.appendChild(n);p.appendChild(b);l.appendChild(p);p=document.createElement("tr");n=document.createElement("td");b=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var A=document.createElement("input");
A.setAttribute("type","text");A.style.width="100px";A.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";b.appendChild(A);p.appendChild(n);p.appendChild(b);l.appendChild(p);k.appendChild(l);g.appendChild(k);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var b=0;b<e.length;b++){var c=d.getCellGeometry(e[b]);null!=
-c&&(c=c.clone(),d.isCellMovable(e[b])&&(c.relative=f.checked,0<mxUtils.trim(h.value).length&&(c.x=Number(h.value)),0<mxUtils.trim(t.value).length&&(c.y=Number(t.value)),0<mxUtils.trim(q.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.x=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.y=Number(u.value))),d.isCellResizable(e[b])&&(0<mxUtils.trim(w.value).length&&(c.width=Number(w.value)),0<mxUtils.trim(z.value).length&&(c.height=Number(z.value))),
+c&&(c=c.clone(),d.isCellMovable(e[b])&&(c.relative=f.checked,0<mxUtils.trim(h.value).length&&(c.x=Number(h.value)),0<mxUtils.trim(t.value).length&&(c.y=Number(t.value)),0<mxUtils.trim(q.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.x=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.y=Number(u.value))),d.isCellResizable(e[b])&&(0<mxUtils.trim(w.value).length&&(c.width=Number(w.value)),0<mxUtils.trim(y.value).length&&(c.height=Number(y.value))),
d.getModel().setGeometry(e[b],c));0<mxUtils.trim(A.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[e[b]])}}finally{d.getModel().endUpdate()}});m.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&m.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(c),k.appendChild(m)):(k.appendChild(m),k.appendChild(c));g.appendChild(k);this.container=g},LibraryDialog=function(a,
e,d,c,g,k){function l(b){for(b=document.elementFromPoint(b.clientX,b.clientY);null!=b&&b.parentNode!=q;)b=b.parentNode;var a=null;if(null!=b)for(var c=q.firstChild,a=0;null!=c&&c!=b;)c=c.nextSibling,a++;return a}function p(b,c,h,d,e,t,g,k,C){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==w[b]){var A=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=M.title&&0<M.title.length?M.title:mxResources.get("untitled"));
-D.style.color=null==M.title||0==M.title.length?"#d0d0d0":""};q.style.backgroundImage="";u.style.display="none";var y=e,B=t;if(e>a.maxImageSize||t>a.maxImageSize){var n=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,t));e*=n;t*=n}y>B?(B=Math.round(100*B/y),y=100):(y=Math.round(100*y/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 E=document.createElement("img");E.setAttribute("src",v.convert(b));E.style.width=y+"px";E.style.height=B+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-B)/2)+"px";E.style.paddingLeft=Math.floor((100-y)/2)+"px";H.appendChild(E)}else if(null!=g){var F=a.stringToCells(a.editor.graph.decompress(g.xml));0<F.length&&(a.sidebar.createThumb(F,100,100,H,null,!0,!1),H.firstChild.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block",H.firstChild.style.cursor="")}var G=document.createElement("img");G.setAttribute("src",Editor.closeImage);G.setAttribute("border","0");G.setAttribute("title",mxResources.get("delete"));G.setAttribute("align","top");G.style.paddingTop="4px";G.style.position="absolute";G.style.marginLeft="-12px";G.style.zIndex="1";G.style.cursor="pointer";mxEvent.addListener(G,"dragstart",function(b){mxEvent.consume(b)});(function(b,a,c){mxEvent.addListener(G,"click",function(h){w[a]=null;for(var v=
-0;v<f.length;v++)if(null!=f[v].data&&f[v].data==a||null!=f[v].xml&&null!=c&&f[v].xml==c.xml){f.splice(v,1);break}H.parentNode.removeChild(b);0==f.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(h)});mxEvent.addListener(G,"dblclick",function(b){mxEvent.consume(b)})})(H,b,g);H.appendChild(G);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 M=null;null!=b?(M={data:b,w:e,h:t,title:C},null!=k&&(M.aspect=k),w[b]=E,f.push(M)):null!=g&&(g.aspect="fixed",f.push(g),M=g);mxEvent.addListener(D,"keydown",function(b){13==b.keyCode&&null!=m&&(m(),m=null,mxEvent.consume(b))});A();H.appendChild(D);mxEvent.addListener(D,"mousedown",function(b){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(b)});F=function(b){if(mxClient.IS_IOS||
+D.style.color=null==M.title||0==M.title.length?"#d0d0d0":""};q.style.backgroundImage="";u.style.display="none";var z=e,B=t;if(e>a.maxImageSize||t>a.maxImageSize){var n=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,t));e*=n;t*=n}z>B?(B=Math.round(100*B/z),z=100):(z=Math.round(100*z/B),B=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move";
+mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",v.convert(b));E.style.width=z+"px";E.style.height=B+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-B)/2)+"px";E.style.paddingLeft=Math.floor((100-z)/2)+"px";F.appendChild(E)}else if(null!=g){var G=a.stringToCells(a.editor.graph.decompress(g.xml));0<G.length&&(a.sidebar.createThumb(G,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS?
+"inline":"inline-block",F.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border","0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.position="absolute";H.style.marginLeft="-12px";H.style.zIndex="1";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(b){mxEvent.consume(b)});(function(b,a,c){mxEvent.addListener(H,"click",function(h){w[a]=null;for(var v=
+0;v<f.length;v++)if(null!=f[v].data&&f[v].data==a||null!=f[v].xml&&null!=c&&f[v].xml==c.xml){f.splice(v,1);break}F.parentNode.removeChild(b);0==f.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(h)});mxEvent.addListener(H,"dblclick",function(b){mxEvent.consume(b)})})(F,b,g);F.appendChild(H);F.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 M=null;null!=b?(M={data:b,w:e,h:t,title:C},null!=k&&(M.aspect=k),w[b]=E,f.push(M)):null!=g&&(g.aspect="fixed",f.push(g),M=g);mxEvent.addListener(D,"keydown",function(b){13==b.keyCode&&null!=m&&(m(),m=null,mxEvent.consume(b))});A();F.appendChild(D);mxEvent.addListener(D,"mousedown",function(b){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(b)});G=function(b){if(mxClient.IS_IOS||
mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,M.title||"",mxResources.get("ok"),function(b){null!=b&&(M.title=b,A())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=m&&(m(),m=null);if(null==M.title||0==M.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);m=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";M.title=D.innerHTML;A()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",F);mxEvent.addListener(H,"dblclick",F);q.appendChild(H);mxEvent.addListener(H,"dragstart",function(a){null==b&&null!=g&&(G.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);z=l(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);G.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(H,"dragend",function(b){"hidden"==G.style.visibility&&(G.style.visibility="",D.style.visibility="");z=null;mxUtils.setOpacity(H,100);mxUtils.setPrefixedStyle(H.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),y=mxUtils.parseXml(b),"mxlibrary"==
-y.documentElement.nodeName){B=JSON.parse(mxUtils.getTextContent(y.documentElement));if(null!=B&&0<B.length)for(var J=0;J<B.length;J++)null!=B[J].xml?p(null,null,0,0,0,0,B[J]):p(B[J].data,null,0,0,B[J].w,B[J].h,null,"fixed",B[J].title);e=!0}else if("mxfile"==y.documentElement.nodeName){for(var L=y.documentElement.getElementsByTagName("diagram"),J=0;J<L.length;J++){var B=mxUtils.getTextContent(L[J]),F=a.stringToCells(a.editor.graph.decompress(B)),V=a.editor.graph.getBoundingBoxFromGeometry(F);p(null,
-null,0,0,0,0,{xml:B,w:V.width,h:V.height})}e=!0}}catch(I){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(I){}return null}function n(b){b.dataTransfer.dropEffect=null!=z?"move":"copy";b.stopPropagation();b.preventDefault()}function b(b){b.stopPropagation();b.preventDefault();x=!1;A=l(b);if(null!=z)null!=A&&A<q.children.length?(f.splice(A>z?A-1:A,0,f.splice(z,1)[0]),q.insertBefore(q.children[z],q.children[A])):(f.push(f.splice(z,1)[0]),q.appendChild(q.children[z]));
+"true");D.focus();document.execCommand("selectAll",!1,null);m=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";M.title=D.innerHTML;A()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",G);mxEvent.addListener(F,"dblclick",G);q.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);y=l(a);mxClient.IS_GC&&(F.style.opacity="0.9");
+window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);H.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(b){"hidden"==H.style.visibility&&(H.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),z=mxUtils.parseXml(b),"mxlibrary"==
+z.documentElement.nodeName){B=JSON.parse(mxUtils.getTextContent(z.documentElement));if(null!=B&&0<B.length)for(var J=0;J<B.length;J++)null!=B[J].xml?p(null,null,0,0,0,0,B[J]):p(B[J].data,null,0,0,B[J].w,B[J].h,null,"fixed",B[J].title);e=!0}else if("mxfile"==z.documentElement.nodeName){for(var L=z.documentElement.getElementsByTagName("diagram"),J=0;J<L.length;J++){var B=mxUtils.getTextContent(L[J]),G=a.stringToCells(a.editor.graph.decompress(B)),V=a.editor.graph.getBoundingBoxFromGeometry(G);p(null,
+null,0,0,0,0,{xml:B,w:V.width,h:V.height})}e=!0}}catch(I){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(I){}return null}function n(b){b.dataTransfer.dropEffect=null!=y?"move":"copy";b.stopPropagation();b.preventDefault()}function b(b){b.stopPropagation();b.preventDefault();x=!1;A=l(b);if(null!=y)null!=A&&A<q.children.length?(f.splice(A>y?A-1:A,0,f.splice(y,1)[0]),q.insertBefore(q.children[y],q.children[A])):(f.push(f.splice(y,1)[0]),q.appendChild(q.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 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(b){p(c,null,0,0,b.width,b.height);q.scrollTop=q.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];d=document.createElement("div");
d.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";d.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==g||g.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};h.appendChild(t);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(q.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"));d.appendChild(u);var w={},z=null,A=null,m=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=m&&(m(),m=null,mxEvent.consume(b))};mxEvent.addListener(q,"mousedown",e);mxEvent.addListener(q,"pointerdown",e);mxEvent.addListener(q,"touchstart",
+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"));d.appendChild(u);var w={},y=null,A=null,m=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=m&&(m(),m=null,mxEvent.consume(b))};mxEvent.addListener(q,"mousedown",e);mxEvent.addListener(q,"pointerdown",e);mxEvent.addListener(q,"touchstart",
e);var v=new mxUrlConverter,x=!1;if(null!=c)for(e=0;e<c.length;e++)h=c[e],p(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(q,"dragleave",function(b){u.style.cursor="";for(var a=mxEvent.getSource(b);null!=a;){if(a==q||a==u){b.stopPropagation();b.preventDefault();break}a=a.parentNode}});var C=function(b){return function(c,f,h,v,m,d,e,t,x){null!=x&&(/(\.vsdx)($|\?)/i.test(x.name)||/(\.vssx)($|\?)/i.test(x.name))?a.importVisio(x,mxUtils.bind(this,function(c){a.spinner.stop();p(c,f,h,
v,m,d,e,"fixed",mxEvent.isAltDown(b)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," "))})):null!=x&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,x.name)?a.parseFile(x,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(p(c.responseText,f,h,v,m,d,e,"fixed",mxEvent.isAltDown(b)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(p(c,f,h,v,m,d,e,"fixed",mxEvent.isAltDown(b)?null:e.substring(0,
e.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",n);mxEvent.addListener(q,"drop",b);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",b);d.appendChild(q);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);h=mxUtils.button(mxResources.get("export"),
@@ -7439,24 +7441,24 @@ mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagra
var a=window.innerWidth,d=window.innerHeight,c=987,g=712;.9*a<c&&(c=Math.max(.9*a,600),e.style.width=c+"px");.9*d<g&&(g=Math.max(.9*d,300),e.style.height=g+"px");this.width=c;this.height=g;this.container=e};
TemplatesDialog.prototype.init=function(a,e,d,c,g,k,l,p,n,b){function f(){null!=E&&(E.style.fontWeight="normal",E.style.textDecoration="none",E=null)}function h(b,a,c,f,h,v,m){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+a).src="/images/"+c+"-sel.svg";C.querySelector("."+h).src="/images/"+
v+".svg";return!0}function t(b){function a(b){Z.removeChild(f);C.removeChild(c);Z.scrollTop=v}b=b.prevImgUrl||b.imgUrl||TEMPLATE_PATH+"/"+b.url.substring(0,b.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";C.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var h=document.createElement("img");h.src=b;f.appendChild(h);b=document.createElement("img");b.src="/images/close.png";b.className="geTempDlgPreviewCloseBtn";
-b.setAttribute("title",mxResources.get("close"));f.appendChild(b);var v=Z.scrollTop;mxEvent.addListener(b,"click",a);mxEvent.addListener(c,"click",a);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function q(b,a,c){if(null!=F){for(var f=F.className.split(" "),h=0;h<f.length;h++)if(-1<f[h].indexOf("Active")){f.splice(h,1);break}F.className=f.join(" ")}null!=b?(F=b,F.className+=" "+a,L=c,K.className="geTempDlgCreateBtn"):(L=F=null,K.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+b.setAttribute("title",mxResources.get("close"));f.appendChild(b);var v=Z.scrollTop;mxEvent.addListener(b,"click",a);mxEvent.addListener(c,"click",a);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function q(b,a,c){if(null!=G){for(var f=G.className.split(" "),h=0;h<f.length;h++)if(-1<f[h].indexOf("Active")){f.splice(h,1);break}G.className=f.join(" ")}null!=b?(G=b,G.className+=" "+a,L=c,K.className="geTempDlgCreateBtn"):(L=G=null,K.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
function u(c){if(null!=L){var f=L;L=null;K.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==c?b(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(e(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(b){b=b?"":"none";for(var a=C.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<a.length;c++)a[c].style.display=
-b}function z(b,a,c){function f(){K.innerHTML=a?mxResources.get("create"):mxResources.get("copy");w(!a)}P.innerHTML="";q();M=b;var h=null;if(c){h=document.createElement("table");h.className="geTempDlgDiagramsListGrid";var v=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxResources.get("diagram",null,"Diagram");v.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("changedBy",null,"Changed By");v.appendChild(m);
+b}function y(b,a,c){function f(){K.innerHTML=a?mxResources.get("create"):mxResources.get("copy");w(!a)}P.innerHTML="";q();M=b;var h=null;if(c){h=document.createElement("table");h.className="geTempDlgDiagramsListGrid";var v=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxResources.get("diagram",null,"Diagram");v.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("changedBy",null,"Changed By");v.appendChild(m);
m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");v.appendChild(m);h.appendChild(v);P.appendChild(h)}for(v=0;v<b.length;v++){b[v].isExternal=!a;var d=b[v].url,m=mxUtils.htmlEntities(b[v].title),e=b[v].tooltip||b[v].title,x=b[v].imgUrl,g=mxUtils.htmlEntities(b[v].changedBy||""),k=mxUtils.htmlEntities(b[v].lastModifiedOn||"");x||(x=TEMPLATE_PATH+"/"+d.substring(0,d.length-4)+".png");d=c?50:15;null!=m&&m.length>d&&(m=m.substring(0,
d)+"&hellip;");if(c){var C=document.createElement("tr"),x=document.createElement("td"),l=document.createElement("img");l.src="/images/icon-search.svg";l.className="geTempDlgDiagramListPreviewBtn";l.setAttribute("title",mxResources.get("preview"));x.appendChild(l);e=document.createElement("span");e.className="geTempDlgDiagramTitle";e.innerHTML=m;x.appendChild(e);C.appendChild(x);x=document.createElement("td");x.innerHTML=g;C.appendChild(x);x=document.createElement("td");x.innerHTML=k;C.appendChild(x);
-h.appendChild(C);null==F&&(f(),q(C,"geTempDlgDiagramsListGridActive",b[v]));(function(b,a){mxEvent.addListener(C,"click",function(){F!=a&&(f(),q(a,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(C,"dblclick",u);mxEvent.addListener(l,"click",function(){t(b)})})(b[v],C)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",e);null==F&&(f(),q(A,"geTempDlgDiagramTileActive",b[v]));g=document.createElement("div");g.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var z=document.createElement("img");z.style.display="none";(function(b,a){z.onload=function(){a.className="geTempDlgDiagramTileImg";b.style.display=""};z.onerror=function(){a.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(z,g);z.src=x;g.appendChild(z);A.appendChild(g);g=document.createElement("div");g.className="geTempDlgDiagramTileLbl";g.innerHTML=null!=m?m:"";A.appendChild(g);l=document.createElement("img");l.src="/images/icon-search.svg";l.className="geTempDlgDiagramPreviewBtn";
-l.setAttribute("title",mxResources.get("preview"));A.appendChild(l);(function(b,a){mxEvent.addListener(A,"click",function(){F!=a&&(f(),q(a,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",u);mxEvent.addListener(l,"click",function(){t(b)})})(b[v],A);P.appendChild(A)}}}function A(b,a){Q.innerHTML="";q();for(var c=!a&&5<b.length?5:b.length,f=0;f<c;f++){var h=b[f];h.isCategory=!0;var v=document.createElement("div"),m=mxResources.get(h.title);null==m&&(m=h.title.substring(0,1).toUpperCase()+
-h.title.substring(1));v.className="geTempDlgNewDiagramCatItem";v.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==F&&(K.innerHTML=mxResources.get("create"),w(),q(v,"geTempDlgNewDiagramCatItemActive",h));var d=document.createElement("div");d.className="geTempDlgNewDiagramCatItemImg";var e=document.createElement("img");e.src=NEW_DIAGRAM_CATS_PATH+"/"+h.img;d.appendChild(e);v.appendChild(d);d=document.createElement("div");d.className="geTempDlgNewDiagramCatItemLbl";
-d.innerHTML=m;v.appendChild(d);Q.appendChild(v);(function(b,a){mxEvent.addListener(v,"click",function(){F!=a&&(K.innerHTML=mxResources.get("create"),w(),q(a,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(v,"dblclick",u)})(h,v)}T.style.display=5>b.length?"none":""}function m(b){var a=C.querySelector(".geTemplatesList"),c;for(c in b){var f=document.createElement("div"),h=mxResources.get(c),v=b[c];null==h&&(h=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";
-f.setAttribute("title",h+" ("+v.length+")");h=mxUtils.htmlEntities(h);15<h.length&&(h=h.substring(0,15)+"&hellip;");f.innerHTML=h+" ("+v.length+")";a.appendChild(f);(function(a,c,h){mxEvent.addListener(f,"click",function(){E!=h&&(null!=E?(E.style.fontWeight="normal",E.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),E=h,E.style.fontWeight="bold",E.style.textDecoration="underline",Z.scrollTop=0,B&&(H=!0),S.innerHTML=c,aa.style.display="none",z(b[a],!0))})})(c,h,f)}}function v(b){l&&
-(Z.scrollTop=0,P.innerHTML="",U.spin(P),H=!1,B=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),J=null,l(W,b?null:k))}function x(b){f();Z.scrollTop=0;P.innerHTML="";U.spin(P);H=!1;B=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(b)+'"';p(b,W,D?null:k);J=b}c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,B=!1,H=!1,E=null,F=null,L=null,y=!1,D=!0,G=!1,M=[],J,T=C.querySelector(".geTempDlgShowAllBtn"),
+h.appendChild(C);null==G&&(f(),q(C,"geTempDlgDiagramsListGridActive",b[v]));(function(b,a){mxEvent.addListener(C,"click",function(){G!=a&&(f(),q(a,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(C,"dblclick",u);mxEvent.addListener(l,"click",function(){t(b)})})(b[v],C)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",e);null==G&&(f(),q(A,"geTempDlgDiagramTileActive",b[v]));g=document.createElement("div");g.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var y=document.createElement("img");y.style.display="none";(function(b,a){y.onload=function(){a.className="geTempDlgDiagramTileImg";b.style.display=""};y.onerror=function(){a.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,g);y.src=x;g.appendChild(y);A.appendChild(g);g=document.createElement("div");g.className="geTempDlgDiagramTileLbl";g.innerHTML=null!=m?m:"";A.appendChild(g);l=document.createElement("img");l.src="/images/icon-search.svg";l.className="geTempDlgDiagramPreviewBtn";
+l.setAttribute("title",mxResources.get("preview"));A.appendChild(l);(function(b,a){mxEvent.addListener(A,"click",function(){G!=a&&(f(),q(a,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",u);mxEvent.addListener(l,"click",function(){t(b)})})(b[v],A);P.appendChild(A)}}}function A(b,a){Q.innerHTML="";q();for(var c=!a&&5<b.length?5:b.length,f=0;f<c;f++){var h=b[f];h.isCategory=!0;var v=document.createElement("div"),m=mxResources.get(h.title);null==m&&(m=h.title.substring(0,1).toUpperCase()+
+h.title.substring(1));v.className="geTempDlgNewDiagramCatItem";v.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==G&&(K.innerHTML=mxResources.get("create"),w(),q(v,"geTempDlgNewDiagramCatItemActive",h));var d=document.createElement("div");d.className="geTempDlgNewDiagramCatItemImg";var e=document.createElement("img");e.src=NEW_DIAGRAM_CATS_PATH+"/"+h.img;d.appendChild(e);v.appendChild(d);d=document.createElement("div");d.className="geTempDlgNewDiagramCatItemLbl";
+d.innerHTML=m;v.appendChild(d);Q.appendChild(v);(function(b,a){mxEvent.addListener(v,"click",function(){G!=a&&(K.innerHTML=mxResources.get("create"),w(),q(a,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(v,"dblclick",u)})(h,v)}T.style.display=5>b.length?"none":""}function m(b){var a=C.querySelector(".geTemplatesList"),c;for(c in b){var f=document.createElement("div"),h=mxResources.get(c),v=b[c];null==h&&(h=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";
+f.setAttribute("title",h+" ("+v.length+")");h=mxUtils.htmlEntities(h);15<h.length&&(h=h.substring(0,15)+"&hellip;");f.innerHTML=h+" ("+v.length+")";a.appendChild(f);(function(a,c,h){mxEvent.addListener(f,"click",function(){E!=h&&(null!=E?(E.style.fontWeight="normal",E.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),E=h,E.style.fontWeight="bold",E.style.textDecoration="underline",Z.scrollTop=0,B&&(F=!0),S.innerHTML=c,aa.style.display="none",y(b[a],!0))})})(c,h,f)}}function v(b){l&&
+(Z.scrollTop=0,P.innerHTML="",U.spin(P),F=!1,B=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),J=null,l(W,b?null:k))}function x(b){f();Z.scrollTop=0;P.innerHTML="";U.spin(P);F=!1;B=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(b)+'"';p(b,W,D?null:k);J=b}c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,B=!1,F=!1,E=null,G=null,L=null,z=!1,D=!0,H=!1,M=[],J,T=C.querySelector(".geTempDlgShowAllBtn"),
P=C.querySelector(".geTempDlgDiagramsTiles"),S=C.querySelector(".geTempDlgDiagramsListTitle"),aa=C.querySelector(".geTempDlgDiagramsListBtns"),Z=C.querySelector(".geTempDlgContent"),N=C.querySelector(".geTempDlgDiagramsList"),Y=C.querySelector(".geTempDlgNewDiagramCat"),Q=C.querySelector(".geTempDlgNewDiagramCatList"),K=C.querySelector(".geTempDlgCreateBtn"),U=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(){f();Y.style.display="";N.style.minHeight="calc(100% - 280px)";v(D)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){h(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(D=!0,null==J?v(D):x(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){h(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
-"all-diagrams",!0)&&(D=!1,null==J?v(D):x(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){h(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(G=!0,z(M,!1,G))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){h(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(G=!1,z(M,!1,G))});mxEvent.addListener(T,"click",function(){y?(Y.style.height="280px",
-Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),A(I)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),A(I,!0));y=!y});var R=!1,O=!1,V={},I=[],X=1;mxUtils.get(c,function(b){if(!R){R=!0;for(b=b.getXml().documentElement.firstChild;null!=b;){if("undefined"!==typeof b.getAttribute){var a=b.getAttribute("url");if(null!=a){var c=a.indexOf("/"),a=a.substring(0,c),c=V[a];null==c&&(X++,c=[],V[a]=c);c.push({url:b.getAttribute("url"),
-libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("url"),imgUrl:b.getAttribute("imgUrl")})}}b=b.nextSibling}m(V)}});mxUtils.get(g,function(b){if(!O){O=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==typeof b.getAttribute&&null!=b.getAttribute("title")&&I.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),title:b.getAttribute("title")}),b=b.nextSibling;A(I)}});var W=function(b,a){aa.style.display="";U.stop();B=!1;H?H=!1:a?P.innerHTML=a:
-0==b.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):z(b,!1,G)};v(D);var da=null;p&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(b){var a=this;null!=da&&clearTimeout(da);13==b.keyCode?x(a.value):da=setTimeout(function(){x(a.value)},500)});mxEvent.addListener(K,"click",u);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){u(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+"all-diagrams",!0)&&(D=!1,null==J?v(D):x(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){h(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(H=!0,y(M,!1,H))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){h(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(H=!1,y(M,!1,H))});mxEvent.addListener(T,"click",function(){z?(Y.style.height="280px",
+Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),A(I)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),A(I,!0));z=!z});var R=!1,O=!1,V={},I=[],X=1;mxUtils.get(c,function(b){if(!R){R=!0;for(b=b.getXml().documentElement.firstChild;null!=b;){if("undefined"!==typeof b.getAttribute){var a=b.getAttribute("url");if(null!=a){var c=a.indexOf("/"),a=a.substring(0,c),c=V[a];null==c&&(X++,c=[],V[a]=c);c.push({url:b.getAttribute("url"),
+libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("url"),imgUrl:b.getAttribute("imgUrl")})}}b=b.nextSibling}m(V)}});mxUtils.get(g,function(b){if(!O){O=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==typeof b.getAttribute&&null!=b.getAttribute("title")&&I.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),title:b.getAttribute("title")}),b=b.nextSibling;A(I)}});var W=function(b,a){aa.style.display="";U.stop();B=!1;F?F=!1:a?P.innerHTML=a:
+0==b.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(b,!1,H)};v(D);var da=null;p&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(b){var a=this;null!=da&&clearTimeout(da);13==b.keyCode?x(a.value):da=setTimeout(function(){x(a.value)},500)});mxEvent.addListener(K,"click",u);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){u(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
d&&d();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":
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==":
@@ -7469,8 +7471,9 @@ dispName:"Source Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none
type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"loopStyle",dispName:"Loop Style",type:"bool",defVal:!0}];Editor.commonVertexProperties=[{type:"separator"},{name:"fillOpacity",dispName:"Fill Opacity",
type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",
type:"enum",defVal:"east",enumList:[{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Port Const. Rot.",type:"bool",defVal:!1},{name:"snapToPoint",dispName:"Snap to Point",
-type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",
-type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",
+dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",
+dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(b,a){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;
Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
@@ -7526,20 +7529,20 @@ h.push(c.dependentProps[b]);m.push(q)}t.editorUi.fireEvent(new mxEventObject("st
values:a,type:c,defVal:h,countProperty:m,parentRow:d,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(t,function(a){for(var v=d,t=0;null!=v.nextSibling;)if(v.nextSibling.getAttribute("data-pName")==b)v=v.nextSibling,t++;else break;var g={type:c,parentRow:d,index:t,isDeletable:!0,defVal:h,countProperty:m},t=q(b,"",g,0==t%2,e);f(b,h,g);v.parentNode.insertBefore(t,v.nextSibling);mxEvent.consume(a)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
function e(b,a,c,f,h,m,d){if(0<h){var e=Array(h);a=null!=a?a.split(","):[];for(var v=0;v<h;v++)e[v]=null!=a[v]?a[v]:null!=f?f:"";w.push({name:b,values:e,type:c,defVal:f,parentRow:m,flipBkg:d,size:h})}return document.createElement("div")}function v(b,a,c){var h=document.createElement("input");h.type="checkbox";h.checked="1"==a;mxEvent.addListener(h,"change",function(){f(b,h.checked?"1":"0",c)});return h}function q(a,c,q,g,w){var u=q.dispName,x=q.type,k=document.createElement("tr");k.className="gePropRow"+
(w?"Dark":"")+(g?"Alt":"")+" gePropNonHeaderRow";k.setAttribute("data-pName",a);k.setAttribute("data-pValue",c);g=!1;null!=q.index&&(k.setAttribute("data-index",q.index),u=(null!=u?u:"")+"["+q.index+"]",g=!0);var l=document.createElement("td");l.className="gePropRowCell";l.innerHTML=mxUtils.htmlEntities(mxResources.get(u,null,u));g&&(l.style.textAlign="right");k.appendChild(l);l=document.createElement("td");l.className="gePropRowCell";if("color"==x)l.appendChild(m(a,c,q));else if("bool"==x||"boolean"==
-x)l.appendChild(v(a,c,q));else if("enum"==x){var A=q.enumList;for(w=0;w<A.length;w++)if(u=A[w],u.val==c){l.innerHTML=mxUtils.htmlEntities(mxResources.get(u.dispName,null,u.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(t,function(){var m=document.createElement("select");h(l,m);for(var d=0;d<A.length;d++){var e=A[d],v=document.createElement("option");v.value=mxUtils.htmlEntities(e.val);v.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));m.appendChild(v)}m.value=
-c;b.appendChild(m);mxEvent.addListener(m,"change",function(){var b=mxUtils.htmlEntities(m.value);f(a,b,q)});m.focus();mxEvent.addListener(m,"blur",function(){b.removeChild(m)})}))}else"dynamicArr"==x?l.appendChild(d(a,c,q.subType,q.subDefVal,q.countProperty,k,w)):"staticArr"==x?l.appendChild(e(a,c,q.subType,q.subDefVal,q.size,k,w)):(l.innerHTML=c,mxEvent.addListener(l,"click",mxUtils.bind(t,function(){function m(){var b=d.value;null!=q.min&&b<q.min?b=q.min:null!=q.max&&b>q.max&&(b=q.max);b=mxUtils.htmlEntities(("int"==
-x?parseInt(b):b)+"");f(a,b,q)}var d=document.createElement("input");h(l,d,!0);d.value=c;d.className="gePropEditor";if("int"==x||"float"==x)d.type="number",d.step="int"==x?"1":"any",null!=q.min&&(d.min=parseFloat(q.min)),null!=q.max&&(d.max=parseFloat(q.max));b.appendChild(d);mxEvent.addListener(d,"change",m);mxEvent.addListener(d,"keypress",function(b){13==b.keyCode&&m()});d.focus();mxEvent.addListener(d,"blur",function(){b.removeChild(d)})})));q.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(t,
-function(b){f(a,"",q,q.index);mxEvent.consume(b)})),w.style.height="16px",w.style.width="25px",w.style["float"]="right",w.className="geColorBtn",l.appendChild(w));k.appendChild(l);return k}var t=this,g=this.editorUi.editor.graph,w=[];b.style.position="relative";b.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 k=document.createElement("th");k.className="gePropHeaderCell";var l=
-document.createElement("img");l.src=Sidebar.prototype.expandedImage;k.appendChild(l);mxUtils.write(k,mxResources.get("property",null,"Property"));x.style.cursor="pointer";var A=function(){var a=u.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var h=b.childNodes[f],m=h.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||b.removeChild(h)}catch(ea){}}else l.src=Sidebar.prototype.expandedImage,
-c="";for(f=0;f<a.length;f++)a[f].style.display=c};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});x.appendChild(k);k=document.createElement("th");k.className="gePropHeaderCell";k.innerHTML=mxResources.get("value",null,"Value");x.appendChild(k);u.appendChild(x);var z=!1,p=!1,C;for(C in a){var x=a[C],n=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):x.defVal;if("separator"==x.type)p=!p;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||
-a[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var U=x.dependentProps,R=[],O=[],k=0;k<U.length;k++){var V=c.style[U[k]];O.push(a[U[k]].subDefVal);R.push(null!=V?V.split(","):[])}x.dependentPropsDefVal=O;x.dependentPropsVals=R}u.appendChild(q(C,n,x,z,p));z=!z}}for(k=0;k<w.length;k++)for(x=w[k],a=x.parentRow,c=0;c<x.values.length;c++)C=q(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),a.parentNode.insertBefore(C,a.nextSibling),a=C;b.appendChild(u);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function a(b){function a(b){var a=mxUtils.button("",function(a){f.getModel().beginUpdate();try{var c=f.getSelectionCells();for(a=0;a<c.length;a++){for(var h=f.getModel().getStyle(c[a]),d=0;d<m.length;d++)h=mxUtils.removeStylename(h,m[d]);var e=f.getModel().isVertex(c[a])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=b?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,
-b.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[a])&&(h=mxUtils.setStyle(h,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,
-mxConstants.STYLE_FILLCOLOR,"#ffffff")),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,"#000000")),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[a])&&(h=mxUtils.setStyle(h,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[a],h)}}finally{f.getModel().endUpdate()}});a.className="geStyleButton";a.style.width=
-"36px";a.style.height="30px";a.style.margin="0px 6px 6px 0px";if(null!=b)null!=b.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":a.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?a.style.background="url('"+Dialog.prototype.noColorImage+"')":a.style.backgroundColor=b.fill||mxUtils.getValue(f.defaultVertexStyle,
-mxConstants.STYLE_FILLCOLOR,"#ffffff"),a.style.border="1px solid "+(b.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var c=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),d=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");a.style.backgroundColor=c;a.style.border="1px solid "+d}h.appendChild(a)}h.innerHTML="";for(var c=0;c<b.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(h),a(b[c])}function c(b){mxEvent.addListener(b,
-"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(h);var m="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 d=document.createElement("div");d.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=);";
+x)l.appendChild(v(a,c,q));else if("enum"==x){var A=q.enumList;for(w=0;w<A.length;w++)if(u=A[w],u.val==c){l.innerHTML=mxUtils.htmlEntities(mxResources.get(u.dispName,null,u.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(t,function(){var m=document.createElement("select");h(l,m);for(var d=0;d<A.length;d++){var v=A[d],e=document.createElement("option");e.value=mxUtils.htmlEntities(v.val);e.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));m.appendChild(e)}m.value=
+c;b.appendChild(m);mxEvent.addListener(m,"change",function(){var b=mxUtils.htmlEntities(m.value);f(a,b,q)});m.focus();mxEvent.addListener(m,"blur",function(){b.removeChild(m)})}))}else"dynamicArr"==x?l.appendChild(d(a,c,q.subType,q.subDefVal,q.countProperty,k,w)):"staticArr"==x?l.appendChild(e(a,c,q.subType,q.subDefVal,q.size,k,w)):(l.innerHTML=c,mxEvent.addListener(l,"click",mxUtils.bind(t,function(){function m(){var b=d.value,b=0==b.length&&"string"!=x?0:b;q.allowAuto&&("auto"==b.trim().toLowerCase()?
+(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=q.min&&b<q.min?b=q.min:null!=q.max&&b>q.max&&(b=q.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(a,b,q)}var d=document.createElement("input");h(l,d,!0);d.value=c;d.className="gePropEditor";"int"!=x&&"float"!=x||q.allowAuto||(d.type="number",d.step="int"==x?"1":"any",null!=q.min&&(d.min=parseFloat(q.min)),null!=q.max&&(d.max=parseFloat(q.max)));b.appendChild(d);mxEvent.addListener(d,"change",m);mxEvent.addListener(d,"keypress",
+function(b){13==b.keyCode&&m()});d.focus();mxEvent.addListener(d,"blur",function(){b.removeChild(d)})})));q.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(t,function(b){f(a,"",q,q.index);mxEvent.consume(b)})),w.style.height="16px",w.style.width="25px",w.style["float"]="right",w.className="geColorBtn",l.appendChild(w));k.appendChild(l);return k}var t=this,g=this.editorUi.editor.graph,w=[];b.style.position="relative";b.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 k=document.createElement("th");k.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;k.appendChild(l);mxUtils.write(k,mxResources.get("property",null,"Property"));x.style.cursor="pointer";var A=function(){var a=u.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-
+1;0<=f;f--)try{var h=b.childNodes[f],m=h.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||b.removeChild(h)}catch(ea){}}else l.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<a.length;f++)a[f].style.display=c};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});x.appendChild(k);k=document.createElement("th");k.className="gePropHeaderCell";k.innerHTML=mxResources.get("value",null,"Value");x.appendChild(k);u.appendChild(x);var y=!1,C=!1,p;for(p in a){var x=
+a[p],n=null!=c.style[p]?mxUtils.htmlEntities(c.style[p]+""):x.defVal;if("separator"==x.type)C=!C;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||a[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var U=x.dependentProps,R=[],O=[],k=0;k<U.length;k++){var V=c.style[U[k]];O.push(a[U[k]].subDefVal);R.push(null!=V?V.split(","):[])}x.dependentPropsDefVal=O;x.dependentPropsVals=R}u.appendChild(q(p,n,x,y,C));y=!y}}for(k=0;k<w.length;k++)for(x=w[k],a=x.parentRow,c=0;c<x.values.length;c++)p=
+q(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),a.parentNode.insertBefore(p,a.nextSibling),a=p;b.appendChild(u);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function a(b){function a(b){var a=mxUtils.button("",function(a){f.getModel().beginUpdate();try{var c=f.getSelectionCells();for(a=0;a<c.length;a++){for(var h=f.getModel().getStyle(c[a]),d=0;d<m.length;d++)h=mxUtils.removeStylename(h,
+m[d]);var e=f.getModel().isVertex(c[a])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=b?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[a])&&(h=mxUtils.setStyle(h,mxConstants.STYLE_FONTCOLOR,
+b.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,"#000000")),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[a])&&(h=mxUtils.setStyle(h,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,
+null))));f.getModel().setStyle(c[a],h)}}finally{f.getModel().endUpdate()}});a.className="geStyleButton";a.style.width="36px";a.style.height="30px";a.style.margin="0px 6px 6px 0px";if(null!=b)null!=b.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":a.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?
+a.style.background="url('"+Dialog.prototype.noColorImage+"')":a.style.backgroundColor=b.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),a.style.border="1px solid "+(b.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var c=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),d=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");a.style.backgroundColor=c;a.style.border="1px solid "+
+d}h.appendChild(a)}h.innerHTML="";for(var c=0;c<b.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(h),a(b[c])}function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(h);
+var m="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 d=document.createElement("div");d.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(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);a(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.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&&(b.appendChild(d),b.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);a(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(d);c(e);a(this.defaultColorSchemes[this.editorUi.currentScheme]);return b};StyleFormatPanel.prototype.addEditOps=function(b){var a=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",b.appendChild(c));var f=this.editorUi.editor.graph,h=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=h&&null!=h.shape&&null!=h.shape.stencil?(a=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
@@ -7550,7 +7553,7 @@ this.getInsertPoint=function(){return null!=a?this.getPointForEvent(a):c.apply(t
a)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=a.marginLeft||0;c.marginRight=a.marginRight||0;c.marginTop=a.marginTop||0;c.marginBottom=a.marginBottom||0;c.resizeParent=!1;return c}return f.apply(this,arguments)}};var q=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return q.apply(this,arguments)&&!mxClient.IS_SF};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var a=u.apply(this,arguments);if(null==
a){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(C){null!=window.console&&console.log("Error in vars URL parameter: "+C)}null!=this.globalUrlVars&&(a=this.globalUrlVars[b])}return a};var w=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){w.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};var z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){if("data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions)){for(var a=0;a<b.actions.length;a++)if(null!=b.actions[a].open)if(this.isCustomLink(b.actions[a].open)){if(!this.customLinkClicked(b.actions[a].open))return}else this.openLink(b.actions[a].open);
+this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){if("data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions)){for(var a=0;a<b.actions.length;a++)if(null!=b.actions[a].open)if(this.isCustomLink(b.actions[a].open)){if(!this.customLinkClicked(b.actions[a].open))return}else this.openLink(b.actions[a].open);
this.model.beginUpdate();try{for(a=0;a<b.actions.length;a++)this.handleLinkAction(b.actions[a])}finally{this.model.endUpdate()}}};Graph.prototype.handleLinkAction=function(b){var a=[];null!=b.select&&this.isEnabled()&&(a=this.getCellsForAction(b.select),this.setSelectionCells(a));null!=b.highlight&&(a=this.getCellsForAction(b.highlight),this.highlightCells(a,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle));null!=b.show&&
this.setCellsVisible(this.getCellsForAction(b.show),!0);null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide),!1);null!=b.scroll&&(a=this.getCellsForAction(b.scroll));0<a.length&&this.scrollCellToVisible(a[0])};Graph.prototype.getCellsForAction=function(b){return this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags))};Graph.prototype.getCellsById=function(b){var a=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var f=this.getDefaultParent(),a=a.concat(this.model.filterDescendants(function(b){return b!=
f},f));else{var h=this.model.getCell(b[c]);null!=h&&a.push(h)}return a};Graph.prototype.getCellsForTags=function(b,a,c){var f=[];if(null!=b){a=null!=a?a:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var h=0;h<a.length;h++)if(this.model.isVertex(a[h])||this.model.isEdge(a[h])){var m=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(c)||""):"",d=!0;if(0<m.length)for(var m=m.toLowerCase().split(" "),e=0;e<b.length&&d;e++)var q=mxUtils.trim(b[e]).toLowerCase(),
@@ -7572,17 +7575,17 @@ mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3
Math.min(e,Math.max(parseInt(u.value),parseInt(w.value))));w.value=Math.max(1,Math.min(e,Math.min(parseInt(u.value),parseInt(w.value))))}function f(a){function c(a,c,h){var m=a.getGraphBounds(),d=0,e=0,q=da.get(),t=1/a.pageScale,g=A.checked;if(g)var t=parseInt(X.value),v=parseInt(W.value),t=Math.min(q.height*v/(m.height/a.view.scale),q.width*t/(m.width/a.view.scale));else t=parseInt(l.value)/(100*a.pageScale),isNaN(t)&&(f=1/a.pageScale,l.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*
f);q.height=Math.ceil(q.height*f);t*=f;!g&&a.pageVisible?(m=a.getPageLayout(),d-=m.x*q.width,e-=m.y*q.height):g=!0;if(null==c){c=PrintDialog.createPrintPreview(a,t,q,0,d,e,g);c.pageSelector=!1;c.mathEnabled=!1;a=b.getCurrentFile();null!=a&&(c.title=a.getTitle());var w=c.writeHead;c.writeHead=function(a){w.apply(this,arguments);null!=b.editor.fontCss&&(a.writeln('<style type="text/css">'),a.writeln(b.editor.fontCss),a.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=c.renderPage;c.renderPage=
function(b,a,c,f,h,m){var d=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=u.apply(this,arguments);mxClient.NO_FO=d;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,h,!0)}else{q=a.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";c.backgroundColor=q;c.autoOrigin=g;c.appendGraph(a,t,d,e,h,!0)}return c}var f=parseInt(ba.value)/100;isNaN(f)&&(f=
-1,ba.value="100 %");var f=.75*f,m=w.value,d=u.value,e=!v.checked,t=null;e&&(e=m==q&&d==q);if(!e&&null!=b.pages&&b.pages.length){var g=0,e=b.pages.length-1;v.checked||(g=parseInt(m)-1,e=parseInt(d)-1);for(var k=g;k<=e;k++){var x=b.pages[k],m=x==b.currentPage?h:null;if(null==m){var m=b.createTemporaryGraph(h.getStylesheet()),d=!0,g=!1,z=null,p=null;null==x.viewState&&null==x.mapping&&null==x.root&&b.updatePageRoot(x);null!=x.viewState?(d=x.viewState.pageVisible,g=x.viewState.mathEnabled,z=x.viewState.background,
-p=x.viewState.backgroundImage):null!=x.mapping&&null!=x.mapping.diagramMap&&(g="0"!=x.mapping.diagramMap.get("mathEnabled"),z=x.mapping.diagramMap.get("background"),p=x.mapping.diagramMap.get("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null);m.background=z;m.backgroundImage=null!=p?new mxImage(p.src,p.width,p.height):null;m.pageVisible=d;m.mathEnabled=g;var y=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?x.getName():"pagenumber"==b?k+1:y.apply(this,arguments)};document.body.appendChild(m.container);
+1,ba.value="100 %");var f=.75*f,m=w.value,d=u.value,e=!g.checked,t=null;e&&(e=m==q&&d==q);if(!e&&null!=b.pages&&b.pages.length){var v=0,e=b.pages.length-1;g.checked||(v=parseInt(m)-1,e=parseInt(d)-1);for(var k=v;k<=e;k++){var x=b.pages[k],m=x==b.currentPage?h:null;if(null==m){var m=b.createTemporaryGraph(h.getStylesheet()),d=!0,v=!1,y=null,p=null;null==x.viewState&&null==x.mapping&&null==x.root&&b.updatePageRoot(x);null!=x.viewState?(d=x.viewState.pageVisible,v=x.viewState.mathEnabled,y=x.viewState.background,
+p=x.viewState.backgroundImage):null!=x.mapping&&null!=x.mapping.diagramMap&&(v="0"!=x.mapping.diagramMap.get("mathEnabled"),y=x.mapping.diagramMap.get("background"),p=x.mapping.diagramMap.get("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null);m.background=y;m.backgroundImage=null!=p?new mxImage(p.src,p.width,p.height):null;m.pageVisible=d;m.mathEnabled=v;var z=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?x.getName():"pagenumber"==b?k+1:z.apply(this,arguments)};document.body.appendChild(m.container);
b.updatePageRoot(x);m.model.setRoot(x.root)}t=c(m,t,k!=e);m!=h&&m.container.parentNode.removeChild(m.container)}}else t=c(h);t.mathEnabled&&(e=t.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln('"HTML-CSS": {'),
e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),a&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));
-t.closeDocument();!t.mathEnabled&&a&&PrintDialog.printPreview(t)}var h=b.editor.graph,m=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,a||mxResources.get("print"));m.appendChild(d);var e=1,q=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";
-v.setAttribute("value","all");v.setAttribute("type","radio");v.setAttribute("name","pages-printdialog");t.appendChild(v);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));t.appendChild(d);mxUtils.br(t);var g=v.cloneNode(!0);v.setAttribute("checked","checked");g.setAttribute("value","range");t.appendChild(g);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");t.appendChild(d);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";
-w.setAttribute("value","1");w.setAttribute("type","number");w.setAttribute("min","1");w.style.width="50px";t.appendChild(w);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));t.appendChild(d);var u=w.cloneNode(!0);t.appendChild(u);mxEvent.addListener(w,"focus",function(){g.checked=!0});mxEvent.addListener(u,"focus",function(){g.checked=!0});mxEvent.addListener(w,"change",c);mxEvent.addListener(u,"change",c);if(null!=b.pages&&(e=b.pages.length,null!=b.currentPage))for(d=0;d<b.pages.length;d++)if(b.currentPage==
+t.closeDocument();!t.mathEnabled&&a&&PrintDialog.printPreview(t)}var h=b.editor.graph,m=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,a||mxResources.get("print"));m.appendChild(d);var e=1,q=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";
+g.setAttribute("value","all");g.setAttribute("type","radio");g.setAttribute("name","pages-printdialog");t.appendChild(g);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));t.appendChild(d);mxUtils.br(t);var v=g.cloneNode(!0);g.setAttribute("checked","checked");v.setAttribute("value","range");t.appendChild(v);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");t.appendChild(d);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";
+w.setAttribute("value","1");w.setAttribute("type","number");w.setAttribute("min","1");w.style.width="50px";t.appendChild(w);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));t.appendChild(d);var u=w.cloneNode(!0);t.appendChild(u);mxEvent.addListener(w,"focus",function(){v.checked=!0});mxEvent.addListener(u,"focus",function(){v.checked=!0});mxEvent.addListener(w,"change",c);mxEvent.addListener(u,"change",c);if(null!=b.pages&&(e=b.pages.length,null!=b.currentPage))for(d=0;d<b.pages.length;d++)if(b.currentPage==
b.pages[d]){q=d+1;w.value=q;u.value=q;break}w.setAttribute("max",e);u.setAttribute("max",e);1<e&&m.appendChild(t);var k=document.createElement("div");k.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");k.appendChild(x);d=document.createElement("span");mxUtils.write(d,mxResources.get("adjustTo"));k.appendChild(d);var l=document.createElement("input");l.style.cssText=
-"margin:0 8px 0 8px;";l.setAttribute("value","100 %");l.style.width="50px";k.appendChild(l);mxEvent.addListener(l,"focus",function(){x.checked=!0});m.appendChild(k);var t=t.cloneNode(!1),A=x.cloneNode(!0);A.setAttribute("value","fit");x.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(A);t.appendChild(d);k=document.createElement("table");k.style.display="inline-block";var z=document.createElement("tbody"),
+"margin:0 8px 0 8px;";l.setAttribute("value","100 %");l.style.width="50px";k.appendChild(l);mxEvent.addListener(l,"focus",function(){x.checked=!0});m.appendChild(k);var t=t.cloneNode(!1),A=x.cloneNode(!0);A.setAttribute("value","fit");x.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(A);t.appendChild(d);k=document.createElement("table");k.style.display="inline-block";var y=document.createElement("tbody"),
p=document.createElement("tr"),n=p.cloneNode(!0),K=document.createElement("td"),U=K.cloneNode(!0),R=K.cloneNode(!0),O=K.cloneNode(!0),V=K.cloneNode(!0),I=K.cloneNode(!0);K.style.textAlign="right";O.style.textAlign="right";mxUtils.write(K,mxResources.get("fitTo"));var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","1");X.setAttribute("min","1");X.setAttribute("type","number");X.style.width="40px";U.appendChild(X);d=document.createElement("span");mxUtils.write(d,
-mxResources.get("fitToSheetsAcross"));R.appendChild(d);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){A.checked=!0});mxEvent.addListener(W,"focus",function(){A.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));I.appendChild(d);p.appendChild(K);p.appendChild(U);p.appendChild(R);n.appendChild(O);n.appendChild(V);n.appendChild(I);z.appendChild(p);z.appendChild(n);k.appendChild(z);
+mxResources.get("fitToSheetsAcross"));R.appendChild(d);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){A.checked=!0});mxEvent.addListener(W,"focus",function(){A.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));I.appendChild(d);p.appendChild(K);p.appendChild(U);p.appendChild(R);n.appendChild(O);n.appendChild(V);n.appendChild(I);y.appendChild(p);y.appendChild(n);k.appendChild(y);
t.appendChild(k);m.appendChild(t);t=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom="12px";mxUtils.write(d,mxResources.get("paperSize"));t.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(d,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));t.appendChild(d);
var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);m.appendChild(t);d=document.createElement("div");d.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&d.appendChild(t);b.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
k.className="geBtn",d.appendChild(k));PrintDialog.previewEnabled&&(k=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});k.className="geBtn gePrimaryBtn";d.appendChild(k);b.editor.cancelFirst||d.appendChild(t);m.appendChild(d);this.container=m};var m=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
@@ -7591,7 +7594,7 @@ this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnab
var ErrorDialog=function(a,e,d,c,g,k,l,p,n,b,f){n=null!=n?n:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=e){var t=document.createElement("div");t.style.padding="0px";t.style.margin="0px";t.style.fontSize="18px";t.style.paddingBottom="16px";t.style.marginBottom="16px";t.style.borderBottom="1px solid #c0c0c0";t.style.color="gray";mxUtils.write(t,e);h.appendChild(t)}e=document.createElement("div");e.style.padding="6px";e.innerHTML=d;h.appendChild(e);d=document.createElement("div");
d.style.marginTop="16px";d.style.textAlign="center";null!=k&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),e.className="geBtn",d.appendChild(e),d.style.textAlign="center");null!=b&&(b=mxUtils.button(b,function(){null!=f&&f()}),b.className="geBtn",d.appendChild(b));var q=mxUtils.button(c,function(){n&&a.hideDialog();null!=g&&g()});q.className="geBtn";d.appendChild(q);null!=l&&(c=mxUtils.button(l,function(){n&&a.hideDialog();null!=p&&p()}),c.className="geBtn gePrimaryBtn",
d.appendChild(c));this.init=function(){q.focus()};h.appendChild(d);this.container=h};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="9.3.1";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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";
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="9.3.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(q){}try{var a=document.createElement("canvas"),c=new Image;c.onload=function(){try{a.getContext("2d").drawImage(c,0,0);var b=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
@@ -7606,13 +7609,13 @@ var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
g?mxUtils.getXml(g):""}catch(w){}return c};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var a=b.indexOf('<meta charset="utf-8">');0<=a&&(b=b.slice(0,a)+'<meta charset="utf-8"/>'+b.slice(a+23-1,b.length))}return b};EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b){a=this.editor.graph;a.model.beginUpdate();
try{var c=null!=this.pages?this.pages.slice():null,d=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));a.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),
this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),a.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)a.model.execute(new ChangePage(this,c[e],null))}finally{a.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,a,c,d,e,g,w,k,l,m){a=null!=
-a?a:this.editor.graph;e=null!=e?e:!1;l=null!=l?l:!0;var f,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":h=f=d;if(null==b)return"";var q=b;if("mxfile"!=q.nodeName.toLowerCase()){var t=a.zapGremlins(mxUtils.getXml(b)),q=a.compress(t);if(a.decompress(q)!=t)return t;t=b.ownerDocument.createElement("diagram");mxUtils.setTextContent(t,q);q=b.ownerDocument.createElement("mxfile");q.appendChild(t)}m?(q=q.cloneNode(!0),q.removeAttribute("userAgent"),q.removeAttribute("version"),
-q.removeAttribute("editor"),q.removeAttribute("type")):(q.setAttribute("userAgent",navigator.userAgent),q.setAttribute("version",EditorUi.VERSION),q.setAttribute("editor","www.draw.io"),b=null!=c?c.getMode():this.mode,null!=b&&q.setAttribute("type",b));b=mxUtils.getXml(q);if(!g&&!e&&(w||null!=c&&/(\.html)$/i.test(c.getTitle())))b=this.getHtml2(mxUtils.getXml(q),a,null!=c?c.getTitle():null,f,h);else if(g||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=
-App.MODE_BROWSER||(d=null),b=this.getEmbeddedSvg(b,a,d,null,k,l,h);return b};EditorUi.prototype.getXmlFileData=function(b,a){b=null!=b?b:!0;a=null!=a?a:!1;var c=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(a)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=this.pages[d].mapping;
-this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(b,a,c,d,e,g,w,k,l){e=null!=e?e:!0;w=null!=w?w:this.getXmlFileData(e,null!=g?g:!1);l=null!=l?l:this.getCurrentFile();g=this.editor.graph;
-if(null!=this.pages&&this.currentPage!=this.pages[0]&&(a||!b&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(b){return"page"==b?h.getName():"pagenumber"==b?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}b=this.createFileData(w,g,l,window.location.href,b,a,c,d,e,k);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return b};
-EditorUi.prototype.getHtml=function(b,a,c,d,e,g){g=null!=g?g:!0;var f=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=a){var f=g?a.getGraphBounds():a.getBoundingBox(a.getSelectionCells()),q=a.view.scale;g=Math.floor(f.x/q-a.view.translate.x);q=Math.floor(f.y/q-a.view.translate.y);f=a.background;null==e&&(a=this.getBasenames().join(";"),0<a.length&&(h="https://www.draw.io/embed.js?s="+a));b.setAttribute("x0",g);b.setAttribute("y0",q)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom",
-"1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=d&&b.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));b=null!=b?this.editor.graph.zapGremlins(mxUtils.getXml(b)):"";d=this.editor.graph.compress(b);this.editor.graph.decompress(d)!=b&&(d=encodeURIComponent(b));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
+a?a:this.editor.graph;e=null!=e?e:!1;l=null!=l?l:!0;var f,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":h=f=d;if(null==b)return"";var q=b;if("mxfile"!=q.nodeName.toLowerCase()){var t=a.zapGremlins(mxUtils.getXml(b)),q=a.compress(t);if(a.decompress(q)!=t)return t;t=b.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,q);q=b.ownerDocument.createElement("mxfile");q.appendChild(t)}m?(q=q.cloneNode(!0),q.removeAttribute("userAgent"),
+q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("type")):(q.setAttribute("userAgent",navigator.userAgent),q.setAttribute("version",EditorUi.VERSION),q.setAttribute("editor","www.draw.io"),b=null!=c?c.getMode():this.mode,null!=b&&q.setAttribute("type",b));b=mxUtils.getXml(q);if(!g&&!e&&(w||null!=c&&/(\.html)$/i.test(c.getTitle())))b=this.getHtml2(mxUtils.getXml(q),a,null!=c?c.getTitle():null,f,h);else if(g||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),b=this.getEmbeddedSvg(b,a,d,null,k,l,h);return b};EditorUi.prototype.getXmlFileData=function(b,a){b=null!=b?b:!0;a=null!=a?a:!1;var c=this.editor.getGraphXml(b);if(b&&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),a)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var d=
+this.pages[f].mapping;if(this.currentPage!=this.pages[f]&&null!=d&&d.needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(d.graphModel);d.writeRealtimeToNode(e);mxUtils.setTextContent(this.pages[f].node,this.editor.graph.compressNode(e));d.needsUpdate=!1}c.appendChild(this.pages[f].node)}return c};EditorUi.prototype.getFileData=function(b,a,c,d,e,g,w,k,l){e=null!=e?e:!0;w=null!=w?w:this.getXmlFileData(e,null!=g?g:!1);l=null!=l?l:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&
+this.currentPage!=this.pages[0]&&(a||!b&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(b){return"page"==b?h.getName():"pagenumber"==b?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}b=this.createFileData(w,g,l,window.location.href,b,a,c,d,e,k);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return b};EditorUi.prototype.getHtml=
+function(b,a,c,d,e,g){g=null!=g?g:!0;var f=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=a){var f=g?a.getGraphBounds():a.getBoundingBox(a.getSelectionCells()),q=a.view.scale;g=Math.floor(f.x/q-a.view.translate.x);q=Math.floor(f.y/q-a.view.translate.y);f=a.background;null==e&&(a=this.getBasenames().join(";"),0<a.length&&(h="https://www.draw.io/embed.js?s="+a));b.setAttribute("x0",g);b.setAttribute("y0",q)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize",
+"0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=d&&b.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));b=null!=b?this.editor.graph.zapGremlins(mxUtils.getXml(b)):"";d=this.editor.graph.compress(b);this.editor.graph.decompress(d)!=b&&(d=encodeURIComponent(b));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\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==e?'<script type="text/javascript" src="'+h+'">\x3c/script>':
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,a,c,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,
this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
@@ -7621,44 +7624,45 @@ mxUtils.parseXml(b).documentElement:null;b=null!=a?this.editor.extractGraphModel
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(b){var a=this.getCurrentFile(),a=null!=a&&null!=
a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(a=a+"-"+this.currentPage.getName());return a};EditorUi.prototype.downloadFile=function(b,a,c,d,e,g,w){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),
h=f+"."+b;if("xml"==b){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+(a?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(h,b,m,"text/xml")}else if("html"==b)m=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(h,b,m,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?h=f+".png":"jpeg"==b&&(h=f+".jpg"),this.saveRequest(h,b,mxUtils.bind(this,function(a,c){try{var f=
-this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var h=this.createDownloadRequest(a,b,d,c,w);this.editor.graph.pageVisible=f;return h}catch(y){this.handleError(y)}}));else{var q=null,t=mxUtils.bind(this,function(b){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(q)}))});if("svg"==b){var k=this.editor.graph.background;if(w||k==
-mxConstants.NONE)k=null;var u=this.editor.graph.getSvg(k,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){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(b))})))}else h=f+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();t(b)}),d)}}catch(H){this.handleError(H)}};
+this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var h=this.createDownloadRequest(a,b,d,c,w);this.editor.graph.pageVisible=f;return h}catch(z){this.handleError(z)}}));else{var q=null,t=mxUtils.bind(this,function(b){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(q)}))});if("svg"==b){var u=this.editor.graph.background;if(w||u==
+mxConstants.NONE)u=null;var k=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(k);this.convertImages(k,mxUtils.bind(this,mxUtils.bind(this,function(b){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(b))})))}else h=f+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();t(b)}),d)}}catch(F){this.handleError(F)}};
EditorUi.prototype.createDownloadRequest=function(b,a,c,d,e){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=a);var h="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";if("xmlpng"==a&&(f="1",a="png",null!=this.pages&&null!=this.currentPage))for(var q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){h="&from="+q;break}q=this.editor.graph.background;"png"==a&&e&&(q=mxConstants.NONE);
return new mxXmlRequest(EXPORT_URL,"format="+a+h+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=b?"&filename="+encodeURIComponent(b):""))};EditorUi.prototype.setMode=function(b,a){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,a,c){var f=window.location.hash,h=mxUtils.bind(this,function(c){var h=null!=b.data?b.data:"";null!=c&&0<c.length&&(0<h.length&&(h+="\n"),h+=c);c=new LocalFile(this,"csv"!=b.format&&0<h.length?h:this.emptyDiagramXml,
-null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return f};this.fileLoaded(c);"csv"==b.format&&this.importCsv(h,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var d=null!=b.interval?parseInt(b.interval):6E4,e=null,q=mxUtils.bind(this,function(){var a=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
-mxUtils.bind(this,function(b){a===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),g()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(e);e=window.setTimeout(q,d)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();q()}));g();q()}null!=a&&a()});if(null!=b.url&&0<b.url.length){var d=b.url;/^https?:\/\//.test(d)&&
+null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return f};this.fileLoaded(c);"csv"==b.format&&this.importCsv(h,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var d=null!=b.interval?parseInt(b.interval):6E4,m=null,e=mxUtils.bind(this,function(){var a=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
+mxUtils.bind(this,function(b){a===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),q()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),q=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(e,d)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){q();e()}));q();e()}null!=a&&a()});if(null!=b.url&&0<b.url.length){var d=b.url;/^https?:\/\//.test(d)&&
!this.isCorsEnabledForUrl(d)&&(d=PROXY_URL+"?url="+encodeURIComponent(b.url));this.loadUrl(d,mxUtils.bind(this,function(b){h(b)}),mxUtils.bind(this,function(b){null!=c&&c(b)}))}else h("")};EditorUi.prototype.updateDiagram=function(b){function a(b){var a=new mxCellOverlay(b.image||d.warningImage,b.tooltip,b.align,b.valign,b.offset);a.addListener(mxEvent.CLICK,function(a,c){editorUi.alert(b.tooltip)});return a}var c=null;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,
-null!=b&&"updates"==b.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var g=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var w=e.getCell(b.getAttribute("id"));if(null!=w){try{var k=b.getAttribute("value");if(null!=k){var l=mxUtils.parseXml(k).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))e.setValue(w,l);else for(var m=l.attributes,v=0;v<m.length;v++)d.setAttributeForCell(w,m[v].nodeName,0<m[v].nodeValue.length?m[v].nodeValue:null)}}catch(y){null!=
-window.console&&console.log("Error in value for "+w.id+": "+y)}try{var x=b.getAttribute("style");null!=x&&d.model.setStyle(w,x)}catch(y){null!=window.console&&console.log("Error in style for "+w.id+": "+y)}try{var p=b.getAttribute("icon");if(null!=p){var n=0<p.length?JSON.parse(p):null;null!=n&&n.append||d.removeCellOverlays(w);null!=n&&d.addCellOverlay(w,a(n))}}catch(y){null!=window.console&&console.log("Error in icon for "+w.id+": "+y)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),
-E=d.getCellGeometry(w);if(null!=E){E=E.clone();for(key in H){var F=parseFloat(H[key]);"dx"==key?E.x+=F:"dy"==key?E.y+=F:"dw"==key?E.width+=F:"dh"==key?E.height+=F:E[key]=parseFloat(H[key])}d.model.setGeometry(w,E)}}}catch(y){null!=window.console&&console.log("Error in icon for "+w.id+": "+y)}}}else if("model"==b.nodeName){for(var L=b.firstChild;null!=L&&L.nodeType!=mxConstants.NODETYPE_ELEMENT;)L=L.nextSibling;null!=L&&(new mxCodec(b.firstChild)).decode(L,e)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&
-(d.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(g=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.fileLoaded=function(b){var a=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);
-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!=b)try{this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==b.realtime&&(b.isEditable()?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"));a=!0;this.isOffline()||null==b.getMode()||this.logEvent({category:"File",action:"open",label:b.getMode()});
-if(this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(q){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(q){}}catch(q){null!=window.console&&console.log("error in fileLoaded:",b,q);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!=q&&null!=q.message?":err:"+encodeURIComponent(q.message):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}catch(u){}this.handleError(q,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?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return a};
-EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(b){if(EditorUi.enableLogging)try{var a=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=a+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):"")}catch(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,a,c,d,e,g,w){};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(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var a=mxUtils.createXmlDocument(),c=a.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));a.appendChild(c);
-return mxUtils.getXml(a)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var a=this.sidebar.palettes[b];if(null!=a){for(var c=0;c<a.length;c++)a[c].parentNode.removeChild(a[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var a=this.sidebar.container;
-if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:a.firstChild.nextSibling.nextSibling;var c=a.lastChild,d=c.previousSibling;a.insertBefore(c,b);a.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(b){var a=mxUtils.parseXml(b.getData());if("mxlibrary"==a.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(a.documentElement));this.libraryLoaded(b,c,a.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};
-};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,a,c){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var h=null,d=mxUtils.bind(this,function(a,c){0==a.length&&b.isEditable()?(null==h&&(h=document.createElement("div"),mxUtils.setPrefixedStyle(h.style,
-"borderRadius","6px"),h.style.border="3px dotted lightGray",h.style.textAlign="center",h.style.padding="8px",h.style.color="#B3B3B3",mxUtils.write(h,mxResources.get("dragElementsHere"))),c.appendChild(h)):this.addLibraryEntries(a,c)});if(null!=this.sidebar&&null!=a)for(var e=0;e<a.length;e++)mxUtils.bind(this,function(b){var a=b.data;null!=a&&null!=b.title?this.sidebar.addEntry(b.title,mxUtils.bind(this,function(){a=this.convertDataUri(a);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==b.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+a,b.w,b.h,"",b.title||"",!1,!1,!0)})):null!=b.xml&&null!=b.title&&this.sidebar.addEntry(b.title,mxUtils.bind(this,function(){var a=this.stringToCells(this.editor.graph.decompress(b.xml));return this.sidebar.createVertexTemplateFromCells(a,b.w,b.h,b.title||"",!0,!1,!0)}))})(a[e]);c=null!=c&&0<c.length?c:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),c,!0,mxUtils.bind(this,function(b){d(a,b)}));this.repositionLibrary(f);
-var k=g.parentNode.previousSibling;c=k.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+c);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");k.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",
-mxResources.get("close"));v.setAttribute("valign","absmiddle");v.setAttribute("border","0");v.style.margin="0 3px";var x=null;if(".scratchpad"!=b.title||this.closableScratchpad)m.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(a){if(!mxEvent.isConsumed(a)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=x?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(a)}}));if(b.isEditable()){var l=
-this.editor.graph,p=null,n=mxUtils.bind(this,function(c){this.showLibraryDialog(b.getTitle(),g,a,b,b.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){b.setModified(!0);b.isAutosave()?(null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=v.cloneNode(!1),p.setAttribute("src",Editor.spinImage),p.setAttribute("title",mxResources.get("saving")),p.style.cursor="default",p.style.marginRight="2px",p.style.marginTop="-2px",m.insertBefore(p,m.firstChild),k.style.paddingRight=18*m.childNodes.length+
-"px",this.saveLibrary(b.getTitle(),a,b,b.getMode(),!0,!0,function(){null!=p&&null!=p.parentNode&&(p.parentNode.removeChild(p),k.style.paddingRight=18*m.childNodes.length+"px")})):null==x&&(x=v.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),m.insertBefore(x,m.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,function(c){this.saveLibrary(b.getTitle(),a,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==x||b.isModified()||
-(k.style.paddingRight=18*m.childNodes.length+"px",x.parentNode.removeChild(x),x=null)});mxEvent.consume(c)})),k.style.paddingRight=18*m.childNodes.length+"px")}),F=mxUtils.bind(this,function(b,c,f,d){b=l.cloneCells(mxUtils.sortCells(l.model.getTopmostCells(b)));for(var e=0;e<b.length;e++){var m=l.getCellGeometry(b[e]);null!=m&&m.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,c.width,c.height,d||"",!0,!1,!1));b={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
-w:c.width,h:c.height};null!=d&&(b.title=d);a.push(b);E(f);null!=h&&null!=h.parentNode&&0<a.length&&(h.parentNode.removeChild(h),h=null)}),L=mxUtils.bind(this,function(b){if(l.isSelectionEmpty())l.getRubberband().isActive()?(l.getRubberband().execute(b),l.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var a=l.getSelectionCells(),c=l.view.getBounds(a),f=l.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=l.view.translate.x;
-c.y-=l.view.translate.y;F(a,c)}mxEvent.consume(b)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="hidden",null!=h?h.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",l.panningManager.stop(),l.autoScroll=!1,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!1),
-null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(b))}),mxUtils.bind(this,function(b){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler&&(g.style.border="3px solid transparent",null!=h&&(h.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,l.panningManager.stop(),l.graphHandler.reset(),l.isMouseDown=!1,l.autoScroll=!0,L(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){l.isMouseDown&&
-null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",l.autoScroll=!0,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!0),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="visible"),null!=h&&(h.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(b){null!=h?h.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";
-b.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.border="3px solid transparent";g.style.cursor="";null!=h&&(h.style.border="3px dotted lightGray");0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,f,e,m,q,v,t,k,w){if(null!=c&&"image/"==f.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,q,v),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,q,v),b,mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=h&&null!=h.parentNode&&0<a.length&&(h.parentNode.removeChild(h),h=null);else{var u=!1,l=mxUtils.bind(this,function(c,f){if(null!=c&&"text/xml"==f){var e=mxUtils.parseXml(c);if("mxlibrary"==e.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(e.documentElement));d(m,g);a=a.concat(m);E(b);
-this.spinner.stop();u=!0}catch(X){}else if("mxfile"==e.documentElement.nodeName)try{for(var q=e.documentElement.getElementsByTagName("diagram"),e=0;e<q.length;e++){var m=mxUtils.getTextContent(q[e]),t=this.stringToCells(this.editor.graph.decompress(m)),v=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,v.width,v.height),b)}u=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=h&&null!=h.parentNode&&0<a.length&&(h.parentNode.removeChild(h),h=null)});null!=w&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(w,function(b){l(b,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=w?this.parseFile(w,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?l(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):l(c,f)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){null!=h?h.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");b.stopPropagation();b.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",Editor.editImage);v.setAttribute("title",mxResources.get("edit"));m.insertBefore(v,m.firstChild);mxEvent.addListener(v,"click",n);mxEvent.addListener(g,
-"dblclick",function(b){mxEvent.getSource(b)==g&&n(b)});c=v.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));m.insertBefore(c,m.firstChild);mxEvent.addListener(c,"click",L);this.isOffline()||".scratchpad"!=b.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,
+null!=b&&"updates"==b.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var g=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var w=e.getCell(b.getAttribute("id"));if(null!=w){try{var k=b.getAttribute("value");if(null!=k){var l=mxUtils.parseXml(k).documentElement;if(null!=l)if("1"==l.getAttribute("replace-value"))e.setValue(w,l);else for(var m=l.attributes,v=0;v<m.length;v++)d.setAttributeForCell(w,m[v].nodeName,0<m[v].nodeValue.length?m[v].nodeValue:null)}}catch(z){null!=
+window.console&&console.log("Error in value for "+w.id+": "+z)}try{var x=b.getAttribute("style");null!=x&&d.model.setStyle(w,x)}catch(z){null!=window.console&&console.log("Error in style for "+w.id+": "+z)}try{var p=b.getAttribute("icon");if(null!=p){var n=0<p.length?JSON.parse(p):null;null!=n&&n.append||d.removeCellOverlays(w);null!=n&&d.addCellOverlay(w,a(n))}}catch(z){null!=window.console&&console.log("Error in icon for "+w.id+": "+z)}try{var F=b.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),
+E=d.getCellGeometry(w);if(null!=E){E=E.clone();for(key in F){var G=parseFloat(F[key]);"dx"==key?E.x+=G:"dy"==key?E.y+=G:"dw"==key?E.width+=G:"dh"==key?E.height+=G:E[key]=parseFloat(F[key])}d.model.setGeometry(w,E)}}}catch(z){null!=window.console&&console.log("Error in icon for "+w.id+": "+z)}}}else if("model"==b.nodeName){for(var L=b.firstChild;null!=L&&L.nodeType!=mxConstants.NODETYPE_ELEMENT;)L=L.nextSibling;null!=L&&(new mxCodec(b.firstChild)).decode(L,e)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&
+(d.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(g=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(b,a){var c=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
+f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(a)var e=new Date,d=e.getFullYear(),g=e.getMonth()+1,k=e.getDate(),l=e.getHours(),m=e.getMinutes(),e=e.getSeconds(),c=c+("-"+(d+"-"+g+"-"+k+"-"+l+"-"+m+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(b){var a=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);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!=b)try{this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==b.realtime&&(b.isEditable()?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"));a=!0;this.isOffline()||null==b.getMode()||this.logEvent({category:"File",action:"open",label:b.getMode()});if(this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),
+title:b.getTitle(),mode:b.getMode()})}catch(q){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(q){}}catch(q){null!=window.console&&console.log("error in fileLoaded:",b,q);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!=q&&null!=q.message?":err:"+encodeURIComponent(q.message):
+"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}catch(u){}this.handleError(q,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?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return a};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(b){if(EditorUi.enableLogging)try{var a=
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=a+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):"")}catch(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,a,c,d,e,g,w){};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(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var a=mxUtils.createXmlDocument(),c=a.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));a.appendChild(c);return mxUtils.getXml(a)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=
+LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var a=this.sidebar.palettes[b];if(null!=a){for(var c=0;c<a.length;c++)a[c].parentNode.removeChild(a[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var a=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=
+null!=b?b:a.firstChild.nextSibling.nextSibling;var c=a.lastChild,d=c.previousSibling;a.insertBefore(c,b);a.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(b){var a=mxUtils.parseXml(b.getData());if("mxlibrary"==a.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(a.documentElement));this.libraryLoaded(b,c,a.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=
+function(b,a,c){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var h=null,d=mxUtils.bind(this,function(a,c){0==a.length&&b.isEditable()?(null==h&&(h=document.createElement("div"),mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),h.style.border="3px dotted lightGray",h.style.textAlign=
+"center",h.style.padding="8px",h.style.color="#B3B3B3",mxUtils.write(h,mxResources.get("dragElementsHere"))),c.appendChild(h)):this.addLibraryEntries(a,c)});if(null!=this.sidebar&&null!=a)for(var e=0;e<a.length;e++)mxUtils.bind(this,function(b){var a=b.data;null!=a&&null!=b.title?this.sidebar.addEntry(b.title,mxUtils.bind(this,function(){a=this.convertDataUri(a);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==b.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+
+"image="+a,b.w,b.h,"",b.title||"",!1,!1,!0)})):null!=b.xml&&null!=b.title&&this.sidebar.addEntry(b.title,mxUtils.bind(this,function(){var a=this.stringToCells(this.editor.graph.decompress(b.xml));return this.sidebar.createVertexTemplateFromCells(a,b.w,b.h,b.title||"",!0,!1,!0)}))})(a[e]);c=null!=c&&0<c.length?c:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),c,!0,mxUtils.bind(this,function(b){d(a,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;c=k.getAttribute("title");null!=
+c&&0<c.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+c);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");k.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("valign","absmiddle");
+v.setAttribute("border","0");v.style.margin="0 3px";var l=null;if(".scratchpad"!=b.title||this.closableScratchpad)m.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(a){if(!mxEvent.isConsumed(a)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(a)}}));if(b.isEditable()){var p=this.editor.graph,n=null,F=mxUtils.bind(this,function(c){this.showLibraryDialog(b.getTitle(),
+g,a,b,b.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){b.setModified(!0);b.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=v.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",mxResources.get("saving")),n.style.cursor="default",n.style.marginRight="2px",n.style.marginTop="-2px",m.insertBefore(n,m.firstChild),k.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(b.getTitle(),a,b,b.getMode(),!0,!0,function(){null!=n&&null!=
+n.parentNode&&(n.parentNode.removeChild(n),k.style.paddingRight=18*m.childNodes.length+"px")})):null==l&&(l=v.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),m.insertBefore(l,m.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(b.getTitle(),a,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==l||b.isModified()||(k.style.paddingRight=18*m.childNodes.length+"px",l.parentNode.removeChild(l),
+l=null)});mxEvent.consume(c)})),k.style.paddingRight=18*m.childNodes.length+"px")}),G=mxUtils.bind(this,function(b,c,f,d){b=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var e=p.getCellGeometry(b[m]);null!=e&&e.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,c.width,c.height,d||"",!0,!1,!1));b={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:c.width,h:c.height};null!=d&&(b.title=d);a.push(b);
+E(f);null!=h&&null!=h.parentNode&&0<a.length&&(h.parentNode.removeChild(h),h=null)}),L=mxUtils.bind(this,function(b){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(b),p.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var a=p.getSelectionCells(),c=p.view.getBounds(a),f=p.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=p.view.translate.x;c.y-=p.view.translate.y;G(a,c)}mxEvent.consume(b)});
+g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",null!=h?h.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.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(b))}),mxUtils.bind(this,function(b){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(g.style.border="3px solid transparent",null!=h&&(h.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,L(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility=
+"visible",g.style.border="3px solid transparent",g.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!=h&&(h.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(b){null!=h?h.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";b.dataTransfer.dropEffect="copy";g.style.cursor=
+"copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.border="3px solid transparent";g.style.cursor="";null!=h&&(h.style.border="3px dotted lightGray");0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,f,m,e,q,v,t,w,k){if(null!=c&&"image/"==f.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),
+c=[new mxCell("",new mxGeometry(0,0,q,v),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,q,v),b,mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=h&&null!=h.parentNode&&0<a.length&&(h.parentNode.removeChild(h),h=null);else{var u=!1,l=mxUtils.bind(this,function(c,f){if(null!=c&&"text/xml"==f){var m=mxUtils.parseXml(c);if("mxlibrary"==m.documentElement.nodeName)try{var e=JSON.parse(mxUtils.getTextContent(m.documentElement));d(e,g);a=a.concat(e);E(b);this.spinner.stop();
+u=!0}catch(X){}else if("mxfile"==m.documentElement.nodeName)try{for(var q=m.documentElement.getElementsByTagName("diagram"),m=0;m<q.length;m++){var e=mxUtils.getTextContent(q[m]),t=this.stringToCells(this.editor.graph.decompress(e)),v=this.editor.graph.getBoundingBoxFromGeometry(t);G(t,new mxRectangle(0,0,v.width,v.height),b)}u=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=h&&
+null!=h.parentNode&&0<a.length&&(h.parentNode.removeChild(h),h=null)});null!=k&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(k,function(b){l(b,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=k?this.parseFile(k,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?l(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":
+"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):l(c,f)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){null!=h?h.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");b.stopPropagation();b.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",Editor.editImage);v.setAttribute("title",mxResources.get("edit"));m.insertBefore(v,m.firstChild);mxEvent.addListener(v,"click",F);mxEvent.addListener(g,
+"dblclick",function(b){mxEvent.getSource(b)==g&&F(b)});c=v.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));m.insertBefore(c,m.firstChild);mxEvent.addListener(c,"click",L);this.isOffline()||".scratchpad"!=b.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(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),m.insertBefore(c,m.firstChild))}k.appendChild(m);k.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,a){for(var c=0;c<b.length;c++){var f=b[c],d=f.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");a.appendChild(this.sidebar.createVertexTemplate(e+
"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(d=this.stringToCells(this.editor.graph.decompress(f.xml)),0<d.length&&a.appendChild(this.sidebar.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=
760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var b=document.getElementById("geFooter");if(null!=b){b.style.visibility="visible";var a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",Dialog.prototype.closeImage);a.setAttribute("title",mxResources.get("hide"));b.appendChild(a);mxClient.IS_QUIRKS&&(a.style.position="relative",a.style.styleFloat="right",a.style.top="-30px",a.style.left="164px",a.style.cursor="pointer");mxEvent.addListener(a,
@@ -7671,7 +7675,7 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
b.style.position="absolute";b.style.overflow="hidden";b.style.borderWidth="3px";var a=document.createElement("a");a.setAttribute("href","javascript:void(0);");a.className="geTitle";a.style.height="100%";a.style.paddingTop="9px";mxUtils.write(a,mxResources.get("moreShapes")+"...");mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(a);return b};EditorUi.prototype.handleError=function(b,a,c){var f=null!=this.spinner&&null!=
this.spinner.pause?this.spinner.pause():function(){},h=null!=b&&null!=b.error?b.error:b;if(null!=h||null!=a){b=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok"),e=null;a=null!=a?a:mxResources.get("error");if(null!=h)if(null!=h.retry&&(d=mxResources.get("cancel"),e=function(){f();h.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&h.type==gapi.drive.realtime.ErrorType.FORBIDDEN)b=mxUtils.htmlEntities(mxResources.get("forbidden"));
else if(404==h.code||404==h.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&h.type==gapi.drive.realtime.ErrorType.NOT_FOUND){b=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),b+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=h.message?b=mxUtils.htmlEntities(h.message):
-null!=h.response&&null!=h.response.error?b=mxUtils.htmlEntities(h.response.error):"undefined"!==window.App&&(h.code==App.ERROR_TIMEOUT?b=mxUtils.htmlEntities(mxResources.get("timeout")):h.code==App.ERROR_BUSY&&(b=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(a,b,d,c,e)}else null!=c&&c()};EditorUi.prototype.showError=function(b,a,c,d,e,g,k,l,p,m,v,x){b=new ErrorDialog(this,b,a,c||mxResources.get("ok"),d,e,g,k,x,l,p);this.showDialog(b.container,m||340,v||150,!0,!1);b.init()};EditorUi.prototype.alert=
+null!=h.response&&null!=h.response.error?b=mxUtils.htmlEntities(h.response.error):"undefined"!==window.App&&(h.code==App.ERROR_TIMEOUT?b=mxUtils.htmlEntities(mxResources.get("timeout")):h.code==App.ERROR_BUSY&&(b=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(a,b,d,c,e)}else null!=c&&c()};EditorUi.prototype.showError=function(b,a,c,d,e,g,w,k,l,m,v,x){b=new ErrorDialog(this,b,a,c||mxResources.get("ok"),d,e,g,w,x,k,l);this.showDialog(b.container,m||340,v||150,!0,!1);b.init()};EditorUi.prototype.alert=
function(b,a){var c=new ErrorDialog(this,null,b,mxResources.get("ok"),a);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(b,a,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,b,function(){f();null!=a&&a()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(b){this.currentFile=b};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(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};EditorUi.prototype.createImageDataUri=function(b,a,c){var f=b.toDataURL("image/"+c);if(6>=f.length||f==b.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=a&&(f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(a))));
return f};EditorUi.prototype.saveCanvas=function(b,a,c){var f="jpeg"==c?"jpg":c,h=this.getBaseFilename()+"."+f;b=this.createImageDataUri(b,a,c);this.saveData(h,f,b.substring(b.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};
@@ -7706,31 +7710,31 @@ p||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)
f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name",
"type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");h.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var m=this.getCurrentFile();null==c&&null!=m&&m.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(m.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(h);var v=this.addLinkSection(f),l=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");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="100%";f.appendChild(t);var p=this.addCheckbox(f,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,n=n=this.addCheckbox(f,mxResources.get("allPages"),h,!h),E=this.addCheckbox(f,mxResources.get("layers"),!0),F=this.addCheckbox(f,mxResources.get("lightbox"),!0),L=this.addEditButton(f,F),y=L.getEditInput();y.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?y.removeAttribute("disabled"):
-y.setAttribute("disabled","disabled");y.checked&&F.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,l.checked,t.value,v.getTarget(),v.getColor(),p.checked,n.checked,E.checked,F.checked,L.getLink())}),null,b,a);this.showDialog(b.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,a,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
+t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value="100%";f.appendChild(t);var p=this.addCheckbox(f,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,n=n=this.addCheckbox(f,mxResources.get("allPages"),h,!h),E=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("lightbox"),!0),L=this.addEditButton(f,G),z=L.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?z.removeAttribute("disabled"):
+z.setAttribute("disabled","disabled");z.checked&&G.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,l.checked,t.value,v.getTarget(),v.getColor(),p.checked,n.checked,E.checked,G.checked,L.getLink())}),null,b,a);this.showDialog(b.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,a,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
"nowrap";var h=document.createElement("h3");mxUtils.write(h,b||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var k=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";b=0;if(null!=k&&k.constructor==window.DriveFile&&!a){b=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var v=document.createElement("div");v.style.whiteSpace="normal";mxUtils.write(v,mxResources.get("linkAccountRequired"));m.appendChild(v);v=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));v.style.marginTop="12px";v.className="geBtn";m.appendChild(v);f.appendChild(m);v=document.createElement("a");v.style.paddingLeft="12px";v.style.color="gray";v.style.fontSize="11px";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("check"));
-m.appendChild(v);mxEvent.addListener(v,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var l=null,q=null;if(null!=c||null!=d)b+=30,mxUtils.write(f,mxResources.get("width")+":"),l=document.createElement("input"),
-l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",f.appendChild(l),mxUtils.write(f,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=d+"px",f.appendChild(q),mxUtils.br(f);var t=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==k||k.constructor!=window.DriveFile||a)u=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var p=this.addCheckbox(f,mxResources.get("lightbox"),!0),n=this.addEditButton(f,p),L=n.getEditInput(),y=this.addCheckbox(f,mxResources.get("layers"),!0);y.style.marginLeft=L.style.marginLeft;y.style.marginBottom="16px";y.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(y.removeAttribute("disabled"),L.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),L.setAttribute("disabled",
-"disabled"));L.checked&&p.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){e(t.getTarget(),t.getColor(),null==u?!0:u.checked,p.checked,n.getLink(),y.checked,null!=l?l.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),h);this.showDialog(a.container,340,254+b,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
+m.appendChild(v);mxEvent.addListener(v,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var q=null,l=null;if(null!=c||null!=d)b+=30,mxUtils.write(f,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%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.width="50px",l.style.marginLeft="6px",l.style.marginBottom="10px",l.value=d+"px",f.appendChild(l),mxUtils.br(f);var t=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==k||k.constructor!=window.DriveFile||a)u=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var p=this.addCheckbox(f,mxResources.get("lightbox"),!0),n=this.addEditButton(f,p),L=n.getEditInput(),z=this.addCheckbox(f,mxResources.get("layers"),!0);z.style.marginLeft=L.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(z.removeAttribute("disabled"),L.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),L.setAttribute("disabled",
+"disabled"));L.checked&&p.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){e(t.getTarget(),t.getColor(),null==u?!0:u.checked,p.checked,n.getLink(),z.checked,null!=q?q.value:null,null!=l?l.value:null)}),null,mxResources.get("create"),h);this.showDialog(a.container,340,254+b,!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(b,a,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(e);var h=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
!0),e=this.editor.graph,k=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=k&&(k.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){c(!h.checked,null!=g?g.checked:!1,null!=k?k.checked:!1)}),null,b,a);this.showDialog(b.container,300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(b,a,c,d,e,g,k,l){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=
this.editor.graph,v="jpeg"==l?196:300,q=document.createElement("h3");mxUtils.write(q,b);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(q);mxUtils.write(f,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%";f.appendChild(t);mxUtils.write(f,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";f.appendChild(w);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=l),p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),n=document.createElement("input");n.style.marginTop="16px";n.style.marginRight=
-"8px";n.style.marginLeft="24px";n.setAttribute("disabled","disabled");n.setAttribute("type","checkbox");g&&(f.appendChild(n),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),v+=26,mxEvent.addListener(p,"change",function(){p.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(n.setAttribute("checked","checked"),n.defaultChecked=!0);var z=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible),y=document.createElement("input");y.style.marginTop=
-"16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");a&&(f.appendChild(y),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),v+=26);var D=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),G=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,G?mxResources.get("allPages"):"",G,!G,null,"jpeg"!=l);M.style.marginLeft="24px";M.style.marginBottom="16px";G||(M.style.display=
-"none");mxEvent.addListener(D,"change",function(){D.checked&&G?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});k&&G||M.setAttribute("disabled","disabled");var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";b=document.createElement("option");b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");
-mxUtils.write(b,mxResources.get("openInNewWindow"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));J.appendChild(b);"svg"==l&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(J),mxUtils.br(f),mxUtils.br(f),v+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=w.value;this.lastExportZoom=t.value;e(t.value,u.checked,!p.checked,z.checked,D.checked,y.checked,w.value,n.checked,
+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";f.appendChild(w);mxUtils.br(f);var p=this.addCheckbox(f,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=l),u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),n=document.createElement("input");n.style.marginTop="16px";n.style.marginRight=
+"8px";n.style.marginLeft="24px";n.setAttribute("disabled","disabled");n.setAttribute("type","checkbox");g&&(f.appendChild(n),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),v+=26,mxEvent.addListener(u,"change",function(){u.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(n.setAttribute("checked","checked"),n.defaultChecked=!0);var y=this.addCheckbox(f,mxResources.get("shadow"),h.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");a&&(f.appendChild(z),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),v+=26);var D=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),H=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(f,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=l);M.style.marginLeft="24px";M.style.marginBottom="16px";H||(M.style.display=
+"none");mxEvent.addListener(D,"change",function(){D.checked&&H?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});k&&H||M.setAttribute("disabled","disabled");var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";b=document.createElement("option");b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");
+mxUtils.write(b,mxResources.get("openInNewWindow"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));J.appendChild(b);"svg"==l&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(J),mxUtils.br(f),mxUtils.br(f),v+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=w.value;this.lastExportZoom=t.value;e(t.value,p.checked,!u.checked,y.checked,D.checked,z.checked,w.value,n.checked,
!M.checked,J.value)}),null,c,d);this.showDialog(c.container,340,v,!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(b,a,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=a){var g=document.createElement("h3");mxUtils.write(g,a);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible&&d,!d),v=this.addCheckbox(f,c),l=this.addCheckbox(f,mxResources.get("lightbox"),!0),q=this.addEditButton(f,l),t=q.getEditInput(),p=1<h.model.getChildCount(h.model.getRoot()),n=this.addCheckbox(f,mxResources.get("layers"),p,!p);n.style.marginLeft=t.style.marginLeft;n.style.marginBottom="12px";n.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?
-(p&&n.removeAttribute("disabled"),t.removeAttribute("disabled")):(n.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&l.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){b(k.checked,m.checked,v.checked,l.checked,q.getLink(),n.checked)}),null,mxResources.get("embed"),e);this.showDialog(a.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible&&d,!d),v=this.addCheckbox(f,c),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),l=this.addEditButton(f,q),t=l.getEditInput(),p=1<h.model.getChildCount(h.model.getRoot()),n=this.addCheckbox(f,mxResources.get("layers"),p,!p);n.style.marginLeft=t.style.marginLeft;n.style.marginBottom="12px";n.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?
+(p&&n.removeAttribute("disabled"),t.removeAttribute("disabled")):(n.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&q.checked?l.getEditSelect().removeAttribute("disabled"):l.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){b(k.checked,m.checked,v.checked,q.checked,l.getLink(),n.checked)}),null,mxResources.get("embed"),e);this.showDialog(a.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
function(b,a,c,d,e,g,k,l){function f(a){var f=" ",m="";d&&(f=" 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"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");
b&&(m+="max-width:100%;");var v="";c&&(v=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+a+'"'+v+(""!=m?' style="'+m+'"':"")+f+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(b){var a=d?this.getFileData(!0):null;b=this.createImageDataUri(b,a,"png");f(b)}),null,null,null,mxUtils.bind(this,function(b){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,a);else if(a=this.getFileData(!0),
h.width*h.height<=MAX_AREA&&a.length<=MAX_REQUEST_SIZE){var v="";c&&(v="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+v+"&xml="+encodeURIComponent(a));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,
-a,c,d,e,g,k){var f=this.editor.graph.getSvg(),h=f.getElementsByTagName("a");if(null!=h)for(var m=0;m<h.length;m++){var v=h[m].getAttribute("href");null!=v&&"#"==v.charAt(0)&&"_blank"==h[m].getAttribute("target")&&h[m].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));a&&this.editor.graph.addSvgShadow(f);if(c){var l=" ",q="";d&&(l="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"+
-(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");b&&(q+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(b){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=q?' style="'+q+'"':"")+l+"/>")}))}else q="",d&&(f.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"+
-(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),b&&(b=parseInt(f.getAttribute("width")),a=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+b+" "+a),q+="max-width:100%;max-height:"+a+"px;",f.removeAttribute("height")),""!=q&&f.setAttribute("style",q),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(b){b=Math.floor((new Date-b)/1E3);var a=Math.floor(b/31536E3);if(1<a)return a+" "+mxResources.get("years");a=Math.floor(b/2592E3);if(1<a)return a+
+a,c,d,e,g,k){var f=this.editor.graph.getSvg(),h=f.getElementsByTagName("a");if(null!=h)for(var m=0;m<h.length;m++){var v=h[m].getAttribute("href");null!=v&&"#"==v.charAt(0)&&"_blank"==h[m].getAttribute("target")&&h[m].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));a&&this.editor.graph.addSvgShadow(f);if(c){var q=" ",l="";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"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");b&&(l+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(b){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=l?' style="'+l+'"':"")+q+"/>")}))}else l="",d&&(f.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"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),l+="cursor:pointer;"),b&&(b=parseInt(f.getAttribute("width")),a=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+b+" "+a),l+="max-width:100%;max-height:"+a+"px;",f.removeAttribute("height")),""!=l&&f.setAttribute("style",l),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(b){b=Math.floor((new Date-b)/1E3);var a=Math.floor(b/31536E3);if(1<a)return a+" "+mxResources.get("years");a=Math.floor(b/2592E3);if(1<a)return a+
" "+mxResources.get("months");a=Math.floor(b/86400);if(1<a)return a+" "+mxResources.get("days");a=Math.floor(b/3600);if(1<a)return a+" "+mxResources.get("hours");a=Math.floor(b/60);return 1<a?a+" "+mxResources.get("minutes"):1==a?a+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(b,a,c,d){b.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(a),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
function(){d()}))}),0)):d()};EditorUi.prototype.decodeNodeIntoGraph=function(b,a){if(null!=b){var c=null;if("diagram"==b.nodeName)c=b;else if("mxfile"==b.nodeName){var f=b.getElementsByTagName("diagram");if(0<f.length){var c=f[0],d=a.getGlobalVariable;a.getGlobalVariable=function(b){return"page"==b?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:d.apply(this,arguments)}}}null!=c&&(f=a.decompress(mxUtils.getTextContent(c)),null!=f&&0<f.length&&(b=mxUtils.parseXml(f).documentElement))}f=
this.editor.graph;try{this.editor.graph=a,this.editor.setGraphXml(b)}catch(u){}finally{this.editor.graph=f}return b};EditorUi.prototype.getEmbeddedPng=function(b,a,c){var f=this.editor.graph,d=null;if(null!=c&&0<c.length)f=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(f.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),f),d=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),
@@ -7743,38 +7747,38 @@ e[b]){e[b]=b;d++;var a="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.te
b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(a){e[b]=a;d--;g()}),mxUtils.bind(this,function(b){d--;g()}),!0,null,"data:"+a+";charset=utf-8;base64,")}})(a(c[k].substring(0,l)),p)}}else b()};EditorUi.prototype.exportToCanvas=function(b,a,c,d,e,g,k,l,p,m,v,x,n,B){g=null!=g?g:!0;x=null!=x?x:this.editor.graph;n=null!=n?n:0;var f=p?null:x.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==p&&
(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(f,null,null,B,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var h=document.createElement("canvas"),m=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=a&&(l=g?Math.min(1,Math.min(3*a/(4*k),a/m)):a/m);m=Math.ceil(l*m)+2*n;k=Math.ceil(l*k)+2*n;h.setAttribute("width",m);h.setAttribute("height",k);var v=h.getContext("2d");null!=
f&&(v.beginPath(),v.rect(0,0,m,k),v.fillStyle=f,v.fill());v.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){v.drawImage(d,n/l,n/l);b(h)},0):(v.drawImage(d,n/l,n/l),b(h))}catch(J){null!=e&&e(J)}});d.onerror=function(b){null!=e&&e(b)};try{m&&this.editor.graph.addSvgShadow(c);var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var b=document.createElement("style");b.setAttribute("type","text/css");b.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(b)}this.convertMath(x,
-c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(y){null!=e&&e(y)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var a=b.convert,c=this;b.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=c.svgBrokenImage.src:!d||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"!=
+c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(z){null!=e&&e(z)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var a=b.convert,c=this;b.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=c.svgBrokenImage.src:!d||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"!=
f.substring(0,19)&&(f=a.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};EditorUi.prototype.convertImages=function(b,a,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,h){for(var g=b.getElementsByTagName(c),m=0;m<g.length;m++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(h));if(null!=m&&"data:"!=m.substring(0,5)){var g=e[m];null==g?(f++,this.convertImageToDataUri(m,function(d){null!=d&&(e[m]=d,c.setAttribute(h,
d));f--;0==f&&a(b)})):c.setAttribute(h,g)}else null!=m&&c.setAttribute(h,m)})(g[m])});c("image","xlink:href");c("img","src");0==f&&a(b)};EditorUi.prototype.loadUrl=function(b,a,c,d,e,g){try{var f=d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b);e=null!=e?e:!0;var h=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=a){var d=b.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&
"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();for(var d=Array(b.length),e=0;e<b.length;e++)d[e]=String.fromCharCode(b[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}a(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},b)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(A){null!=c&&c(A)}};EditorUi.prototype.isCorsEnabledForUrl=
function(b){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)||"https://cdn.rawgit.com/"===b.substring(0,23)||"https://rawgit.com/"===b.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(b)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(b)||/^https?:\/\/[^\/]*\.github\.io\//.test(b)};EditorUi.prototype.convertImageToDataUri=
function(b,a){if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){a(this.createSvgDataUri(b.getText()))}),function(){a(this.svgBrokenImage.src)});else{var c=new Image,f=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var b=document.createElement("canvas"),d=b.getContext("2d");b.height=c.height;b.width=c.width;d.drawImage(c,0,0);try{a(b.toDataURL())}catch(w){a(f.svgBrokenImage.src)}};c.onerror=function(){a(f.svgBrokenImage.src)};c.src=b}};EditorUi.prototype.importXml=
function(b,a,c,d,e){a=null!=a?a:0;c=null!=c?c:0;var f=[];try{var h=this.editor.graph;if(null!=b&&0<b.length){var g=mxUtils.parseXml(b),k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=mxUtils.parseXml(h.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){h.model.beginUpdate();try{for(b=0;b<m.length;b++){m[b].removeAttribute("id");var l=this.updatePageRoot(new DiagramPage(m[b])),
-q=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[q+1]));h.model.execute(new ChangePage(this,l,l,q))}}finally{h.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(f=h.importGraphModel(k,a,c,d))}}catch(C){throw e||this.handleError(C,mxResources.get("invalidOrMissingFile")),C;}return f};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,a,c,d){d=null!=
-d?d:b.name;c=null!=c?c:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var f=new FormData;f.append("file1",b,d);var e=new XMLHttpRequest;e.open("POST",VSD_CONVERT_URL);e.responseType="blob";e.onreadystatechange=mxUtils.bind(this,function(){if(4==e.readyState)if(200<=e.status&&299>=e.status)try{e.response.name=d,this.doImportVisio(e.response,a,c)}catch(z){c(z)}else c({})});
-e.send(f)}else try{this.doImportVisio(b,a,c)}catch(z){c(z)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?b():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.convertLucidChart=function(b,a,c){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{a(LucidImporter.importState(JSON.parse(b)))}catch(q){c(q)}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
-f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.insertAsPreText=function(b,a,c){var f=this.editor.graph,d=null;f.getModel().beginUpdate();try{d=f.insertVertex(null,null,"<pre>"+b+"</pre>",a,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),f.updateCellSize(d,!0)}finally{f.getModel().endUpdate()}return d};EditorUi.prototype.insertTextAt=function(b,a,c,d,e,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,a,c,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var f=this.editor.graph;if("data:image/png;base64,"==b.substring(0,22)){var h=this.extractGraphModelFromPng(b),m=this.importXml(h,a,c,g,!0);if(0<m.length)return m}if("data:image/svg+xml;"==b.substring(0,
-19))try{if(h=null,"data:image/svg+xml;base64,"==b.substring(0,26)?(h=b.substring(b.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(b.substring(b.indexOf(",")+1)),m=this.importXml(h,a,c,g,!0),0<m.length)return m}catch(v){}this.loadImage(b,mxUtils.bind(this,function(d){if("data:"==b.substring(0,5))this.resizeImage(d,b,mxUtils.bind(this,function(b,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(a),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(b)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),h=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(a),f.snap(c),h,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),
-null,b,f.snap(a),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{b=this.editor.graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,a,c,g);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,a,c,g))}),mxUtils.bind(this,function(b){this.handleError(b)}));
-else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(a),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),"<"==b.charAt(0)&&b.indexOf(">")==b.length-1&&(b=mxUtils.htmlEntities(b)),e.value=b,f.updateCellSize(e),/\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(e.value)&&
+q=this.pages.length;null==l.getName()&&(l.setName(mxResources.get("pageWithNumber",[q+1])),l.needsUpdate=!0);h.model.execute(new ChangePage(this,l,l,q))}}finally{h.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(f=h.importGraphModel(k,a,c,d))}}catch(C){throw e||this.handleError(C,mxResources.get("invalidOrMissingFile")),C;}return f};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,
+a,c,d){d=null!=d?d:b.name;c=null!=c?c:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var f=new FormData;f.append("file1",b,d);var e=new XMLHttpRequest;e.open("POST",VSD_CONVERT_URL);e.responseType="blob";e.onreadystatechange=mxUtils.bind(this,function(){if(4==e.readyState)if(200<=e.status&&299>=e.status)try{e.response.name=d,this.doImportVisio(e.response,a,
+c)}catch(y){c(y)}else c({})});e.send(f)}else try{this.doImportVisio(b,a,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?
+b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.convertLucidChart=function(b,a,c){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{a(LucidImporter.importState(JSON.parse(b)))}catch(q){c(q)}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
+mxscript("js/diagramly/Extensions.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.insertAsPreText=function(b,a,c){var f=this.editor.graph,d=null;f.getModel().beginUpdate();try{d=f.insertVertex(null,null,"<pre>"+b+"</pre>",a,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),f.updateCellSize(d,!0)}finally{f.getModel().endUpdate()}return d};EditorUi.prototype.insertTextAt=function(b,a,c,d,e,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,a,c,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var f=this.editor.graph;if("data:image/png;base64,"==b.substring(0,22)){var h=this.extractGraphModelFromPng(b),m=this.importXml(h,a,
+c,g,!0);if(0<m.length)return m}if("data:image/svg+xml;"==b.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==b.substring(0,26)?(h=b.substring(b.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(b.substring(b.indexOf(",")+1)),m=this.importXml(h,a,c,g,!0),0<m.length)return m}catch(v){}this.loadImage(b,mxUtils.bind(this,function(d){if("data:"==b.substring(0,5))this.resizeImage(d,b,mxUtils.bind(this,function(b,d,e){f.setSelectionCell(f.insertVertex(null,
+null,"",f.snap(a),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),h=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(a),f.snap(c),h,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+b+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,b,f.snap(a),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{b=this.editor.graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,a,c,g);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,
+function(b){this.editor.graph.setSelectionCells(this.importXml(b,a,c,g))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(a),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),"<"==b.charAt(0)&&b.indexOf(">")==b.length-1&&(b=mxUtils.htmlEntities(b)),e.value=b,f.updateCellSize(e),/\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(e.value)&&
f.setLinkForCell(e,e.value),e.geometry.width+=f.gridSize,e.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(b){var a=-1;do b/=1024,a++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[a]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var a=b.indexOf(";");0<a&&(b=b.substring(0,a)+b.substring(b.indexOf(",",a+1)))}return b};EditorUi.prototype.isRemoteFileFormat=
function(b,a){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&'{"state":"{\\"Properties\\":'==b.substring(0,26)};EditorUi.prototype.importLocalFile=function(b,a){if(b&&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(!a){var f=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,a){if(null!=a&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(a)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b)}),
-null,a)}else this.editor.graph.setSelectionCells(this.importXml(b))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!a){var d=this.dialog,e=d.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=f;e.apply(d,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(b,a,c,d,e,g,k,l,p,m,v){m=null!=m?m:!0;var f=!1,h=null,q=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,m);null!=l&&l(b)});"image"==a.substring(0,5)?(p=!1,"image/png"==a.substring(0,9)&&(a=v?null:this.extractGraphModelFromPng(b),null!=a&&0<a.length&&(h=this.importXml(a,c,d,m),p=!0)),p||(h=this.editor.graph,a=b.indexOf(";"),0<a&&(b=b.substring(0,a)+b.substring(b.indexOf(",",a+1))),m&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-b+";")])):/(\.*<graphml )/.test(b)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(b,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,m);null!=l&&l(a)})):null!=p&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(p,q)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,k)?(f=!0,this.parseFile(null!=p?p:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=
-a.status&&299>=a.status?q(a.responseText):null!=l&&l(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(b),c,d,!0,null,m));f||null==l||l(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);
-b+="==";break}g=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,c,d,e,g,k,l,p,n,m,v,x){c=null!=c?c:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;m=null!=m?m:this.maxImageBytes;var b=null!=c&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=v||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,
+null,a)}else this.editor.graph.setSelectionCells(this.importXml(b))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!a){var d=this.dialog,e=d.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=f;e.apply(d,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(b,a,c,d,e,g,k,l,p,m,v){m=null!=m?m:!0;var f=!1,h=null,q=mxUtils.bind(this,function(b){var a=
+null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,k)):a=this.importXml(b,c,d,m);null!=l&&l(a)});"image"==a.substring(0,5)?(p=!1,"image/png"==a.substring(0,9)&&(a=v?null:this.extractGraphModelFromPng(b),null!=a&&0<a.length&&(h=this.importXml(a,c,d,m),p=!0)),p||(h=this.editor.graph,a=b.indexOf(";"),0<a&&(b=b.substring(0,a)+b.substring(b.indexOf(",",a+1))),m&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+b+";")])):/(\.*<graphml )/.test(b)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(b,mxUtils.bind(this,function(b){b=this.importXml(b,c,d,m);null!=l&&l(b)})):null!=p&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(p,q)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,k)?(f=!0,this.parseFile(null!=p?p:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=
+b.status&&299>=b.status?q(b.responseText):null!=l&&l(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(b),c,d,!0,null,m));f||null==l||l(h);return h};EditorUi.prototype.base64Encode=function(b){for(var a="",c=0,d=b.length,e,g,k;c<d;){e=b.charCodeAt(c++)&255;if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);
+a+="==";break}g=b.charCodeAt(c++);if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);a+="=";break}k=b.charCodeAt(c++);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(g&240)>>4);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return a};EditorUi.prototype.importFiles=function(a,c,d,e,g,k,l,p,n,m,v,x){c=null!=c?c:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;m=null!=m?m:this.maxImageBytes;var b=null!=c&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=v||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,
6)&&a[t].size>q){h=!0;break}var w=mxUtils.bind(this,function(){var h=this.editor.graph,q=h.gridSize;g=null!=g?g:mxUtils.bind(this,function(a,c,f,d,e,h,m,g,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,m)),null):this.importFile(a,c,f,d,e,h,m,g,k,b,x)});k=null!=k?k:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,w=t,n=[],u=mxUtils.bind(this,function(a,
b){n[a]=b;if(0==--w){this.spinner.stop();if(null!=p)p(n);else{var c=[];h.getModel().beginUpdate();try{for(var f=0;f<n.length;f++){var d=n[f]();null!=d&&(c=c.concat(d))}}finally{h.getModel().endUpdate()}}k(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(b){var k=a[b],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,t=p.indexOf(","),w=decodeURIComponent(escape(atob(p.substring(t+1)))),
-n=mxUtils.parseXml(w),w=n.getElementsByTagName("svg");if(0<w.length){var w=w[0],y=x?null:w.getAttribute("content");null!=y&&"<"!=y.charAt(0)&&"%"!=y.charAt(0)&&(y=unescape(window.atob?atob(y):Base64.decode(y,!0)));null!=y&&"%"==y.charAt(0)&&(y=decodeURIComponent(y));null==y||"<mxfile "!==y.substring(0,8)&&"<mxGraphModel "!==y.substring(0,14)?u(b,mxUtils.bind(this,function(){try{if(p.substring(0,t+1),null!=n){var a=n.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),
-l=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+l);else if(isNaN(m)||isNaN(l)){var w=v.split(" ");3<w.length&&(m=parseFloat(w[2]),l=parseFloat(w[3]))}p=this.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,l)),u=g(p,k.type,c+b*q,d+b*q,Math.max(1,Math.round(m*x)),Math.max(1,Math.round(l*x)),k.name);if(isNaN(m)||isNaN(l)){var y=new Image;y.onload=mxUtils.bind(this,function(){m=
-Math.max(1,y.width);l=Math.max(1,y.height);u[0].geometry.width=m;u[0].geometry.height=l;f.setAttribute("viewBox","0 0 "+m+" "+l);p=this.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));h.setCellStyles("image",p,[u[0]])});y.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(fa){}return null})):u(b,mxUtils.bind(this,function(){return g(y,"text/xml",c+b*q,d+b*q,0,0,k.name)}))}else u(b,mxUtils.bind(this,function(){return null}))}else{w=
-!1;if("image/png"==k.type){var A=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var z=new Image;z.src=a.target.result;u(b,mxUtils.bind(this,function(){return g(A,"text/xml",c+b*q,d+b*q,z.width,z.height,k.name)}));w=!0}}w||(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()}))):
+n=mxUtils.parseXml(w),w=n.getElementsByTagName("svg");if(0<w.length){var w=w[0],z=x?null:w.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)?u(b,mxUtils.bind(this,function(){try{if(p.substring(0,t+1),null!=n){var a=n.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),
+l=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+l);else if(isNaN(m)||isNaN(l)){var w=v.split(" ");3<w.length&&(m=parseFloat(w[2]),l=parseFloat(w[3]))}p=this.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,l)),u=g(p,k.type,c+b*q,d+b*q,Math.max(1,Math.round(m*x)),Math.max(1,Math.round(l*x)),k.name);if(isNaN(m)||isNaN(l)){var z=new Image;z.onload=mxUtils.bind(this,function(){m=
+Math.max(1,z.width);l=Math.max(1,z.height);u[0].geometry.width=m;u[0].geometry.height=l;f.setAttribute("viewBox","0 0 "+m+" "+l);p=this.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));h.setCellStyles("image",p,[u[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(fa){}return null})):u(b,mxUtils.bind(this,function(){return g(z,"text/xml",c+b*q,d+b*q,0,0,k.name)}))}else u(b,mxUtils.bind(this,function(){return null}))}else{w=
+!1;if("image/png"==k.type){var A=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=new Image;y.src=a.target.result;u(b,mxUtils.bind(this,function(){return g(A,"text/xml",c+b*q,d+b*q,y.width,y.height,k.name)}));w=!0}}w||(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,l,p){u(b,mxUtils.bind(this,function(){if(null!=h&&h.length<m){var t=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/l,e/p)):1;return g(h,k.type,c+b*q,d+b*q,Math.round(l*t),Math.round(p*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else g(a.target.result,
k.type,c+b*q,d+b*q,240,160,k.name,function(a){u(b,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+b*q,d+b*q,240,160,k.name,function(a){u(b,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(A)});h?this.confirmImageResize(function(a){f=a;w()},n):w()};EditorUi.prototype.confirmImageResize=function(a,c){c=null!=c?c:!1;var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(f,d){if(f||c)mxSettings.setResizeImages(f?d:null),mxSettings.save();b();a(d)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){d(a,!0)},function(a){d(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,
@@ -7784,7 +7788,7 @@ f=Math.max(1,a.height);if(e&&this.isResampleImage(c,k))try{var h=Math.max(b/g,f/
(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 k=0;if(b(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(b(a,4),"IHDR"!=b(a,4))null!=g&&g();else{b(a,17);g=a.substring(0,k);do{var m=f(a);if("IDAT"==b(a,4)){g=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):
"")+e;e=4294967295;e=this.updateCRC(e,c,0,4);e=this.updateCRC(e,d,0,d.length);g+=h(d.length)+c+d+h(e^4294967295);g+=a.substring(k-8,a.length);break}g+=a.substring(k-8,k-4+m);b(a,m);b(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!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(q){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,c,d){var b=
-new Image;b.onload=function(){c(b)};null!=d&&(b.onerror=d);b.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,c=this.editor.graph;c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(y){a.handleError(y)}return c};var d=this.clearDefaultStyle;
+new Image;b.onload=function(){c(b)};null!=d&&(b.onerror=d);b.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,c=this.editor.graph;c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.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 e=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 e.apply(this,arguments)};var g=c.addClickHandler;c.addClickHandler=function(a,b,f){var d=b;b=function(a,b){if(null==b){var f=mxEvent.getSource(a);"a"==f.nodeName.toLowerCase()&&(b=f.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=d&&d(a,b)};g.call(this,a,b,f)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.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 l=c.getGlobalVariable;c.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:l.apply(this,arguments)};var p=c.labelLinkClicked;c.labelLinkClicked=function(a,b,f){var d=b.getAttribute("href");if(null==d||
@@ -7801,8 +7805,8 @@ mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==f&&(!mxClie
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){n=document.createElement("div");n.style.position="absolute";n.style.top="95px";n.style.left="250px";n.style.width="2000px";n.style.height="30px";n.style.background=
"whiteSmoke";document.body.appendChild(n);var C=document.createElement("div");C.style.position="absolute";C.style.top="125px";C.style.left="220px";C.style.width="30px";C.style.height="1000px";C.style.background="whiteSmoke";document.body.appendChild(C);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,
C,!0);this.hRuler=new mxRuler(this.editor.graph,n,!1)}if("1"==urlParams.styledev){n=document.getElementById("geFooter");null!=n&&(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)})),n.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 H=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:H.apply(this,arguments)}}n=document.getElementById("geInfo");null!=n&&n.parentNode.removeChild(n);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==
+function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),n.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 F=this.isSelectionAllowed;
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:F.apply(this,arguments)}}n=document.getElementById("geInfo");null!=n&&n.parentNode.removeChild(n);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==
E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),f=c.view.translate,d=c.view.scale,e=b.x/d-f.x,h=b.y/d-f.y;mxEvent.isAltDown(a)&&(h=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
e,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var m=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,e,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var g=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=g;var k=null,f=b.getElementsByTagName("img");
null!=f&&1==f.length?(g=f[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(g=b[0].getAttribute("href")));var l=!0,v=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(g,e,h,!0,k,null,l))});k&&g.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;v()},mxEvent.isControlDown(a)):v()}else null!=m&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)?this.loadImage(decodeURIComponent(m),mxUtils.bind(this,
@@ -7835,39 +7839,39 @@ this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessag
this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,c){null!=a?a.getPublicUrl(c):c(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,e=null,g=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,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,m=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{g=JSON.parse(g)}catch(G){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
+("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(M){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(H){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var h=m(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),h,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
-try{m.init()}catch(G){k.postMessage(JSON.stringify({event:"draft",error:G.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();m=1==g.enableRecent;h=1==g.enableSearch;m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,
+try{m.init()}catch(H){k.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();m=1==g.enableRecent;h=1==g.enableSearch;m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,
null,null,null,null,m?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,h?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(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("searchDocsList"==
g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("textContent"==g.action){this.editor.graph.setEnabled(!1);var l=this.editor.graph,m="";if(null!=this.pages)for(h=0;h<this.pages.length;h++){var p=l;this.currentPage!=this.pages[h]&&(p=this.createTemporaryGraph(l.getStylesheet()),p.model.setRoot(this.pages[h].root));m+=this.pages[h].getName()+" "+p.getIndexableText()+" "}else m=l.getIndexableText();this.editor.graph.setEnabled(!0);
k.postMessage(JSON.stringify({event:"textContent",data:m,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var n=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==
g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=this.editor.graph,w=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),t=
-mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);w(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var l=this.createTemporaryGraph(l.getStylesheet()),u=l.getGlobalVariable,y=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?y.getName():"pagenumber"==a?1:u.apply(this,
-arguments)};document.body.appendChild(l.container);l.model.setRoot(y.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,l)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?w("data:image/png;base64,"+a.getText()):
+mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);w(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var l=this.createTemporaryGraph(l.getStylesheet()),u=l.getGlobalVariable,z=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:u.apply(this,
+arguments)};document.body.appendChild(l.container);l.model.setRoot(z.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,l)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?w("data:image/png;base64,"+a.getText()):
t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);n=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=g.format;
else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);
k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}k.postMessage(JSON.stringify(n),"*")}return}if("load"==g.action)d=1==g.autosave,
this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(h=document.createElement("span"),mxUtils.write(h,g.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(h),this.embedFilenameSpan=h),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var z=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=
+null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(h),this.embedFilenameSpan=h),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var y=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=
urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var f=m();if(f!=e&&!c){var d=this.createLoadMessage("autosave");d.xml=f;f=JSON.stringify(d);(window.opener||window.parent).postMessage(f,"*")}e=f}),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!=g&&"function"===typeof g.substring&&
-"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){z(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
-299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&z(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){z(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=m(g),z(g,f))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){y(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
+299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&y(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=m(g),y(g,f))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");mxUtils.write(c,mxResources.get("save"));c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");c.className="geBigButton";c.style.fontSize="12px";c.style.padding="4px 6px 4px 6px";c.style.borderRadius="3px";mxEvent.addListener(c,"click",mxUtils.bind(this,
function(){this.actions.get("save").funct()}));a.appendChild(c);"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.style.fontSize="12px",c.style.marginLeft="6px",c.style.padding="4px",c.style.cursor="pointer",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c));c=document.createElement("a");mxUtils.write(c,mxResources.get("exit"));
c.setAttribute("title",mxResources.get("exit"));c.style.fontSize="12px";c.style.marginLeft="6px";c.style.marginRight="20px";c.style.padding="4px";c.style.cursor="pointer";mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(c);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,c){try{var b=a.split("\n"),f=[];if(0<b.length){var d={},e=null,g=null,k=null,l=null,m="",v="auto",p="auto",n=null,B=null,H=40,E=40,F=100,L=0,y=this.editor.graph;y.getGraphBounds();for(var D=
-function(){null!=c?c(ea):(y.setSelectionCells(ea),y.scrollCellToVisible(y.getSelectionCell()))},G=y.getFreeInsertPoint(),M=G.x,J=G.y,G=J,T=null,P="auto",l=null,S=[],aa=null,Z=null,N=0;N<b.length&&"#"==b[N].charAt(0);){a=b[N];for(N++;N<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[N].substring(1)),N++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var Q=mxUtils.trim(a.substring(1,Y)),K=mxUtils.trim(a.substring(Y+1));"label"==Q?T=y.sanitizeHtml(K):
-"style"==Q?e=K:"parentstyle"==Q?g=K:"identity"==Q&&0<K.length&&"-"!=K?k=K:"parent"==Q&&0<K.length&&"-"!=K?l=K:"namespace"==Q&&0<K.length&&"-"!=K?m=K:"width"==Q?v=K:"height"==Q?p=K:"left"==Q&&0<K.length?n=K:"top"==Q&&0<K.length?B=K:"ignore"==Q?Z=K.split(","):"connect"==Q?S.push(JSON.parse(K)):"link"==Q?aa=K:"padding"==Q?L=parseFloat(K):"edgespacing"==Q?H=parseFloat(K):"nodespacing"==Q?E=parseFloat(K):"levelspacing"==Q?F=parseFloat(K):"layout"==Q&&(P=K)}}}var U=this.editor.csvToArray(b[N]),Q=Y=null;
-if(null!=k||null!=l)for(var R=0;R<U.length;R++)k==U[R]&&(Y=R),l==U[R]&&(Q=R);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var O=0;O<S.length;O++)null==d[S[O].to]&&(d[S[O].to]={});y.model.beginUpdate();try{for(R=N+1;R<b.length;R++){var V=this.editor.csvToArray(b[R]);if(V.length==U.length){var I=null,X=null!=Y?m+V[Y]:null;null!=X&&(I=y.model.getCell(X));null==I&&(I=new mxCell(T,new mxGeometry(M,G,0,0),e||"whiteSpace=wrap;html=1;"),I.vertex=!0,I.id=X);for(var W=0;W<V.length;W++)y.setAttributeForCell(I,U[W],
-V[W]);y.setAttributeForCell(I,"placeholders","1");I.style=y.replacePlaceholders(I,I.style);for(O=0;O<S.length;O++)d[S[O].to][I.getAttribute(S[O].to)]=I;null!=aa&&"link"!=aa&&(y.setLinkForCell(I,I.getAttribute(aa)),y.setAttributeForCell(I,aa,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var da=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=n&&null!=I.getAttribute(n)&&(I.geometry.x=M+parseFloat(I.getAttribute(n))),null!=B&&null!=I.getAttribute(B)&&(I.geometry.y=J+
-parseFloat(I.getAttribute(B))),"@"==v.charAt(0)&&null!=I.getAttribute(v.substring(1))?I.geometry.width=parseFloat(I.getAttribute(v.substring(1))):I.geometry.width="auto"==v?da.width+L:parseFloat(v),"@"==p.charAt(0)&&null!=I.getAttribute(p.substring(1))?I.geometry.height=parseFloat(I.getAttribute(p.substring(1))):I.geometry.height="auto"==p?da.height+L:parseFloat(p),G+=I.geometry.height+E);l=null!=Q?y.model.getCell(m+V[Q]):null;null!=l?(l.style=y.replacePlaceholders(l,g),y.addCell(I,l)):f.push(y.addCell(I))}}for(var ba=
-f.slice(),ea=f.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<f.length;R++){var I=f[R],la=I.getAttribute(ca.from);if(null!=la){y.setAttributeForCell(I,ca.from,null);for(var ma=la.split(","),W=0;W<ma.length;W++){var fa=d[ca.to][ma[W]];null!=fa&&(T=ca.label,null!=ca.fromlabel&&(T=(I.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(fa.getAttribute(ca.tolabel)||"")),ea.push(y.insertEdge(null,null,T||"",ca.invert?fa:I,ca.invert?I:fa,ca.style||y.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?
-I:fa,ba))}}}if(null!=Z)for(R=0;R<f.length;R++)for(I=f[R],W=0;W<Z.length;W++)y.setAttributeForCell(I,mxUtils.trim(Z[W]),null);var ia=new mxParallelEdgeLayout(y);ia.spacing=H;var na=function(){ia.execute(y.getDefaultParent());for(var a=0;a<f.length;a++){var b=y.getCellGeometry(f[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==v&&(b.width=Math.round(y.snap(b.width)));"auto"==p&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==P){var ja=new mxCircleLayout(y);ja.resetEdges=!1;
-var oa=ja.isVertexIgnored;ja.isVertexIgnored=function(a){return oa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ja.execute(y.getDefaultParent());na()},!0,D);D=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ea.length==2*f.length-1&&1==ba.length){y.view.validate();var ka=new mxCompactTreeLayout(y,"horizontaltree"==P);ka.levelDistance=E;ka.edgeRouting=!1;ka.resetEdges=!1;this.executeLayout(function(){ka.execute(y.getDefaultParent(),0<ba.length?ba[0]:null)},
-!0,D);D=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ba.length){y.view.validate();var ga=new mxHierarchicalLayout(y,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.parallelEdgeSpacing=H;ga.interRankCellSpacing=F;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(y.getDefaultParent(),ea);y.moveCells(ea,M,J)},!0,D);D=null}else if("organic"==P||"auto"==P&&ea.length>f.length){y.view.validate();var ha=new mxFastOrganicLayout(y);
-ha.forceConstant=3*E;ha.resetEdges=!1;var pa=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ia=new mxParallelEdgeLayout(y);ia.spacing=H;this.executeLayout(function(){ha.execute(y.getDefaultParent());na()},!0,D);D=null}this.hideDialog()}finally{y.model.endUpdate()}null!=D&&D()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c=
+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,c){try{var b=a.split("\n"),f=[];if(0<b.length){var d={},e=null,g=null,k=null,l=null,m="",v="auto",p="auto",n=null,B=null,F=40,E=40,G=100,L=0,z=this.editor.graph;z.getGraphBounds();for(var D=
+function(){null!=c?c(ea):(z.setSelectionCells(ea),z.scrollCellToVisible(z.getSelectionCell()))},H=z.getFreeInsertPoint(),M=H.x,J=H.y,H=J,T=null,P="auto",l=null,S=[],aa=null,Z=null,N=0;N<b.length&&"#"==b[N].charAt(0);){a=b[N];for(N++;N<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[N].substring(1)),N++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var Q=mxUtils.trim(a.substring(1,Y)),K=mxUtils.trim(a.substring(Y+1));"label"==Q?T=z.sanitizeHtml(K):
+"style"==Q?e=K:"parentstyle"==Q?g=K:"identity"==Q&&0<K.length&&"-"!=K?k=K:"parent"==Q&&0<K.length&&"-"!=K?l=K:"namespace"==Q&&0<K.length&&"-"!=K?m=K:"width"==Q?v=K:"height"==Q?p=K:"left"==Q&&0<K.length?n=K:"top"==Q&&0<K.length?B=K:"ignore"==Q?Z=K.split(","):"connect"==Q?S.push(JSON.parse(K)):"link"==Q?aa=K:"padding"==Q?L=parseFloat(K):"edgespacing"==Q?F=parseFloat(K):"nodespacing"==Q?E=parseFloat(K):"levelspacing"==Q?G=parseFloat(K):"layout"==Q&&(P=K)}}}var U=this.editor.csvToArray(b[N]),Q=Y=null;
+if(null!=k||null!=l)for(var R=0;R<U.length;R++)k==U[R]&&(Y=R),l==U[R]&&(Q=R);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var O=0;O<S.length;O++)null==d[S[O].to]&&(d[S[O].to]={});z.model.beginUpdate();try{for(R=N+1;R<b.length;R++){var V=this.editor.csvToArray(b[R]);if(V.length==U.length){var I=null,X=null!=Y?m+V[Y]:null;null!=X&&(I=z.model.getCell(X));null==I&&(I=new mxCell(T,new mxGeometry(M,H,0,0),e||"whiteSpace=wrap;html=1;"),I.vertex=!0,I.id=X);for(var W=0;W<V.length;W++)z.setAttributeForCell(I,U[W],
+V[W]);z.setAttributeForCell(I,"placeholders","1");I.style=z.replacePlaceholders(I,I.style);for(O=0;O<S.length;O++)d[S[O].to][I.getAttribute(S[O].to)]=I;null!=aa&&"link"!=aa&&(z.setLinkForCell(I,I.getAttribute(aa)),z.setAttributeForCell(I,aa,null));z.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var da=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=n&&null!=I.getAttribute(n)&&(I.geometry.x=M+parseFloat(I.getAttribute(n))),null!=B&&null!=I.getAttribute(B)&&(I.geometry.y=J+
+parseFloat(I.getAttribute(B))),"@"==v.charAt(0)&&null!=I.getAttribute(v.substring(1))?I.geometry.width=parseFloat(I.getAttribute(v.substring(1))):I.geometry.width="auto"==v?da.width+L:parseFloat(v),"@"==p.charAt(0)&&null!=I.getAttribute(p.substring(1))?I.geometry.height=parseFloat(I.getAttribute(p.substring(1))):I.geometry.height="auto"==p?da.height+L:parseFloat(p),H+=I.geometry.height+E);l=null!=Q?z.model.getCell(m+V[Q]):null;null!=l?(l.style=z.replacePlaceholders(l,g),z.addCell(I,l)):f.push(z.addCell(I))}}for(var ba=
+f.slice(),ea=f.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<f.length;R++){var I=f[R],la=I.getAttribute(ca.from);if(null!=la){z.setAttributeForCell(I,ca.from,null);for(var ma=la.split(","),W=0;W<ma.length;W++){var fa=d[ca.to][ma[W]];null!=fa&&(T=ca.label,null!=ca.fromlabel&&(T=(I.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(fa.getAttribute(ca.tolabel)||"")),ea.push(z.insertEdge(null,null,T||"",ca.invert?fa:I,ca.invert?I:fa,ca.style||z.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?
+I:fa,ba))}}}if(null!=Z)for(R=0;R<f.length;R++)for(I=f[R],W=0;W<Z.length;W++)z.setAttributeForCell(I,mxUtils.trim(Z[W]),null);var ia=new mxParallelEdgeLayout(z);ia.spacing=F;var na=function(){ia.execute(z.getDefaultParent());for(var a=0;a<f.length;a++){var b=z.getCellGeometry(f[a]);b.x=Math.round(z.snap(b.x));b.y=Math.round(z.snap(b.y));"auto"==v&&(b.width=Math.round(z.snap(b.width)));"auto"==p&&(b.height=Math.round(z.snap(b.height)))}};if("circle"==P){var ja=new mxCircleLayout(z);ja.resetEdges=!1;
+var oa=ja.isVertexIgnored;ja.isVertexIgnored=function(a){return oa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ja.execute(z.getDefaultParent());na()},!0,D);D=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ea.length==2*f.length-1&&1==ba.length){z.view.validate();var ka=new mxCompactTreeLayout(z,"horizontaltree"==P);ka.levelDistance=E;ka.edgeRouting=!1;ka.resetEdges=!1;this.executeLayout(function(){ka.execute(z.getDefaultParent(),0<ba.length?ba[0]:null)},
+!0,D);D=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ba.length){z.view.validate();var ga=new mxHierarchicalLayout(z,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.parallelEdgeSpacing=F;ga.interRankCellSpacing=G;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(z.getDefaultParent(),ea);z.moveCells(ea,M,J)},!0,D);D=null}else if("organic"==P||"auto"==P&&ea.length>f.length){z.view.validate();var ha=new mxFastOrganicLayout(z);
+ha.forceConstant=3*E;ha.resetEdges=!1;var pa=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ia=new mxParallelEdgeLayout(z);ia.spacing=F;this.executeLayout(function(){ha.execute(z.getDefaultParent());na()},!0,D);D=null}this.hideDialog()}finally{z.model.endUpdate()}null!=D&&D()}}catch(qa){this.handleError(qa)}};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,c,d){a=new LinkDialog(this,a,c,d,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.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 e=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*
@@ -7897,7 +7901,8 @@ mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSet
mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,e,d){EditorUi.call(this,a,e,null!=d?d:"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,d,e){var c=null;try{c=window.open(a)}catch(p){}null==c||void 0===c?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});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(c){null!=window.console&&console.log("Plugin Error:",c,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.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.GOOGLE_REALTIME="0"!=urlParams["google-realtime"];
+App.GOOGLE_APIS="client,drive-share"+(App.GOOGLE_REALTIME?",drive-realtime":"");
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",doors:"/plugins/doors.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"};
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var c=mxUtils.trim(e[d]);if("MODE="==c.substring(0,5)){a=c.substring(5);break}}null!=a&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",a))}return a};
@@ -7910,12 +7915,12 @@ 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&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:",
"1"==urlParams.test?"active":"inactive"))},function(a){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);">Please try refreshing.</a>';document.getElementById("geStatus").getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}})}function c(){mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||
-mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}var g=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,d,f){try{if(a!=g&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){g=a;var e=new Image,h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";e.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+
-h+"&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(x){}});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");var k=document.createElement("iframe");
-k.setAttribute("width","0");k.setAttribute("height","0");k.setAttribute("src","offline.html");document.body.appendChild(k)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var k=null!=mxSettings.settings?mxSettings.getPlugins():null,l={},p=urlParams.p;App.initPluginCallback();if(null!=p){var n="";"1"==urlParams.drawdev&&(n=document.location.protocol+"//drawhost.jgraph.com/");for(var b=p.split(";"),p=0;p<b.length;p++){var f=App.pluginRegistry[b[p]];null!=f&&null==l[f]?(l[f]=!0,mxscript(n+f)):null!=
-window.console&&console.log("Unknown plugin:",b[p])}}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){n=window.location.protocol+"//"+window.location.host;b=!0;for(p=0;p<k.length&&b;p++)"/"!=k[p].charAt(0)&&k[p].substring(0,n.length)!=n&&(b=!1);if(b||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(p=0;p<k.length;p++)try{null==l[k[p]]&&(l[f]=!0,mxscript(k[p]))}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 h=window.opener||window.parent,t=function(a){if(a.source==h)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",t),Editor.configure(b.config,!0),mxSettings.load(),c())}catch(w){null!=window.console&&console.log("Error in configuration: "+w)}};mxEvent.addListener(window,"message",t);h.postMessage(JSON.stringify({event:"load"}),"*")}else c()};mxUtils.extend(App,EditorUi);
+mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}var g=Editor.guid(),k=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,d,f){try{if(a!=k&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){k=a;var e=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",m=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=
+m+"/log?severity="+e+"&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):"")+"&sid="+g}}catch(C){}});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");var l=document.createElement("iframe");
+l.setAttribute("width","0");l.setAttribute("height","0");l.setAttribute("src","offline.html");document.body.appendChild(l)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var l=null!=mxSettings.settings?mxSettings.getPlugins():null,p={},n=urlParams.p;App.initPluginCallback();if(null!=n){var b="";"1"==urlParams.drawdev&&(b=document.location.protocol+"//drawhost.jgraph.com/");for(var f=n.split(";"),n=0;n<f.length;n++){var h=App.pluginRegistry[f[n]];null!=h&&null==p[h]?(p[h]=!0,mxscript(b+h)):null!=
+window.console&&console.log("Unknown plugin:",f[n])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=l&&0<l.length&&"0"!=urlParams.plugins){b=window.location.protocol+"//"+window.location.host;f=!0;for(n=0;n<l.length&&f;n++)"/"!=l[n].charAt(0)&&l[n].substring(0,b.length)!=b&&(f=!1);if(f||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",
+[l.join("\n")]).replace(/\\n/g,"\n")))for(n=0;n<l.length;n++)try{null==p[l[n]]&&(p[h]=!0,mxscript(l[n]))}catch(u){}}}"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 t=window.opener||window.parent,q=function(a){if(a.source==t)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",q),Editor.configure(b.config,!0),mxSettings.load(),c())}catch(y){null!=window.console&&console.log("Error in configuration: "+y)}};mxEvent.addListener(window,"message",q);t.postMessage(JSON.stringify({event:"load"}),"*")}else c()};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";
@@ -7929,11 +7934,11 @@ App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this
if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){"undefined"!==
typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();
-this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(c){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==
-window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&
-(window.DrawDropboxClientCallback=c)});c()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();
-null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",
-IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
+this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:"+App.GOOGLE_APIS,mxUtils.bind(this,function(c){null!=gapi.client&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&
+(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=
+c)});c()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=
+document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),
+this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
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.checkLicense=function(){var a=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var d=e.lastIndexOf("@"),c=e;0<=d&&(c=e.substring(d+1),e=this.crc32(e.substring(0,d))+"@"+c);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&email="+encodeURIComponent(e)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
a.getStatus()&&299>=a.getStatus()){var d=a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,c)}}}catch(p){}}))}};
@@ -7948,17 +7953,19 @@ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxVie
App.prototype.getThumbnail=function(a,e){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),g=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),p=c.getGraphBounds(),n=a/p.width,n=Math.min(1,Math.min(3*a/(4*p.height),n)),b=Math.floor(p.x),f=Math.floor(p.y);l.setAttribute("width",Math.ceil(n*(p.width+4)));l.setAttribute("height",Math.ceil(n*(p.height+4)));var h=l.getContext("2d");
h.scale(n,n);h.translate(-b,-f);var t=c.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";h.save();h.fillStyle=t;h.fillRect(b,f,Math.ceil(p.width+4),Math.ceil(p.height+4));h.restore();var q=new mxJsCanvas(l),u=new mxAsyncCanvas(this.thumbImageCache);q.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(c.getView().getState(c.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(c.getView().getState(c.model.root),q);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);e(l)}));d=!0}}catch(z){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
+b){};w.drawState(c.getView().getState(c.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(c.getView().getState(c.model.root),q);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);e(l)}));d=!0}}catch(y){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
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(e,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+e+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),e=null!=c?c.getMode():null,e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==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"))}})();
-App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?this.openLink("https://trello.com/"):
-d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.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.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&null!=e.desc.parents&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.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 e=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,c,e){this.spinner.stop();null==c&&(c=urlParams.title,e=!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,e))}))}}catch(d){}};
-App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(e){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
+App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:"+App.GOOGLE_APIS,mxUtils.bind(this,function(e){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(){})};
+App.prototype.showRefreshDialog=function(a,e){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(a||mxResources.get("error"),e||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()})))};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
mxResources.get("close"));a.innerHTML=mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},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 c=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==c||this.loadFile(c,!0)}catch(p){null!=document.body&&this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
@@ -8016,14 +8023,14 @@ App.prototype.getLibraryStorageHint=function(a){var e=a.getTitle();a.constructor
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};
App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),e=mxUtils.bind(this,function(d,c){var e=0,k=[],l=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=c&&c()}});if(null!=d)for(var p=0;p<d.length;p++){var n=encodeURIComponent(decodeURIComponent(d[p]));mxUtils.bind(this,
function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var d=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[c]=a;e--;l()}),f=mxUtils.bind(this,function(){a(b);e--;l()});this.pendingLibraries[b]=!0;var g=b.substring(0,1);if("L"==g)(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)):f()}))}catch(A){f()}}),0);else if("U"==g){var p=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=p;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),p))}catch(A){f()}else f()}),function(){f()})}catch(z){f()}}}else{var n=null;"G"==g?null!=
+b&&(b=this.emptyLibraryXml);null!=b?d(new StorageLibrary(this,b,a)):f()}))}catch(A){f()}}),0);else if("U"==g){var p=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=p;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),p))}catch(A){f()}else f()}),function(){f()})}catch(y){f()}}}else{var n=null;"G"==g?null!=
this.drive&&null!=this.drive.user&&(n=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(A){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
f())}}})(n,p)}l()});e(mxSettings.getCustomLibraries(),function(){e((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();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",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,e){var d=this.getCurrentFile(),c=mxResources.get("saving");null!=d&&d.constructor==DriveFile&&(c=mxResources.get("createRevision"));if(null!=d&&this.spinner.spin(document.body,c)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==d&&(d.isModified()?d.isAutosave()||d.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
-e&&e()}),g=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,c,g):d.saveAs(a,c,g)}};
+e&&e()}),g=mxUtils.bind(this,function(a){this.getCurrentFile()==d&&d.isModified()&&d.addUnsavedStatus();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,c,g):d.saveAs(a,c,g)}};
App.prototype.pickFolder=function(a,e,d){d=null!=d?d:!0;var c=this.spinner.pause();d&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){c();if(a.action==google.picker.Action.PICKED){var d=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(d=a.docs[0].id);e(d)}})):d&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){c();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
e(a))})):d&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){c();e(a)})):d&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){c();e(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
App.prototype.exportFile=function(a,e,d,c,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
@@ -8072,100 +8079,100 @@ this.userElement.style.display="none"}else null!=this.userElement&&(this.userEle
var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);c.appendChild(d);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(c)}));return c};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this,
arguments);var a=this.editorUi,d=a.editor.graph,k=mxUtils.bind(d,d.isEnabled),l=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),p=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),n=("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),b=("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,e,f,g,h,k,l,p){b=parseInt(b);!isNaN(b)&&0<
-b&&a.exportSvg(b/100,c,d,e,f,g,h,!k,l,p)}),!0,null,"svg")}));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,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),
-g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.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,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,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,e,f,m,g,h,k,l){a.createHtml(b,c,d,e,f,m,g,h,k,l,mxUtils.bind(this,function(b,c){var d=
-a.getBaseFilename(g),e='\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",e,"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=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
-mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
+"/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,e,g,h,k,l,p){b=parseInt(b);!isNaN(b)&&0<
+b&&a.exportSvg(b/100,c,d,f,e,g,h,!k,l,p)}),!0,null,"svg")}));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,f=document.createElement("h3");mxUtils.write(f,mxResources.get("formatXml"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(f);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),
+g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(e,"change",function(){e.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!e.checked,c?null:!g.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,e,g){b=new EmbedDialog(a,a.createLink(b,c,d,f,e,g,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,e,m,g,h,k,l){a.createHtml(b,c,d,f,e,m,g,h,k,l,mxUtils.bind(this,function(b,c){var d=
+a.getBaseFilename(g),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=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),e=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);e.style.marginBottom="16px";a.pdfPageExport||
+mxEvent.addListener(f,"change",function(){f.checked?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!f.checked,null,!e.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.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();if(null==b||b.constructor!=
-DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,
-fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(E){a.handleError(E)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();
-for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,
-640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");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))});if("undefined"!==typeof MathJax){var f=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),
-f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);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 t="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 startStill startArrow startSize arcSize".split(" ");a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());
-if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=
-0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<t.length;f++){var g=t[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.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,320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+
-"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",
-new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",
-null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return d.shadowVisible});var q=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){q||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){q=!1}),q=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});
-a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});
-a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",
-function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));f=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),
-this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",
-new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),
-c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',
-c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");
-f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),f.value="",this.editorUi.logEvent({category:"Help",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&
-(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);this.addMenuItems(b,["support","-"],c);a.isOffline()||EditorUi.isElectronApp||navigator.standalone||
-"1"==urlParams.embed||this.addMenuItems(b,["downloadDesktop"],c);navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["useOffline"],c);this.addMenuItems(b,["-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),
-mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);
-this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),
-this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),
-c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var m=e.restore;e.restore=function(){g--;m.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();
-mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),
-console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+
-b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel",
-"testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));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,e,f,g,h,m,k,l){a.createHtml(b,c,d,e,f,g,h,m,k,l,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 e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,
-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);f.parentNode.removeChild(f)},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,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,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,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,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,e,f,g,h,m){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+m+';" src="'+a.createLink(b,c,d,e,f,g,k)+'"></iframe>');
-a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.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)f=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,
-360,170,!0,!1)});f=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.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 e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(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.editorUi.actions.addAction("chatWindowTitle...",
-mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(c,e){function f(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,e){var f=d.view,g=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,m=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,m,l){f=g?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/l)):1;a.importFile(b,c,h,k,Math.round(m*f),Math.round(l*f),e,function(b){a.spinner.stop();
-d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.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?c.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},e):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1));null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},e);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},e):p&&c.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},e):n&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},e):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);c.addSeparator(e);isLocalStorage&&
-"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},e);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},e);a.isOffline()||(c.addSeparator(e),c.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()},e))})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),e=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(e,Editor.checkmarkImage);b.addSeparator(c);e=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(e,Editor.checkmarkImage);
-e=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(e,Editor.checkmarkImage);e=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(e,Editor.checkmarkImage)})));f=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()}}));f.isEnabled=function(){return this.enabled&&k.apply(this,arguments)};f.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,
-d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;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.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash=
-"G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.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,["-","googleSites","googleDocs"],c)})));var w=function(b,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),
-c)},z=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);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.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
-d.startEditingAtCell(z("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.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",
-80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;var A=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):w(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),
-c);b.addSeparator(c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);A(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){A(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 e=0;e<
-d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(c,d){null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},d,null,!1);null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):p&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):n&&c.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},
-d);a.isOffline()||(c.addSeparator(d),c.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()},d))}));Editor.enableCustomLibraries&&
-(this.put("newLibrary",new Menu(function(c,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=
-a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):p&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):n&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?
-c.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(c,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?
-c.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):p&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):n&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},
-d):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},d);a.isOffline()||(c.addSeparator(d),c.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(E){a.handleError(E,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()},d))})));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);"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();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],
-c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):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):(this.addMenuItems(b,["-","save","saveAs","-","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.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],
-c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,e){if(480>=screen.width&&a==this.get("help")){e.style.paddingRight="0px";e.style.paddingLeft="0px";e.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign",
-"bottom");c.setAttribute("src",Editor.helpImage);e.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&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")};
+DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],f=c.entries.length-1;0<=f;f--)(function(c){d.push({modifiedDate:c.client_modified,
+fileSize:c.size,getXml:function(d,f){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,f)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[f]);var e=new RevisionDialog(a,d);a.showDialog(e.container,640,480,!0,!0);e.init()}catch(E){a.handleError(E)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();
+for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(f,e){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){f(a.getData())},function(a){e(a)})},function(a){e(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,
+640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");a.actions.addAction("refresh",function(){function b(){c.setModified(!1);a.loadFile(c.getHash(),!0)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()},null,null,"Alt+Shift+R");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))});if("undefined"!==typeof MathJax){var f=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)});
+f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&
+a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],f=0;f<b.length;f++)d.getModel().isVertex(b[f])&&c.push(b[f]);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 t="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 startStill startArrow startSize arcSize".split(" ");
+a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var f=b[c],e=f.indexOf("=");if(0<=e){var g=f.substring(0,e),f=f.substring(e+1);null==a.copiedStyle[g]&&"none"==f&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
+null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var f=d.view.getState(b[c]),e=0;e<t.length;e++){var g=t[e],h=a.copiedStyle[g];f.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.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,
+320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,f,e,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,f,e,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
+function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,f,e,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,f,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return d.shadowVisible});var q=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){q||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){q=!1}),
+q=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=
+new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
+this.tagsWindow.window.isVisible()}));f=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));
+f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var f=""==d?mxResources.get("automatic"):mxLanguageMap[d],e=null;""!=f&&(e=b.addItem(f,
+null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(e,Editor.checkmarkImage));return e});d("");b.addSeparator(c);for(var f in mxLanguageMap)d(f)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=
+b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&
+a.isOffline())this.addMenuItems(b,["about"],c);else{var f=b.addItem("Search:",null,null,c,null,null,!1);f.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";f.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+
+encodeURIComponent(b)),e.value="",this.editorUi.logEvent({category:"Help",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(e.value="")}));f.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(b,
+["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);this.addMenuItems(b,["support","-"],c);a.isOffline()||EditorUi.isElectronApp||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["downloadDesktop"],c);navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["useOffline"],c);this.addMenuItems(b,["-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",
+mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),
+mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.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;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),
+this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,f=mxUtils.createXmlDocument(),e=f.createElement("output");f.appendChild(e);f=new mxXmlCanvas2D(e);f.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));f.scale(1/c);var g=0,m=f.save;f.save=function(){g++;m.apply(this,arguments)};var h=
+f.restore;f.restore=function(){g--;h.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),f);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),
+this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",
+mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&
+299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-",
+"testShowConsole"]))})));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,e,g,h,m,k,l){a.createHtml(b,c,d,f,e,g,h,m,k,l,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 e=a.document.createElement("div");e.marginLeft=
+"26px";e.marginTop="26px";mxUtils.write(e,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";e.appendChild(f);a.document.body.insertBefore(e,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);e.parentNode.removeChild(e)},
+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,e,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,f,e,g,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,e,
+g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,f,e,g,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,e,g,h,m){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+m+';" src="'+a.createLink(b,c,d,f,e,g,k)+'"></iframe>');a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,
+null,null,null,function(b,c,d,f,e,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,f,e,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.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)f=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});f=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&
+(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.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.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(c,f){function e(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,f){var e=d.view,g=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,g.x/e.scale-e.translate.x)+4*d.gridSize)),m=d.snap(Math.ceil(Math.max(0,
+(g.y+g.height)/e.scale-e.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(e){var g=!0,k=mxUtils.bind(this,function(){a.resizeImage(e,b,mxUtils.bind(this,function(e,k,l){e=g?Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l)):1;a.importFile(b,c,h,m,Math.round(k*e),Math.round(l*e),f,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=
+a;k()}):k()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,m,0,0,f,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.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?c.addItem(mxResources.get("googleDrive")+
+"...",null,function(){e(a.drive)},f):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},f,null,!1));null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){e(a.gitHub)},f);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},f):p&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},f,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",
+null,function(){e(a.oneDrive)},f):n&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},f,null,!1);null!=a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){e(a.trello)},f):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},f,null,!1);c.addSeparator(f);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},f);mxClient.IS_IOS||c.addItem(mxResources.get("device")+
+"...",null,function(){a.importLocalFile(!0)},f);a.isOffline()||(c.addSeparator(f),c.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()},f))})).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)})));f=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()}}));f.isEnabled=function(){return this.enabled&&k.apply(this,arguments)};f.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,["-","googleSites","googleDocs"],c)})));var w=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)},y=function(a,b,c,f){var e=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(e.x,e.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.addAction("insertText",
+function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(y("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.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&
+!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;var A=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):w(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,
+"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),c);b.addSeparator(c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);A(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){A(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(c,d){null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},
+d):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):p&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,
+function(){a.pickFile(App.MODE_ONEDRIVE)},d):n&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},
+d);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(c.addSeparator(d),c.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()},d))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(c,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&c.addItem(mxResources.get("github")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):p&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):n&&c.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);mxClient.IS_IOS||
+c.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(c,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):l&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&c.addItem(mxResources.get("github")+
+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):p&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):n&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=
+a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},d):b&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},d);a.isOffline()||(c.addSeparator(d),
+c.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(E){a.handleError(E,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()},d))})));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);"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();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-","refresh","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):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):(this.addMenuItems(b,["-","save","saveAs","-","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.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,
+e){if(480>=screen.width&&a==this.get("help")){e.style.paddingRight="0px";e.style.paddingLeft="0px";e.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);e.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&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,e,d){this.ui=a;this.page=e;this.previous=this.name=d}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,e,d){this.ui=a;this.oldIndex=e;this.newIndex=d}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,e){this.ui=a;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e))}
@@ -8179,11 +8186,11 @@ 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),d=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,d){for(var e=d.getProperty("edit").changes,g=0;g<e.length;g++)if(e[g]instanceof SelectPage||e[g]instanceof RenamePage||e[g]instanceof MovePage||e[g]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
Graph.prototype.createViewState=function(a){var e=a.getAttribute("page"),d=parseFloat(a.getAttribute("pageScale")),c=parseFloat(a.getAttribute("pageWidth")),g=parseFloat(a.getAttribute("pageHeight")),k=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):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!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(c)||isNaN(g)?this.pageFormat:new mxRectangle(0,0,c,c),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}};
+shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(c)||isNaN(g)?mxSettings.getPageFormat():new mxRectangle(0,0,c,g),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,e){e.setAttribute("grid",null==a||a.gridEnabled?"1":"0");e.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize);e.setAttribute("guides",null==a||a.guidesEnabled?"1":"0");e.setAttribute("tooltips",null==a||a.tooltips?"1":"0");e.setAttribute("connect",null==a||a.connect?"1":"0");e.setAttribute("arrows",null==a||a.arrows?"1":"0");e.setAttribute("fold",null==a||a.foldingEnabled?"1":"0");e.setAttribute("page",null==a&&this.defaultPageVisible||
-null!=a&&a.pageVisible?"1":"0");e.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var d=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=d&&(e.setAttribute("pageWidth",d.width),e.setAttribute("pageHeight",d.height));e.setAttribute("background",null!=a&&null!=a.background?a.background:this.defaultGraphBackground);null!=a&&null!=a.backgroundImage&&e.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));e.setAttribute("math",null!=a&&a.mathEnabled?
-"1":"0");e.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0")};
+null!=a&&a.pageVisible?"1":"0");e.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var d=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=d&&(e.setAttribute("pageWidth",d.width),e.setAttribute("pageHeight",d.height));null!=a&&null!=a.background&&e.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&e.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));e.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");e.setAttribute("shadow",
+null!=a&&a.shadowVisible?"1":"0")};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
@@ -8222,36 +8229,36 @@ c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(e.relatedPage.root=a.decodeCell(
"selectDescendants";var e=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,d,p,n){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var b=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),l=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),
this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=b;d=e.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(a){return w.isVertex(a)&&d(a)}function d(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 e(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 p(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 n(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),e=u.cloneCells([d[0],a]);u.model.setTerminal(e[0],u.model.getTerminal(d[0],!0),!0);var f=p(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;u.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=u.view.getState(a),k=u.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=u.getOutgoingEdges(u.model.getTerminal(d[0],!0));if(null!=m){for(var n=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,w=g=d=0;w<m.length;w++){var q=u.model.getTerminal(m[w],!1);if(f==p(q)){var t=u.view.getState(q);q!=a&&null!=t&&(n&&b!=t.getCenterX()<h.getCenterX()||!n&&b!=t.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,t)&&(d=10+Math.max(d,(Math.min(l.x+l.width,t.x+t.width)-Math.max(l.x,t.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,t.y+t.height)-Math.max(l.y,t.y))/k))}}n?g=0:d=0;for(w=0;w<m.length;w++)if(q=u.model.getTerminal(m[w],!1),f==p(q)&&(t=u.view.getState(q),q!=a&&null!=
-t&&(n&&b!=t.getCenterX()<h.getCenterX()||!n&&b!=t.getCenterY()<h.getCenterY()))){var v=[];u.traverse(t.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});u.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(e,c)}finally{u.model.endUpdate()}}function b(a){u.model.beginUpdate();try{var b=p(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 e=u.model.getParent(a),f=e.geometry,g=[];u.view.currentRoot!=
-e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);u.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);u.moveCells(g,h,k);return u.addCells(d,e)}finally{u.model.endUpdate()}}function f(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),e=b.geometry,f=[];u.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=u.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=u.view.getBounds(f),l=p(a),m=u.view.translate,n=u.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/n-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/n-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/n-m.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function h(a,b,c){a=u.getOutgoingEdges(a);c=u.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=u.view.getState(u.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function t(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?q.actions.get("selectParent").funct():
+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 n(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 e=p(a),g=c.geometry;e==mxConstants.DIRECTION_SOUTH||e==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-=g.x,f[1].geometry.y-=g.y);var h=u.view.getState(a),k=u.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*k;var m=u.getOutgoingEdges(u.model.getTerminal(d[0],!0));if(null!=m){for(var n=e==mxConstants.DIRECTION_SOUTH||
+e==mxConstants.DIRECTION_NORTH,q=g=d=0;q<m.length;q++){var w=u.model.getTerminal(m[q],!1);if(e==p(w)){var t=u.view.getState(w);w!=a&&null!=t&&(n&&b!=t.getCenterX()<h.getCenterX()||!n&&b!=t.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,t)&&(d=10+Math.max(d,(Math.min(l.x+l.width,t.x+t.width)-Math.max(l.x,t.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,t.y+t.height)-Math.max(l.y,t.y))/k))}}n?g=0:d=0;for(q=0;q<m.length;q++)if(w=u.model.getTerminal(m[q],!1),e==p(w)&&(t=u.view.getState(w),w!=a&&null!=
+t&&(n&&b!=t.getCenterX()<h.getCenterX()||!n&&b!=t.getCenterY()<h.getCenterY()))){var v=[];u.traverse(t.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});u.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(f,c)}finally{u.model.endUpdate()}}function b(a){u.model.beginUpdate();try{var b=p(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),e=f.geometry,g=[];u.view.currentRoot!=
+f&&(d[1].geometry.x-=e.x,d[1].geometry.y-=e.y);u.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);u.moveCells(g,h,k);return u.addCells(d,f)}finally{u.model.endUpdate()}}function f(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,e=[];u.view.currentRoot==b&&(f=new mxRectangle);for(var g=0;g<c.length;g++){var h=u.model.getTerminal(c[g],!1);null!=h&&e.push(h)}var k=u.view.getBounds(e),l=p(a),m=u.view.translate,n=u.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/n-m.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/n-m.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=l==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==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/n-m.y+-f.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function h(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 e=u.view.getState(u.model.getTerminal(a[f],!1));null!=e&&(!b&&Math.min(e.x+e.width,c.x+c.width)>=Math.max(e.x,c.x)||b&&Math.min(e.y+e.height,c.y+c.height)>=Math.max(e.y,c.y))&&d.push(e)}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 t(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?q.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=h(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 q=this,u=q.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 z=q.menus.createPopupMenu;q.menus.createPopupMenu=function(a,b,d){z.apply(this,arguments);if(1==u.getSelectionCount()){b=u.getSelectionCell();var e=u.getOutgoingEdges(b);a.addSeparator();null!=e&&0<e.length&&(c(u.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));c(u.getSelectionCell())&&(a.addSeparator(),0<u.getIncomingEdges(b).length&&
+mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=q.menus.createPopupMenu;q.menus.createPopupMenu=function(a,b,d){y.apply(this,arguments);if(1==u.getSelectionCount()){b=u.getSelectionCell();var f=u.getOutgoingEdges(b);a.addSeparator();null!=f&&0<f.length&&(c(u.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));c(u.getSelectionCell())&&(a.addSeparator(),0<u.getIncomingEdges(b).length&&
this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};q.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");q.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");q.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");q.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 A=u.removeCells;u.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&d(g)&&(e.push(g),g=w.getTerminal(g,!1));c(g)?(u.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=u.getIncomingEdges(a[f]),
-a=a.concat(g)):e.push(a[f])}a=e;return A.apply(this,arguments)};q.hoverIcons.getStateAt=function(a,b,d){return c(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(b,d))};var m=u.duplicateCells;u.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=u.view.getState(d[e]);if(null!=f&&c(f.cell))for(var g=u.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=m.call(this,a,b);if(h.length==
-a.length)for(e=0;e<a.length;e++)if(c(a[e])){var k=u.getIncomingEdges(h[e]),g=u.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,u.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var v=u.moveCells;u.moveCells=function(a,b,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),p=null!=m?m.style:this.getCellStyle(f);if(null!=a&&c(f)&&"1"==mxUtils.getValue(p,"treeFolding",
-"0")){for(var n=0;n<a.length;n++)if(c(a[n])||u.model.isEdge(a[n])&&null==u.model.getTerminal(a[n],!0)){f=u.model.getParent(a[n]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var w=u.getIncomingEdges(a[0]);if(0<w.length){var q=u.view.getState(u.model.getTerminal(w[0],!0));if(null!=q){var t=u.view.getState(l);null!=t&&(b=(t.getCenterX()-q.getCenterX())/u.view.scale,d=(t.getCenterY()-q.getCenterY())/u.view.scale)}}}}k=v.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(n=0;n<
-k.length;n++)if(this.model.isEdge(k[n]))c(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[n],!0))&&this.model.setTerminal(k[n],l,!0);else if(c(a[n])&&(w=u.getIncomingEdges(a[n]),0<w.length))if(!e)c(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(w[0],!0))&&this.model.setTerminal(w[0],l,!0);else if(0==u.getIncomingEdges(k[n]).length){m=l;if(null==m||m==u.model.getParent(a[n]))m=u.model.getTerminal(w[0],!0);e=this.cloneCells([w[0]])[0];this.addEdge(e,u.getDefaultParent(),m,k[n])}}finally{this.model.endUpdate()}return k};
-if(null!=q.sidebar){var x=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=function(a,b,d,e){var f=u.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),c(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=u.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),
+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 A=u.removeCells;u.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],e=0;e<a.length;e++){var g=a[e];w.isEdge(g)&&d(g)&&(f.push(g),g=w.getTerminal(g,!1));c(g)?(u.traverse(g,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),g=u.getIncomingEdges(a[e]),
+a=a.concat(g)):f.push(a[e])}a=f;return A.apply(this,arguments)};q.hoverIcons.getStateAt=function(a,b,d){return c(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(b,d))};var m=u.duplicateCells;u.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var e=u.view.getState(d[f]);if(null!=e&&c(e.cell))for(var g=u.getIncomingEdges(e.cell),e=0;e<g.length;e++)mxUtils.remove(g[e],a)}this.model.beginUpdate();try{var h=m.call(this,a,b);if(h.length==
+a.length)for(f=0;f<a.length;f++)if(c(a[f])){var k=u.getIncomingEdges(h[f]),g=u.getIncomingEdges(a[f]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,u.getDefaultParent(),this.model.getTerminal(g[0],!0),h[f])}}}finally{this.model.endUpdate()}return h};var v=u.moveCells;u.moveCells=function(a,b,d,f,e,g,h){var k=null;this.model.beginUpdate();try{var l=e,m=this.view.getState(e),p=null!=m?m.style:this.getCellStyle(e);if(null!=a&&c(e)&&"1"==mxUtils.getValue(p,"treeFolding",
+"0")){for(var n=0;n<a.length;n++)if(c(a[n])||u.model.isEdge(a[n])&&null==u.model.getTerminal(a[n],!0)){e=u.model.getParent(a[n]);break}if(null!=l&&e!=l&&null!=this.view.getState(a[0])){var q=u.getIncomingEdges(a[0]);if(0<q.length){var w=u.view.getState(u.model.getTerminal(q[0],!0));if(null!=w){var t=u.view.getState(l);null!=t&&(b=(t.getCenterX()-w.getCenterX())/u.view.scale,d=(t.getCenterY()-w.getCenterY())/u.view.scale)}}}}k=v.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(n=0;n<
+k.length;n++)if(this.model.isEdge(k[n]))c(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[n],!0))&&this.model.setTerminal(k[n],l,!0);else if(c(a[n])&&(q=u.getIncomingEdges(a[n]),0<q.length))if(!f)c(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==u.getIncomingEdges(k[n]).length){m=l;if(null==m||m==u.model.getParent(a[n]))m=u.model.getTerminal(q[0],!0);f=this.cloneCells([q[0]])[0];this.addEdge(f,u.getDefaultParent(),m,k[n])}}finally{this.model.endUpdate()}return k};
+if(null!=q.sidebar){var x=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=function(a,b,d,f){var e=u.model,g=null;e.beginUpdate();try{if(g=x.apply(this,arguments),c(a))for(var h=0;h<g.length;h++)if(e.isEdge(g[h])&&null==e.getTerminal(g[h],!0)){e.setTerminal(g[h],a,!0);var k=u.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{e.endUpdate()}return g}}var C={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),
83:q.actions.get("selectSiblings")},B=q.onKeyDown;q.onKeyDown=function(a){try{if(u.isEnabled()&&!u.isEditing()&&c(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingEdges(u.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?b(u.getSelectionCell()):f(u.getSelectionCell()):13==a.which&&(d=n(u.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],!1)):u.setSelectionCell(d[d.length-
1]),null!=q.hoverIcons&&q.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=C[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(t(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(t(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(t(u.getSelectionCell(),mxConstants.DIRECTION_EAST),
-mxEvent.consume(a)):40==a.keyCode&&(t(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var H=u.connectVertex;u.connectVertex=function(a,d,e,g,h,k){var l=u.getIncomingEdges(a);return c(a)&&0<l.length?(e=p(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?b(a):n(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):
-H.call(this,a,d,e,g,h,k)};u.getSubtree=function(a){var b=[a];c(a)&&!e(a)&&u.traverse(a,!0,function(a,c){null!=c&&0>mxUtils.indexOf(b,c)&&b.push(c);0>mxUtils.indexOf(b,a)&&b.push(a);return!0});return b};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);c(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=
+mxEvent.consume(a)):40==a.keyCode&&(t(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var F=u.connectVertex;u.connectVertex=function(a,d,e,g,h,k){var l=u.getIncomingEdges(a);return c(a)&&0<l.length?(e=p(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?b(a):n(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):
+F.call(this,a,d,e,g,h,k)};u.getSubtree=function(a){var b=[a];c(a)&&!e(a)&&u.traverse(a,!0,function(a,c){null!=c&&0>mxUtils.indexOf(b,c)&&b.push(c);0>mxUtils.indexOf(b,a)&&b.push(a);return!0});return b};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);c(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+
+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 G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.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 c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),d=this.editorUi.editor.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 c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
-c.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 b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.relative=!0;b.edge=!0;c.insertEdge(b,!0);d.insertEdge(b,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);e.insertEdge(g,!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 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;c.insertEdge(q,!0);k.insertEdge(q,!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;c.insertEdge(w,!0);u.insertEdge(w,!1);a.insert(b);a.insert(g);a.insert(q);a.insert(w);a.insert(c);a.insert(d);a.insert(e);a.insert(k);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],
+c.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 b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.relative=!0;b.edge=!0;c.insertEdge(b,!0);d.insertEdge(b,!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 e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);f.insertEdge(e,!1);var g=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;");g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!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;c.insertEdge(w,!0);u.insertEdge(w,!1);a.insert(b);a.insert(e);a.insert(k);a.insert(w);a.insert(c);a.insert(d);a.insert(f);a.insert(g);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],
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 c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],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 c=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],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",
@@ -8267,7 +8274,7 @@ g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("di
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";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);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 d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}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; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }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-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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); }a.geMenuItem:active { opacity: 0.4; }.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; }";
-document.getElementsByTagName("head")[0].appendChild(c)}catch(w){}var g=function(a,b,c,d,e,f,g){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";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+document.getElementsByTagName("head")[0].appendChild(c)}catch(w){}var g=function(a,b,c,d,f,e,g){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";g(a);this.window=new mxWindow(b,a,c,d,f,e,!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=
@@ -8288,20 +8295,20 @@ null);h.apply(this,arguments)};var t=EditorUi.prototype.setGraphEnabled;EditorUi
b.actions.get("insertText").label=mxResources.get("text");b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("insertRectangle").label=mxResources.get("rectangle");b.actions.get("insertEllipse").label=mxResources.get("ellipse");b.actions.get("insertRhombus").label=mxResources.get("rhombus");b.actions.get("insertImage").label=mxResources.get("image")+"...";b.actions.get("insertLink").label=mxResources.get("link")+"...";b.actions.get("createShape").label=mxResources.get("shape")+
"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importFile",new Action("File...",function(){c.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&b.importFiles(a.files,null,null,b.maxImageSize)});a.click()}));b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){c.popupMenuHandler.hideMenu();
b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){e(b)}));b.actions.put("toggleFormat",
-new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,
-"new open - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile&&(b.menus.addMenuItems(a,["-","share"],c),null!=d.realtime&&b.menus.addMenuItems(a,["chatWindowTitle"],
-c),a.addSeparator(c));b.menus.addMenuItems(a,"- outline layers - find tags".split(" "),c);mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var d=this.get("openFrom"),f=d.funct;d.funct=function(a,c){f.apply(this,arguments);a.addSeparator(c);b.menus.addSubmenu("openRecent",a,c)}}this.put("save",new Menu(mxUtils.bind(this,
-function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||b.menus.addMenuItems(a,["-","revisionHistory"],c);b.menus.addMenuItems(a,["-","autosave"],
-c)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){g.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=h&&b.menus.addSubmenu("language",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips"],
-c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&(a.addSeparator(c),b.menus.addMenuItem(a,"plugins",c))})));this.put("insertAdvanced",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);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);a.addSeparator(c);b.menus.addSubmenu("insertLayout",a,c);b.menus.addSubmenu("insertAdvanced",a,c)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-l=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);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<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[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,d){var e=g.menus.get(a),f=n.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),l);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.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,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="",mxUtils.setOpacity(f,d||40)):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 b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?k.insertBefore(h,g.statusContainer):k.appendChild(h);null!=f?(h.style.backgroundImage=
+new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+b.menus.addMenuItems(a,"new open - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);null!=d&&d.constructor==DriveFile&&(b.menus.addMenuItems(a,["-","share"],c),null!=d.realtime?b.menus.addMenuItems(a,["chatWindowTitle"],
+c):b.menus.addMenuItems(a,["-","refresh"],c),a.addSeparator(c));b.menus.addMenuItems(a,"- outline layers - find tags".split(" "),c);mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var d=this.get("openFrom"),f=d.funct;d.funct=function(a,c){f.apply(this,arguments);a.addSeparator(c);b.menus.addSubmenu("openRecent",a,
+c)}}this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||b.menus.addMenuItems(a,["-","revisionHistory"],
+c);b.menus.addMenuItems(a,["-","autosave"],c)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){g.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=h&&b.menus.addSubmenu("language",a,c);a.addSeparator(c);b.menus.addMenuItems(a,
+["scrollbars","tooltips"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&(a.addSeparator(c),b.menus.addMenuItem(a,"plugins",c))})));this.put("insertAdvanced",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);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);a.addSeparator(c);b.menus.addSubmenu("insertLayout",a,c);b.menus.addSubmenu("insertAdvanced",a,c)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+l=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<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[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,d){var f=g.menus.get(a),e=n.addMenu(mxResources.get(a),mxUtils.bind(this,function(){f.funct.apply(this,arguments)}),l);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
+e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.setAttribute("title",mxResources.get(a));g.menus.menuCreated(f,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML="",mxUtils.setOpacity(e,d||40)):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
+"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?k.insertBefore(h,g.statusContainer):k.appendChild(h);null!=f?(h.style.backgroundImage=
"url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=
""):(h.setAttribute("disabled","disabled"),mxUtils.setOpacity(h,null!=f?10:20),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function c(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",
-b.appendChild(a[c]));null!=g.statusContainer?k.insertBefore(b,g.statusContainer):k.appendChild(b);return b}function e(){for(var e=k.firstChild;null!=e;){var f=e.nextSibling;"geMenuItem"!=e.className&&"geItem"!=e.className||e.parentNode.removeChild(e);e=f}l=k.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(e=900>d)||a("diagram");c([e?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
+b.appendChild(a[c]));null!=g.statusContainer?k.insertBefore(b,g.statusContainer):k.appendChild(b);return b}function f(){for(var e=k.firstChild;null!=e;){var f=e.nextSibling;"geMenuItem"!=e.className&&"geItem"!=e.className||e.parentNode.removeChild(e);e=f}l=k.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(e=900>d)||a("diagram");c([e?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
null,mxResources.get("shapes"),g.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",g.actions.get("image"),
e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)]);f=a("insert",!0,e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);c([f,b(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
@@ -8311,15 +8318,15 @@ c([b("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.tra
640<=d?b("",e.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=d?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null])}e=g.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&540<=d?(f=n.addMenu("",e.funct),f.setAttribute("title",mxResources.get("language")),f.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),k.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}u.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var k=document.createElement("div");k.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 l=null,n=new Menubar(g,k);g.statusContainer=
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),k.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}u.apply(this,arguments);var e=document.createElement("div");e.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+e.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(e);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var k=document.createElement("div");k.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 l=null,n=new Menubar(g,k);g.statusContainer=
g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var p=g.descriptorChanged;g.descriptorChanged=function(){p.apply(this,arguments);var a=g.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);k.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else k.removeAttribute("title")};g.setStatusText(g.editor.getStatus());k.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";k.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=
-document.createElement("div");g.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 f=g.diagramContainer.parentNode,q=document.createElement("div");q.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var t=g.menus.get("viewZoom");if(null!=
+document.createElement("div");g.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 e=g.diagramContainer.parentNode,q=document.createElement("div");q.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var t=g.menus.get("viewZoom");if(null!=
t){this.tabContainer.style.right="70px";var D=n.addMenu("100%",t.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";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(g.tabContainer.style.height)-1+"px";D.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";q.appendChild(D);t=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*g.editor.graph.view.scale)+
-"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);g.editor.addListener("resetGraphView",t);g.editor.addListener("pageSelected",t);var G=g.setGraphEnabled;g.setGraphEnabled=function(){G.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(g.tabContainer);q.appendChild(k);q.appendChild(g.diagramContainer);f.appendChild(q);g.updateTabContainer();
-e();mxEvent.addListener(window,"resize",function(){e();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};
+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);g.editor.addListener("resetGraphView",t);g.editor.addListener("pageSelected",t);var H=g.setGraphEnabled;g.setGraphEnabled=function(){H.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(g.tabContainer);q.appendChild(k);q.appendChild(g.diagramContainer);e.appendChild(q);g.updateTabContainer();
+f();mxEvent.addListener(window,"resize",function(){f();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();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={};
@@ -8916,7 +8923,7 @@ c,b,p)}};h.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this
-1==p.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=p.indexOf("image=")?!1:!0};return h}();w.mxVsdxCodec=l;l.__class="com.mxgraph.io.mxVsdxCodec"})(m.io||(m.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
(function(c){(function(m){(function(w){var l=function(h){function f(){var b=h.call(this)||this;b.RESPONSE_END="";b.RESPONSE_DIAGRAM_START="";b.RESPONSE_DIAGRAM_END="";b.RESPONSE_HEADER="";return b}__extends(f,h);f.prototype.decodeVssx=function(b,a,d){var g=this,p="<mxlibrary>[";this.decodeVsdx(b,function(b){p=p.concat(b);var d=g.vsdxModel.getMasterShapes(),f=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b=[];null==
a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(g.vsdxModel.getPages())).next();if(null!=d){var D={str:"",toString:function(){return this.str}},l=0===b.length?"":",",w=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=w[a];var b=m.createMxGraph(),g=a.getMasterShape().getShape(),g=new c.mxgraph.io.vsdx.VsdxShape(f,g,!f.isEdge(g),d,null,m.vsdxModel),p=1;if(null!=a.pageSheet){var x=p=1,E=a.pageSheet.DrawingScale;null!=
-E&&(p=parseFloat(E.getAttribute("V")));E=a.pageSheet.PageScale;null!=E&&(x=parseFloat(E.getAttribute("V")));p=x/p}x=null;if(g.isVertex())for(m.edgeShapeMap.entries=[],m.parentsMap.entries=[],x=m.addShape(b,g,b.getDefaultParent(),0,1169),g=function(a){null==a.entries&&(a.entries=[]);return a.entries}(m.edgeShapeMap),E=0;E<g.length;E++){var t=g[E],z=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
+E&&(p=parseFloat(E.getAttribute("V"))||1);E=a.pageSheet.PageScale;null!=E&&(x=parseFloat(E.getAttribute("V"))||1);p=x/p}x=null;if(g.isVertex())for(m.edgeShapeMap.entries=[],m.parentsMap.entries=[],x=m.addShape(b,g,b.getDefaultParent(),0,1169),g=function(a){null==a.entries&&(a.entries=[]);return a.entries}(m.edgeShapeMap),E=0;E<g.length;E++){var t=g[E],z=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
b)return a.entries[d].value;return null}(m.parentsMap,t.getKey());m.addUnconnectedEdge(b,z,t.getValue(),1169)}else x=m.addUnconnectedEdge(b,null,g,1169);if(null!=x){m.scaleGraph(b,p);g=m.normalizeGeo(x);m.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";D.str=D.str.concat(l);D.str=D.str.concat('{"xml":"');b=h.prototype.processPage.call(m,b,null);D.str=D.str.concat(b);D.str=D.str.concat('","w":');D.str=D.str.concat(g.width);D.str=D.str.concat(',"h":');D.str=
D.str.concat(g.height);D.str=D.str.concat(',"title":');a=a.getName();null==a&&(a="");a=JSON.stringify(mxUtils.htmlEntities(a));D.str=D.str.concat(a);D.str=D.str.concat("}");l=","}};for(var m=g,C=0;C<w.length;C++)b(C);p=p.concat(D)}p=p.concat("]</mxlibrary>");a&&a(p)},d)};f.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,d);this.transPoint(a.offset,d);b=a.points;if(null!=b)for(var g=0;g<b.length;g++)this.transPoint(b[g],
d);this.transPoint(d,d)}return a};f.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};f.prototype.processPage=function(b,a){var d=b.getModel(),g="",p="",f;for(f in d.cells){var E=d.cells[f];if(b.getDefaultParent()===d.getParent(E)){var g=g.concat(p),g=g.concat('{"xml":"'),x=this.createMxGraph();x.addCell(E);this.sanitiseGraph(x);if(0===x.getModel().getChildCount(x.getDefaultParent()))return"continue";p=this.normalizeGeo(E);x=h.prototype.processPage.call(this,x,null);g=g.concat(x);g=
@@ -8924,8 +8931,8 @@ g.concat('","w":');g=g.concat(p.width);g=g.concat(',"h":');g=g.concat(p.height);
p.entries[t].key===x){p=p.entries[t].value;break a}p=null}null!=p&&(E=p.getName())}g=g.concat(E);g=g.concat('"}');p=","}}this.RESPONSE_DIAGRAM_START=0<g.length?",":"";return g};return f}(c.mxgraph.io.mxVsdxCodec);w.mxVssxCodec=l;l.__class="com.mxgraph.io.mxVssxCodec"})(m.io||(m.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a,b,g){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=g}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA=
function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();c.Row=f;f.__class="com.mxgraph.io.vsdx.geometry.Row"})(c.geometry||(c.geometry={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
-(function(c){(function(m){(function(m){(function(l){(function(h){var f=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(g){}return null};b.getRowObj=function(a,d){var g=a.getAttribute("T"),p=b.getIndex(a),f;f=(f=a.getAttribute("Del"))&&f.equals?f.equals("1"):"1"===f;if(!f){var E=null;p<=d.length&&(E=d[p-1]);var x=f=null,t=null,h=null,
-l=null,m=null,w=null,A=null;null!=E&&(f=E.x,x=E.y,t=E.getA(),h=E.getB(),l=E.getC(),m=E.getD(),A=E.getFormulaA(),w=E.getFormulaE());for(var E=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),F=0;F<E.length;F++){var B=E[F],Y=B.getAttribute("N"),J=B.getAttribute("V");switch(Y){case "X":f=b.getDoubleVal(J);break;case "Y":x=b.getDoubleVal(J);break;case "A":t=b.getDoubleVal(J);A=B.getAttribute("V");break;case "B":h=b.getDoubleVal(J);break;case "C":l=b.getDoubleVal(J);break;case "D":m=b.getDoubleVal(J);
+(function(c){(function(m){(function(m){(function(l){(function(h){var f=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(g){}return null};b.getRowObj=function(a,d){var g=a.getAttribute("T"),p=b.getIndex(a),f;f=(f=a.getAttribute("Del"))&&f.equals?f.equals("1"):"1"===f;if(!f){var E=null;p<=d.length&&(E=d[p-1]);var x=f=null,t=null,
+h=null,l=null,m=null,w=null,A=null;null!=E&&(f=E.x,x=E.y,t=E.getA(),h=E.getB(),l=E.getC(),m=E.getD(),A=E.getFormulaA(),w=E.getFormulaE());for(var E=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),F=0;F<E.length;F++){var B=E[F],Y=B.getAttribute("N"),J=B.getAttribute("V");switch(Y){case "X":f=b.getDoubleVal(J);break;case "Y":x=b.getDoubleVal(J);break;case "A":t=b.getDoubleVal(J);A=B.getAttribute("V");break;case "B":h=b.getDoubleVal(J);break;case "C":l=b.getDoubleVal(J);break;case "D":m=b.getDoubleVal(J);
break;case "E":w=J}}switch(g){case "MoveTo":return new c.mxgraph.io.vsdx.geometry.MoveTo(p,f,x);case "LineTo":return new c.mxgraph.io.vsdx.geometry.LineTo(p,f,x);case "ArcTo":return new c.mxgraph.io.vsdx.geometry.ArcTo(p,f,x,t);case "Ellipse":return new c.mxgraph.io.vsdx.geometry.Ellipse(p,f,x,t,h,l,m);case "EllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.EllipticalArcTo(p,f,x,t,h,l,m);case "InfiniteLine":return new c.mxgraph.io.vsdx.geometry.InfiniteLine(p,f,x,t,h);case "NURBSTo":return new c.mxgraph.io.vsdx.geometry.NURBSTo(p,
f,x,t,h,l,m,w);case "PolylineTo":return new c.mxgraph.io.vsdx.geometry.PolylineTo(p,f,x,A);case "RelCubBezTo":return new c.mxgraph.io.vsdx.geometry.RelCubBezTo(p,f,x,t,h,l,m);case "RelEllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(p,f,x,t,h,l,m);case "RelLineTo":return new c.mxgraph.io.vsdx.geometry.RelLineTo(p,f,x);case "RelMoveTo":return new c.mxgraph.io.vsdx.geometry.RelMoveTo(p,f,x);case "RelQuadBezTo":return new c.mxgraph.io.vsdx.geometry.RelQuadBezTo(p,f,x,t,h);case "SplineKnot":return new c.mxgraph.io.vsdx.geometry.SplineKnot(p,
f,x,t);case "SplineStart":return new c.mxgraph.io.vsdx.geometry.SplineStart(p,f,x,t,h,l,m)}}return new c.mxgraph.io.vsdx.geometry.DelRow(p)};return b}();h.RowFactory=f;f.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(l.geometry||(l.geometry={}))})(m.vsdx||(m.vsdx={}))})(m.io||(m.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
@@ -8946,7 +8953,7 @@ h.BULLET="Bullet";h.CASE="Case";h.CHARACTER="Character";h.COLOR="Color";h.COLOR_
"TextBlock";h.TEXT_STYLE="TextStyle";h.TO_PART="ToPart";h.TO_SHEET="ToSheet";h.TOP_MARGIN="TopMargin";h.TRUE="1";h.TXT_ANGLE="TxtAngle";h.TXT_HEIGHT="TxtHeight";h.TXT_LOC_PIN_X="TxtLocPinX";h.TXT_LOC_PIN_Y="TxtLocPinY";h.TXT_PIN_X="TxtPinX";h.TXT_PIN_Y="TxtPinY";h.TXT_WIDTH="TxtWidth";h.TYPE="Type";h.TYPE_GROUP="Group";h.TYPE_SHAPE="Shape";h.UNIQUE_ID="UniqueID";h.VERTICAL_ALIGN="VerticalAlign";h.WIDTH="Width";h.X_CON="XCon";h.X_DYN="XDyn";h.X="X";h.Y_CON="YCon";h.Y_DYN="YDyn";h.Y="Y";h.HIDE_TEXT=
"HideText";h.VSDX_ID="vsdxID";h.CONNECT_TO_PART_WHOLE_SHAPE=3;c.mxVsdxConstants=h;h.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
(function(c){(function(m){(function(m){(function(l){var h=function(){function f(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),
-this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}f.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))}catch(a){return 0}};f.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||
+this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}f.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))||0}catch(a){return 0}};f.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||
null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};f.prototype.processGeoElem=function(b){var a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var d=0;d<b.length;d++)0<this.rows.push(null)}for(d=0;d<a.length;d++){var g=a[d],p=g.getAttribute("N"),g=g.getAttribute("V");switch(p){case "NoFill":this.noFill=
function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoLine":this.noLine=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoShow":this.noShow=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoSnap":this.noSnap=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoQuickDrag":this.noQuickDrag=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g)}}a=this.rows.length;d=!1;for(p=0;p<b.length;p++)g=c.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[p],
this.rows),g.getIndex()>a?(0<this.rows.push(g),d=!0):this.rows[g.getIndex()-1]=g;d&&function(a,b){b.compare?a.sort(function(a,d){return b.compare(a,d)}):a.sort(b)}(this.rows,new f.mxVsdxGeometry$0(this))};f.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};f.prototype.getIndex$=function(){return this.index};f.prototype.isNoFill=function(){return this.noFill};
@@ -9201,7 +9208,7 @@ this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){f.prototype
a.equals?a.equals(b):a===b}(h,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"EnhMetaFile"))g="png";else return;h=a.firstChild;if(null!=h){if(null!=h&&1==h.nodeType){var l=h;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(l.nodeName.toLowerCase(),"rel")&&(l=l.getAttribute("r:id"),null!=l&&0!==l.length)){var h=p.lastIndexOf("/"),m="",t="";try{m=p.substring(0,h),t=p.substring(h,p.length)}catch(z){return}h=d.getRelationship(l,m+"/_rels"+t+".rels");if(null!=h){p=h.getAttribute("Target")||
"";l=h.getAttribute("Type");h=p.lastIndexOf("/");try{p=p.substring(h+1,p.length)}catch(z){return}null!=l&&function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(l,"image")&&(this.imageData={},(h=d.getMedia(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=h,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(p.toLowerCase(),".bmp")&&(g="jpg"),this.imageData.iType=g):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}h=
h.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(g,c.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var g=0;g<a.length;g++){var d=a[g],p=d.getAttribute("IX")||
-"";if(0!==p.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[p]="";else{for(var h=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",m="",t=0;t<h.length;t++){var z=h[t],d=z.getAttribute("N"),z=z.getAttribute("V");switch(d){case "Value":l=z;break;case "Format":m=z}}if(0!==l.length){try{(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(m,"{{")&&(l=(new Date(b.VSDX_START_TIME+
+"";if(0!==p.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[p]="";else{for(var h=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",m="",t=0;t<h.length;t++){var z=h[t],d=z.getAttribute("N"),z=z.getAttribute("V")||z.textContent||"";switch(d){case "Value":l=z;break;case "Format":m=z}}if(0!==l.length){try{(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(m,"{{")&&(l=(new Date(b.VSDX_START_TIME+
Math.floor(864E5*parseFloat(l)))).toString())}catch(aa){}this.fields[p]=l}}}}else f.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===
this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.textToList=function(a,b){if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"")){var d=this.getBullet(b);if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(d,
"0")){var f=a.split("\n");f[f.length-1]||f.pop();for(var h="",l=0;l<f.length;l++)h+=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(f[l],"li");h=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(h,"ul");f={};(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"4")?f["list-style-type"]="square":f["list-style-type"]="disc";return h=this.insertAttributes(h,f)}}return a};b.prototype.getTextParagraphFormated=function(a){var b="",g={};g.align=this.getHorizontalAlign(this.pp,!0);g["margin-left"]=this.getIndentLeft(this.pp);
@@ -9291,7 +9298,7 @@ b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabel
if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Organizational unit")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Organizational unit")){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0),d=null,d="0.0",f=null,f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),
f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Inh")&&(d="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");for(var l=b.split(";"),m="",t=0;t<l.length;t++){var z=l[t],z=z.trim();(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(z,"tabHeight=")&&
(m=z.split("tabHeight=").join(""))}(function(a,b){return a&&a.equals?a.equals(b):a===b})(m,"")&&(m="20");l=parseFloat(m);d=parseFloat(d);f=parseFloat(f);m=h.height;d=.1*h.width+100*d;d=new mxPoint(d,m-m*f-l/2);a.getGeometry().offset=d}else if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Domain 3D")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Domain 3D")){h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;
-d="0.0";f=null;f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F"),f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F"));h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="0.0";if(function(a,b){return a&&a.equals?a.equals(b):
+d="0.0";f=null;f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="0.0";if(function(a,b){return a&&a.equals?a.equals(b):
a===b}(f,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);m=h.height;d=.1*h.width+100*d;d=new mxPoint(d,m-m*f);a.getGeometry().offset=d}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var d=b.getType(this.getShape());this.styleDebug("shape type = "+d);if(null!=this.imageData||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,d)&&null!=this.masterShape&&
null!=this.masterShape.imageData){var f=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var h=function(a,b){return a[b]?a[b]:null}(f,"iType"),l=function(a,b){return a[b]?a[b]:null}(f,"iData");a.image="data:image/"+h+","+l;return a}var m=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(m,""))return this.styleDebug("No geom found"),a;var x=Graph.prototype.compress(m);a[mxConstants.STYLE_SHAPE]="stencil("+x+")"}catch(t){console.error(t.message,
t)}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Off-page reference")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+this.shapeName);
@@ -9303,8 +9310,8 @@ a===b}(f.toLowerCase(),"width*1")&&function(a,b){return a&&a.equals?a.equals(b):
b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"controls.row_")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isRotatedLabel=function(){var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V","");null!=this.masterShape&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")&&(a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(a,b){return a&&
a.equals?a.equals(b):a===b}(a,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0.0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*
(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_Y),
-0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var f=[];if(null!=this.shape){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.GEOM);if(0<h.length&&(h=h.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=h)){for(var h=h.getAttribute("F"),
-h=h.replace(RegExp("NURBS\\(","g"),""),h=h.replace(RegExp("\\)","g"),""),h=h.replace(RegExp(",","g")," "),h=h.replace(RegExp("\\s\\s","g")," "),h=h.split(" "),l=h.length,m=[];0<l--;)m.push(0);for(l=0;l<h.length;l++)m[l]=parseFloat(h[l]);for(l=2;l+4<h.length;l+=4){var x=new mxPoint,t=m[l+3];x.x=Math.floor(Math.round(100*(b.x+Math.min(100,Math.abs(a.x-b.x))*m[l+2]))/100);x.y=Math.floor(Math.round(100*(b.y-100*t))/100);0<f.push(x)}return f}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=
+0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var f=[];if(null!=this.shape){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.GEOM);if(0<h.length&&(h=h.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=h)){for(var h=h.getAttribute("F")||
+"",h=h.replace(RegExp("NURBS\\(","g"),""),h=h.replace(RegExp("\\)","g"),""),h=h.replace(RegExp(",","g")," "),h=h.replace(RegExp("\\s\\s","g")," "),h=h.split(" "),l=h.length,m=[];0<l--;)m.push(0);for(l=0;l<h.length;l++)m[l]=parseFloat(h[l]);for(l=2;l+4<h.length;l+=4){var x=new mxPoint,t=m[l+3];x.x=Math.floor(Math.round(100*(b.x+Math.min(100,Math.abs(a.x-b.x))*m[l+2]))/100);x.y=Math.floor(Math.round(100*(b.y-100*t))/100);0<f.push(x)}return f}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=
this.getId().toString();a=this.getForm();if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,""))for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getEdgeMarker(!0);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]=
"0"),this.styleMap[mxConstants.STYLE_STARTARROW]=d);d=this.getEdgeMarker(!1);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=d);d=Math.round(this.getStartArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+d);d=Math.round(this.getFinalArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=
""+d);d=Math.round(this.getLineWidth())|0;1!==d&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+d);d=this.getStrokeColor();(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=c.mxgraph.io.vsdx.mxVsdxConstants.TRUE);this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,d=this.getFillColor(),function(a,b){return a&&a.equals?a.equals(b):
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 38dd2166..65254c35 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -187,6 +187,16 @@ 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';
/**
+ * Switch to disable Google realtime. If true this will convert existing realtime files.
+ */
+App.GOOGLE_REALTIME = urlParams['google-realtime'] != '0';
+
+/**
+ * Switch to disable Google realtime. If true this will convert existing realtime files.
+ */
+App.GOOGLE_APIS = 'client,drive-share' + ((App.GOOGLE_REALTIME) ? ',drive-realtime' : '');
+
+/**
* Defines plugin IDs for loading via p URL parameter. Update the table at
* https://desk.draw.io/solution/articles/16000042546
*/
@@ -400,6 +410,7 @@ App.getStoredMode = function()
*/
App.main = function(callback, createUi)
{
+ var sessionId = Editor.guid();
var lastErrorMessage = null;
// Changes top level error handling
@@ -420,16 +431,19 @@ App.main = function(callback, createUi)
else if (message != null && message.indexOf('DocumentClosedError') < 0)
{
lastErrorMessage = message;
- var img = new Image();
var severity = (message.indexOf('NetworkError') >= 0 || message.indexOf('SecurityError') >= 0 ||
message.indexOf('NS_ERROR_FAILURE') >= 0 || message.indexOf('out of memory') >= 0) ?
'CONFIG' : 'SEVERE';
var logDomain = window.DRAWIO_LOG_URL != null ? window.DRAWIO_LOG_URL : '';
- img.src = logDomain + '/log?severity=' + severity + '&v=' + encodeURIComponent(EditorUi.VERSION) +
- '&msg=clientError:' + encodeURIComponent(message) + ':url:' + encodeURIComponent(window.location.href) +
- ':lnum:' + encodeURIComponent(linenumber) +
- ((colno != null) ? ':colno:' + encodeURIComponent(colno) : '') +
- ((err != null && err.stack != null) ? '&stack=' + encodeURIComponent(err.stack) : '');
+
+ var img = new Image();
+ img.src = logDomain + '/log?severity=' + severity + '&v=' + encodeURIComponent(EditorUi.VERSION) +
+ '&msg=clientError:' + encodeURIComponent(message) +
+ ':url:' + encodeURIComponent(window.location.href) +
+ ':lnum:' + encodeURIComponent(linenumber) +
+ ((colno != null) ? ':colno:' + encodeURIComponent(colno) : '') +
+ ((err != null && err.stack != null) ? '&stack=' + encodeURIComponent(err.stack) : '') +
+ '&sid=' + sessionId;
}
}
catch (err)
@@ -438,7 +452,7 @@ App.main = function(callback, createUi)
}
};
}
-
+
if (window.mxscript != null)
{
/**
@@ -960,10 +974,10 @@ App.prototype.init = function()
if (window.DrawGapiClientCallback != null)
{
- gapi.load(((urlParams['picker'] != '0') ? 'picker,': '') + 'auth:client,drive-realtime,drive-share', mxUtils.bind(this, function(resp)
+ gapi.load(((urlParams['picker'] != '0') ? 'picker,': '') + 'auth:' + App.GOOGLE_APIS, mxUtils.bind(this, function(resp)
{
// Starts the app without the Google Option if the API fails to load
- if (gapi.drive != null && gapi.drive.realtime != null)
+ if (gapi.client != null)
{
gapi.client.load('drive', 'v2', mxUtils.bind(this, function()
{
@@ -1751,7 +1765,7 @@ App.prototype.appIconClicked = function(evt)
if (mode == App.MODE_GOOGLE)
{
- if (file.desc != null && file.desc.parents.length > 0)
+ if (file.desc != null && file.desc.parents != null && file.desc.parents.length > 0)
{
// Opens containing folder
this.openLink('https://drive.google.com/drive/folders/' + file.desc.parents[0].id);
@@ -1901,13 +1915,13 @@ App.prototype.loadGapi = function(then)
{
if (typeof gapi !== 'undefined')
{
- gapi.load(((urlParams['picker'] != '0') ? 'picker,': '') + 'auth:client,drive-realtime,drive-share', mxUtils.bind(this, function(resp)
+ gapi.load(((urlParams['picker'] != '0') ? 'picker,': '') + 'auth:' + App.GOOGLE_APIS, mxUtils.bind(this, function(resp)
{
// Starts the app without the Google Option if the API fails to load
- if (gapi.drive == null || gapi.drive.realtime == null)
+ if (gapi.client == null)
{
- this.mode = null;
this.drive = null;
+ this.mode = null;
then();
}
else
@@ -1919,8 +1933,8 @@ App.prototype.loadGapi = function(then)
{
if (gapi.client.drive == null)
{
- this.mode = null;
this.drive = null;
+ this.mode = null;
}
then();
@@ -2002,6 +2016,26 @@ App.prototype.load = function()
};
/**
+ * Adds the listener for automatically saving the diagram for local changes.
+ */
+App.prototype.showRefreshDialog = function(title, message)
+{
+ if (!this.showingRefreshDialog)
+ {
+ this.showingRefreshDialog = true;
+
+ this.showError(title || mxResources.get('error'),
+ message || mxResources.get('redirectToNewApp'),
+ mxResources.get('refresh'), mxUtils.bind(this, function()
+ {
+ this.spinner.spin(document.body, mxResources.get('connecting'));
+ this.editor.graph.setEnabled(false);
+ window.location.reload();
+ }));
+ }
+};
+
+/**
* Called in start after the spinner stops.
*/
App.prototype.showAlert = function(message)
@@ -4104,6 +4138,11 @@ App.prototype.save = function(name, done)
var error = mxUtils.bind(this, function(resp)
{
+ if (this.getCurrentFile() == file && file.isModified())
+ {
+ file.addUnsavedStatus();
+ }
+
// Spinner is paused and resumed in handleError
this.handleError(resp, (resp != null) ? mxResources.get('errorSavingFile') : null);
});
diff --git a/src/main/webapp/js/diagramly/DistanceGuides.js b/src/main/webapp/js/diagramly/DistanceGuides.js
index b35a72c8..11dbf766 100644
--- a/src/main/webapp/js/diagramly/DistanceGuides.js
+++ b/src/main/webapp/js/diagramly/DistanceGuides.js
@@ -26,6 +26,8 @@
{
var yShift = delta.y;
var xShift = delta.x;
+ var hasHorGuides = false;
+ var hasVerGuides = false;
if (this.states != null && bounds != null && delta != null)
{
@@ -68,11 +70,13 @@
}
var eqCy = 0;
+ var dy = 0;
+ var fixedDy = 0;
+ var midDy = 0;
var eqCx = 0;
- var dy = 0.0;
- var fixedDy = 0.0;
- var dx = 0.0;
- var fixedDx = 0.0;
+ var dx = 0;
+ var fixedDx = 0;
+ var midDx = 0;
var shift = 5 * scale;
if (verticalCells.length > 1)
@@ -84,29 +88,75 @@
return s1.y - s2.y;
});
+ var newStatePassed = false;
+ var firstMoving = newState == verticalCells[0];
+ var lastMoving = newState == verticalCells[verticalCells.length - 1];
+
+ //find the mid space and use it as dy and fixedDy
+ if (!firstMoving && !lastMoving)
+ {
+ for (var i = 1; i < verticalCells.length - 1; i++)
+ {
+ if (newState == verticalCells[i])
+ {
+ var s1 = verticalCells[i - 1];
+ var s3 = verticalCells[i + 1];
+ midDy = (s3.y - s1.y - s1.height - newState.height) / 2;
+ dy = midDy;
+ fixedDy = dy;
+ break;
+ }
+ }
+ }
+
for (var i = 0; i < verticalCells.length - 1; i++)
{
var s1 = verticalCells[i];
var s2 = verticalCells[i + 1];
var isMovingOne = newState == s1 || newState == s2;
-
var curDy = s2.y - s1.y - s1.height;
- if (!isMovingOne)
- {
- fixedDy = curDy;
- }
-
- if (eqCy == 0)
+ newStatePassed |= newState == s1;
+
+ if (dy == 0 && eqCy == 0)
{
dy = curDy;
eqCy = 1;
}
- else if (Math.abs(dy - curDy) <= (isMovingOne? tolerance : tolerance))
+ else if (Math.abs(dy - curDy) <= (isMovingOne || (i == 1 && newStatePassed)? tolerance : 0)) //non-moving cells must have exact same dy, must handle the case of having the first cell moving so we allow tolerance for second cell (until fixedDy is non-zero)
{
eqCy += 1;
}
- }
+ else if (eqCy > 1 && newStatePassed) //stop and ignore the following cells
+ {
+ verticalCells = verticalCells.slice(0, i + 1);
+ break;
+ }
+ else if (verticalCells.length - i >= 3 && !newStatePassed) //reset and start counting again
+ {
+ eqCy = 0;
+ dy = midDy != 0? midDy : 0;
+ fixedDy = dy;
+ verticalCells.splice(0, i == 0? 1 : i);
+ i = -1;
+ }
+ else
+ {
+ break;
+ }
+
+ if (fixedDy == 0 && !isMovingOne)
+ {
+ fixedDy = curDy;
+ //Update dy such that following cells shows equal distance guides without tolerance
+ dy = fixedDy;
+ }
+ }
+
+ if (verticalCells.length == 3 && verticalCells[1] == newState)
+ {
+ fixedDy = 0;
+ }
}
if (horizontalCells.length > 1)
@@ -118,36 +168,81 @@
return s1.x - s2.x;
});
+ var newStatePassed = false;
+ var firstMoving = newState == horizontalCells[0];
+ var lastMoving = newState == horizontalCells[horizontalCells.length - 1];
+
+ //find the mid space and use it as dx and fixedDx
+ if (!firstMoving && !lastMoving)
+ {
+ for (var i = 1; i < horizontalCells.length - 1; i++)
+ {
+ if (newState == horizontalCells[i])
+ {
+ var s1 = horizontalCells[i - 1];
+ var s3 = horizontalCells[i + 1];
+ midDx = (s3.x - s1.x - s1.width - newState.width) / 2;
+ dx = midDx;
+ fixedDx = dx;
+ break;
+ }
+ }
+ }
+
for (var i = 0; i < horizontalCells.length - 1; i++)
{
var s1 = horizontalCells[i];
var s2 = horizontalCells[i + 1];
var isMovingOne = newState == s1 || newState == s2;
-
var curDx = s2.x - s1.x - s1.width;
- if (!isMovingOne)
- {
- fixedDx = curDx;
- }
+ newStatePassed |= newState == s1;
- if (eqCx == 0)
+ if (dx == 0 && eqCx == 0)
{
dx = curDx;
eqCx = 1;
}
- else if (Math.abs(dx - curDx) <= (isMovingOne? tolerance : tolerance))
+ else if (Math.abs(dx - curDx) <= (isMovingOne || (i == 1 && newStatePassed)? tolerance : 0))
{
eqCx += 1;
}
- }
+ else if (eqCx > 1 && newStatePassed) //stop and ignore the following cells
+ {
+ horizontalCells = horizontalCells.slice(0, i + 1);
+ break;
+ }
+ else if (horizontalCells.length - i >= 3 && !newStatePassed) //reset and start counting again
+ {
+ eqCx = 0;
+ dx = midDx != 0? midDx : 0;
+ fixedDx = dx;
+ horizontalCells.splice(0, i == 0? 1 : i);
+ i = -1;
+ }
+ else
+ {
+ break;
+ }
+
+ if (fixedDx == 0 && !isMovingOne)
+ {
+ fixedDx = curDx;
+ //Update dx such that following cells shows equal distance guides without tolerance
+ dx = fixedDx;
+ }
+ }
+ if (horizontalCells.length == 3 && horizontalCells[1] == newState)
+ {
+ fixedDx = 0;
+ }
}
var createEqGuide = function(p1, p2, curGuide, isVer)
{
var points = [];
- var dx = 0.0;
- var dy = 0.0;
+ var dx = 0
+ var dy = 0;
if (isVer)
{
@@ -181,7 +276,26 @@
return guideEq;
}
};
-
+
+ var hideEqGuides = function(horizontal, vertical)
+ {
+ if (horizontal && guide.guidesArrHor != null)
+ {
+ for (var i = 0; i < guide.guidesArrHor.length; i++)
+ {
+ guide.guidesArrHor[i].node.style.visibility = "hidden";
+ }
+ }
+
+ if (vertical && guide.guidesArrVer != null)
+ {
+ for (var i = 0; i < guide.guidesArrVer.length; i++)
+ {
+ guide.guidesArrVer[i].node.style.visibility = "hidden";
+ }
+ }
+ };
+
if (eqCx > 1 && eqCx == horizontalCells.length - 1)
{
var guidesArr = [];
@@ -239,16 +353,21 @@
guideEq.redraw();
guidesArr.push(guideEq);
}
+
+ //destroy old non-recycled guides
+ for (var i = hPoints.length / 2; curArr != null && i < curArr.length; i ++)
+ {
+ curArr[i].destroy();
+ }
+
guide.guidesArrHor = guidesArr;
xShift = newX - bounds.x;
+ hasHorGuides = true;
}
- else if (guide.guidesArrHor != null)
+ else
{
- for (var i = 0; i < guide.guidesArrHor.length; i++)
- {
- guide.guidesArrHor[i].node.style.visibility = "hidden";
- }
+ hideEqGuides(true);
}
if (eqCy > 1 && eqCy == verticalCells.length - 1)
@@ -299,7 +418,7 @@
vPoints.push(new mxPoint(firstX, s3.y - shift));
}
- for (i = 0; i < vPoints.length; i += 2)
+ for (var i = 0; i < vPoints.length; i += 2)
{
var p1 = vPoints[i];
var p2 = vPoints[i+1];
@@ -308,21 +427,44 @@
guideEq.redraw();
guidesArr.push(guideEq);
}
+
+ //destroy old non-recycled guides
+ for (var i = vPoints.length / 2; curArr != null && i < curArr.length; i ++)
+ {
+ curArr[i].destroy();
+ }
guide.guidesArrVer = guidesArr;
yShift = newY - bounds.y;
+ hasVerGuides = true;
}
- else if (guide.guidesArrVer != null)
+ else
{
- for (var i = 0; i < guide.guidesArrVer.length; i++)
- {
- guide.guidesArrVer[i].node.style.visibility = "hidden";
- }
+ hideEqGuides(false, true);
}
}
- return guideMove.call(this, bounds, new mxPoint(xShift, yShift), gridEnabled);
+ //TODO force other guides not to change the point!
+ if (hasHorGuides || hasVerGuides)
+ {
+ var eqPoint = new mxPoint(xShift, yShift);
+ guideMove.call(this, bounds, eqPoint, gridEnabled, clone);
+
+ //if other guides changed the calculated point, hide the guides
+// if ((hasHorGuides && newPoint.x != xShift) || (hasVerGuides && newPoint.y != yShift))
+// {
+// hideEqGuides(true, true);
+// }
+// return newPoint;
+ //Discard other guides modifications and return our point! Not the best (correct?) solution
+ return eqPoint;
+ }
+ else
+ {
+ hideEqGuides(true, true);
+ return guideMove.apply(this, arguments);
+ }
};
var guideSetVisible = mxGuide.prototype.setVisible;
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 0c0c99e6..f90d4c53 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -25,27 +25,28 @@ DrawioFile = function(ui, data)
mxUtils.extend(DrawioFile, mxEventSource);
/**
- * Sets the delay for autosave in milliseconds. Default is 1500.
+ * Specifies the delay between the last change and the autosave.
*/
DrawioFile.prototype.autosaveDelay = 1500;
/**
- * Sets the delay for autosave in milliseconds. Default is 30000.
+ * Specifies the maximum delay before an autosave is forced even if the graph
+ * is being changed.
*/
DrawioFile.prototype.maxAutosaveDelay = 30000;
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * Contains the thread for the next autosave.
*/
DrawioFile.prototype.autosaveThread = null;
/**
- * Sets the delay for autosave in milliseconds. Default is 500.
+ * Stores the timestamp for hte last autosave.
*/
DrawioFile.prototype.lastAutosave = null;
/**
- * Sets the delay for autosave in milliseconds. Default is 1500.
+ * Stores the modified state.
*/
DrawioFile.prototype.modified = false;
@@ -297,40 +298,20 @@ DrawioFile.prototype.getData = function()
*/
DrawioFile.prototype.open = function()
{
- this.ui.setFileData(this.getData());
+ var data = this.getData();
+
+ if (data != null)
+ {
+ this.ui.setFileData(data);
+ }
this.changeListener = mxUtils.bind(this, function(sender, eventObject)
{
var edit = (eventObject != null) ? eventObject.getProperty('edit') : null;
- if (this.changeListenerEnabled && this.isEditable() &&
- (edit == null || !edit.ignoreEdit))
+ if (this.changeListenerEnabled && this.isEditable() && (edit == null || !edit.ignoreEdit))
{
- this.setModified(true);
-
- if (this.isAutosave())
- {
- this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get('saving')) + '...');
-
- this.autosave(this.autosaveDelay, this.maxAutosaveDelay, mxUtils.bind(this, function(resp)
- {
- // Does not update status if another autosave was scheduled
- if (this.autosaveThread == null && this.ui.getCurrentFile() == this && !this.isModified())
- {
- this.addAllSavedStatus();
- }
- }), mxUtils.bind(this, function(resp)
- {
- if (this.ui.getCurrentFile() == this)
- {
- this.addUnsavedStatus(resp);
- }
- }));
- }
- else
- {
- this.addUnsavedStatus();
- }
+ this.fileChanged();
}
});
@@ -360,22 +341,17 @@ DrawioFile.prototype.addAllSavedStatus = function()
if (file != null && (file.constructor == DriveFile || file.constructor == DropboxFile))
{
-
- this.ui.editor.setStatus('<span title="'+ mxUtils.htmlEntities(mxResources.get('revisionHistory')) +
+ this.ui.editor.setStatus('<div title="'+ mxUtils.htmlEntities(mxResources.get('revisionHistory')) +
'" style="text-decoration:underline;cursor:pointer;">' +
- mxUtils.htmlEntities(mxResources.get('allChangesSaved')) + '</span>');
+ mxUtils.htmlEntities(mxResources.get('allChangesSaved')) + '</div>');
+ var links = (this.ui.statusContainer != null) ? this.ui.statusContainer.getElementsByTagName('div') : null;
- if (this.ui.statusContainer != null)
+ if (links.length > 0)
{
- var links = this.ui.statusContainer.getElementsByTagName('span');
-
- if (links.length > 0)
+ mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
{
- mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
- {
- this.ui.actions.get('revisionHistory').funct();
- }));
- }
+ this.ui.actions.get('revisionHistory').funct();
+ }));
}
}
else
@@ -387,13 +363,45 @@ DrawioFile.prototype.addAllSavedStatus = function()
/**
* Adds the listener for automatically saving the diagram for local changes.
*/
+DrawioFile.prototype.fileChanged = function()
+{
+ this.setModified(true);
+
+ if (this.isAutosave())
+ {
+ this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get('saving')) + '...');
+
+ this.autosave(this.autosaveDelay, this.maxAutosaveDelay, mxUtils.bind(this, function(resp)
+ {
+ // Does not update status if another autosave was scheduled
+ if (this.autosaveThread == null && this.ui.getCurrentFile() == this && !this.isModified())
+ {
+ this.addAllSavedStatus();
+ }
+ }), mxUtils.bind(this, function(resp)
+ {
+ if (this.ui.getCurrentFile() == this)
+ {
+ this.addUnsavedStatus(resp);
+ }
+ }));
+ }
+ else
+ {
+ this.addUnsavedStatus();
+ }
+};
+
+/**
+ * Adds the listener for automatically saving the diagram for local changes.
+ */
DrawioFile.prototype.addUnsavedStatus = function(err)
{
if (err instanceof Error && err.message != null)
{
this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">' +
- mxUtils.htmlEntities(mxResources.get('unsavedChanges')) +
- ' (' + mxUtils.htmlEntities(err.message) + ')</div>');
+ mxUtils.htmlEntities(mxResources.get('unsavedChanges')) +
+ ' (' + mxUtils.htmlEntities(err.message) + ')</div>');
}
else
{
@@ -415,17 +423,19 @@ DrawioFile.prototype.addUnsavedStatus = function(err)
mxUtils.htmlEntities(mxResources.get('unsavedChangesClickHereToSave')) + '</div>');
// Installs click handler for saving
- if (this.ui.statusContainer != null)
+ var links = (this.ui.statusContainer != null) ? this.ui.statusContainer.getElementsByTagName('div') : null;
+
+ if (links != null && links.length > 0)
{
- var links = this.ui.statusContainer.getElementsByTagName('div');
-
- if (links.length > 0)
+ mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
{
- mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
- {
- this.ui.actions.get((this.ui.mode == null) ? 'saveAs' : 'save').funct();
- }));
- }
+ this.ui.actions.get((this.ui.mode == null) ? 'saveAs' : 'save').funct();
+ }));
+ }
+ else
+ {
+ this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">' +
+ mxUtils.htmlEntities(mxResources.get('unsavedChanges')) + '</div>');
}
}
};
@@ -442,13 +452,17 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
var tmp = (new Date().getTime() - this.lastAutosave < maxDelay) ? delay : 0;
this.clearAutosave();
-
+
// Starts new timer or executes immediately if not unsaved for maxDelay
- this.autosaveThread = window.setTimeout(mxUtils.bind(this, function()
+ var thread = window.setTimeout(mxUtils.bind(this, function()
{
- this.autosaveThread = null;
this.lastAutosave = null;
+ if (this.autosaveThead == thread)
+ {
+ this.autosaveThread = null;
+ }
+
// Workaround for duplicate save if UI is blocking
// after save while pending autosave triggers
if (this.isModified() && this.isAutosaveNow())
@@ -478,12 +492,19 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
}
else
{
+ if (!this.isModified())
+ {
+ this.ui.editor.setStatus('');
+ }
+
if (success != null)
{
success(null);
}
}
}), tmp);
+
+ this.autosaveThread = thread;
};
/**
diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js
index e4f53968..2aa09c31 100644
--- a/src/main/webapp/js/diagramly/DriveClient.js
+++ b/src/main/webapp/js/diagramly/DriveClient.js
@@ -10,6 +10,9 @@ DriveClient = function(editorUi)
* Holds a reference to the UI. Needed for the sharing client.
*/
this.ui = editorUi;
+
+ // New mime type for XML files
+ this.xmlMimeType = 'application/vnd.jgraph.mxfile';
if (this.ui.editor.isChromelessView() && urlParams['rt'] != '1')
{
@@ -37,9 +40,8 @@ DriveClient = function(editorUi)
this.mimeType = 'application/vnd.jgraph.mxfile.rtlegacy';
}
- this.mimeTypes = 'application/mxe,application/vnd.jgraph.mxfile,' +
- 'application/mxr,application/vnd.jgraph.mxfile.realtime,' +
- 'application/vnd.jgraph.mxfile.rtlegacy';
+ this.mimeTypes = this.xmlMimeType + 'application/mxe,application/mxr,' +
+ 'application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy';
};
// Extends mxEventSource
@@ -59,6 +61,12 @@ DriveClient.prototype.scopes = (urlParams['photos'] == '1') ?
'https://www.googleapis.com/auth/userinfo.profile'];
/**
+ * Contains the hostname of the old app.
+ */
+DriveClient.prototype.allFields = 'kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,' +
+ 'editable,copyable,labels,properties,downloadUrl,webContentLink,userPermission';
+
+/**
* Specifies if thumbnails should be enabled. Default is true.
* LATER: If thumbnails are disabled, make sure to replace the
* existing thumbnail with the placeholder only once.
@@ -377,7 +385,8 @@ DriveClient.prototype.executeRequest = function(req, success, error)
// Schedules a retry if no new request was executed
// TODO: Check for 'rateLimitExceeded', 'userRateLimitExceeded' in errors
// see https://developers.google.com/drive/handle-errors
- else if (resp != null && resp.error != null && resp.error.code != 404 && this.currentRequest == req && retryCount < this.maxRetries)
+ else if (resp != null && resp.error != null && resp.error.code != 412 && resp.error.code != 404 &&
+ this.currentRequest == req && retryCount < this.maxRetries)
{
retryCount++;
var jitter = 1 + 0.1 * (Math.random() - 0.5);
@@ -561,8 +570,9 @@ DriveClient.prototype.copyFile = function(id, title, success, error)
{
if (id != null && title != null)
{
- this.executeRequest(gapi.client.drive.files.copy({'fileId': id, 'resource':
- {'title' : title}, 'supportsTeamDrives': true}), success, error);
+ this.executeRequest(gapi.client.drive.files.copy({'fileId': id,
+ 'fields': this.allFields, 'supportsTeamDrives': true,
+ 'resource': {'title' : title}}), success, error);
}
};
@@ -576,7 +586,8 @@ DriveClient.prototype.renameFile = function(id, title, success, error)
{
if (id != null && title != null)
{
- this.executeRequest(this.createDriveRequest(id, {'title' : title}), success, error);
+ this.executeRequest(this.createDriveRequest(
+ id, {'title' : title}), success, error);
}
};
@@ -621,6 +632,40 @@ DriveClient.prototype.getLibrary = function(id, success, error)
};
/**
+ * Loads the descriptorf for the given file ID.
+ */
+DriveClient.prototype.loadDescriptor = function(id, success, error)
+{
+ this.executeRequest(gapi.client.drive.files.get({'fileId': id,
+ 'fields': this.allFields, 'supportsTeamDrives': true}),
+ success, error);
+};
+
+/**
+ * Gets the channel ID from the given descriptor.
+ */
+DriveClient.prototype.getChannelId = function(desc)
+{
+ var props = desc.properties;
+ var result = null;
+
+ if (props != null)
+ {
+ for (var i = 0; i < props.length; i++)
+ {
+ if (props[i].key == 'channel')
+ {
+ result = props[i].value;
+
+ break;
+ }
+ }
+ }
+
+ return result;
+};
+
+/**
* Checks if the client is authorized and calls the next step. The optional
* readXml argument is used for import. Default is false. The optional
* readLibrary argument is used for reading libraries. Default is false.
@@ -632,14 +677,16 @@ DriveClient.prototype.getFile = function(id, success, error, readXml, readLibrar
if (urlParams['rev'] != null)
{
- this.executeRequest(gapi.client.drive.revisions.get({'fileId': id, 'revisionId': urlParams['rev']}), mxUtils.bind(this, function(resp)
- {
- this.getXmlFile(resp, null, success, error);
- }), error);
+ this.executeRequest(gapi.client.drive.revisions.get({'fileId': id,
+ 'revisionId': urlParams['rev'], 'supportsTeamDrives': true}),
+ mxUtils.bind(this, function(resp)
+ {
+ this.getXmlFile(resp, null, success, error);
+ }), error);
}
else
{
- this.executeRequest(gapi.client.drive.files.get({'fileId': id, 'supportsTeamDrives': true}), mxUtils.bind(this, function(resp)
+ this.loadDescriptor(id, mxUtils.bind(this, function(resp)
{
if (this.user != null)
{
@@ -654,20 +701,39 @@ DriveClient.prototype.getFile = function(id, success, error, readXml, readLibrar
}
else
{
- if (readXml || readLibrary || resp.mimeType == this.libraryMimeType)
+ // Handles converted realtime files as XML files
+ if (readXml || readLibrary || resp.mimeType == this.libraryMimeType ||
+ resp.mimeType == this.xmlMimeType)
{
this.getXmlFile(resp, null, success, error, true, readLibrary);
}
else
{
- this.loadRealtime(resp, mxUtils.bind(this, function(doc)
- {
- try
+ if (!App.GOOGLE_REALTIME)
+ {
+ if (this.isGoogleRealtimeMimeType(resp.mimeType))
{
- // Converts XML files to realtime including old realtime model
- if (doc == null || doc.getModel() == null || doc.getModel().getRoot() == null ||
- doc.getModel().getRoot().isEmpty() || (doc.getModel().getRoot().has('cells') &&
- !doc.getModel().getRoot().has(DriveRealtime.prototype.diagramsKey)))
+ this.convertRealtimeFile(resp, mxUtils.bind(this, function(file)
+ {
+ this.notifyRealtimeConverted(file);
+ success(file);
+ }), error);
+ }
+ else
+ {
+ this.getXmlFile(resp, null, success, error);
+ }
+ }
+ else
+ {
+ this.loadRealtime(resp, mxUtils.bind(this, function(doc)
+ {
+ try
+ {
+ // Converts XML files to realtime including old realtime model
+ if (doc == null || doc.getModel() == null || doc.getModel().getRoot() == null ||
+ doc.getModel().getRoot().isEmpty() || (doc.getModel().getRoot().has('cells') &&
+ !doc.getModel().getRoot().has(DriveRealtime.prototype.diagramsKey)))
{
this.getXmlFile(resp, doc, success, error);
}
@@ -676,12 +742,13 @@ DriveClient.prototype.getFile = function(id, success, error, readXml, readLibrar
// XML not required here since the realtime model is not empty
success(new DriveFile(this.ui, null, resp, doc));
}
- }
- catch (e)
- {
- error(e);
- }
- }), error);
+ }
+ catch (e)
+ {
+ error(e);
+ }
+ }), error);
+ }
}
}
}
@@ -694,6 +761,50 @@ DriveClient.prototype.getFile = function(id, success, error, readXml, readLibrar
};
/**
+ * Returns true if the given mime type is for Google Realtime files.
+ */
+DriveClient.prototype.isGoogleRealtimeMimeType = function(mimeType)
+{
+ return mimeType != null && mimeType.substring(0, 30) == 'application/vnd.jgraph.mxfile.';
+};
+
+/**
+ * Checks if the client is authorized and calls the next step.
+ */
+DriveClient.prototype.getRealtimeData = function(id, success, error, retryCount)
+{
+ this.executeRequest(gapi.client.drive.realtime.get({'fileId': id,
+ 'supportsTeamDrives': true}), mxUtils.bind(this, function(resp)
+ {
+ var json = (resp.result != null) ? resp.result.data : null;
+
+ if (json != null && json.value != null && json.value.diagrams != null)
+ {
+ success(json);
+ }
+ else if (error != null)
+ {
+ error();
+ }
+ }), mxUtils.bind(this, function(resp)
+ {
+ if (retryCount == null)
+ {
+ retryCount = 0;
+ }
+
+ if (retryCount < 3)
+ {
+ this.getRealtimeData(id, success, error, retryCount + 1);
+ }
+ else if (error != null)
+ {
+ error();
+ }
+ }));
+};
+
+/**
* Checks if the client is authorized and calls the next step.
*/
DriveClient.prototype.loadRealtime = function(resp, success, error)
@@ -707,7 +818,7 @@ DriveClient.prototype.loadRealtime = function(resp, success, error)
}
// Checks if we're in viewer app or if the file is writeable if it needs to be converted
else if (this.appId != '850530949725' && (resp.editable || (resp.mimeType != 'application/mxe' &&
- resp.mimeType != 'application/vnd.jgraph.mxfile')))
+ resp.mimeType != 'application/vnd.jgraph.mxfile')) && gapi.drive.realtime != null)
{
var fn = mxUtils.bind(this, function()
{
@@ -792,7 +903,8 @@ DriveClient.prototype.getXmlFile = function(resp, doc, success, error, ignoreMim
var file = new DriveFile(this.ui, data, resp, doc);
// Checks if mime-type needs to be updated if the file is editable and no viewer app
- if (!ignoreMime && this.appId != '850530949725' && file.isEditable() && resp.mimeType != this.mimeType)
+ if (App.GOOGLE_REALTIME && !ignoreMime && this.appId != '850530949725' && file.isEditable() &&
+ resp.mimeType != this.mimeType)
{
// Overwrites mime-type (only mutable on update when uploading new content)
this.saveFile(file, true, mxUtils.bind(this, function(resp)
@@ -816,7 +928,7 @@ DriveClient.prototype.getXmlFile = function(resp, doc, success, error, ignoreMim
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
-DriveClient.prototype.saveFile = function(file, revision, success, error, noCheck, unloading)
+DriveClient.prototype.saveFile = function(file, revision, success, error, noCheck, unloading, overwrite, properties)
{
if (file.isEditable())
{
@@ -839,10 +951,29 @@ DriveClient.prototype.saveFile = function(file, revision, success, error, noChec
{
var meta =
{
- 'mimeType': (file.constructor == DriveLibrary) ? this.libraryMimeType : this.mimeType,
+ 'mimeType': file.desc.mimeType,
'title': file.getTitle()
};
+ // Overrides old mime type and creates a revision
+ if (!App.GOOGLE_REALTIME && file.realtime == null &&
+ this.isGoogleRealtimeMimeType(file.desc.mimeType))
+ {
+ meta.mimeType = this.xmlMimeType;
+ revision = true;
+ }
+
+ // Inserts a channel ID
+ if (file.constructor == DriveFile && this.getChannelId(file.desc) == null)
+ {
+ if (properties == null)
+ {
+ properties = [];
+ }
+
+ properties.push({'key': 'channel', 'value': Editor.guid()});
+ }
+
// Specifies that no thumbnail should be uploaded in which case the existing thumbnail is used
if (!keepExisting)
{
@@ -869,15 +1000,24 @@ DriveClient.prototype.saveFile = function(file, revision, success, error, noChec
// Updates saveDelay on drive file
var wrapper = function()
{
- file.saveDelay = new Date().getTime() - t0;
- success.apply(this, arguments);
+ file.saveDelay = new Date().getTime() - t0;
+ success.apply(this, arguments);
};
var fn = mxUtils.bind(this, function(data, binary)
{
+ if (properties != null)
+ {
+ meta.properties = properties;
+ }
+
+ // Used to check if file was changed externally
+ var etag = (!overwrite && file.constructor == DriveFile &&
+ file.realtime == null) ? file.desc.etag : null;
+
this.executeRequest(this.createUploadRequest(file.getId(), meta,
data, revision || (file.desc.mimeType != this.mimeType &&
- file.desc.mimeType != this.libraryMimeType), binary),
+ file.desc.mimeType != this.libraryMimeType), binary, etag),
wrapper, error);
});
@@ -900,37 +1040,38 @@ DriveClient.prototype.saveFile = function(file, revision, success, error, noChec
{
// NOTE: getThumbnail is asynchronous and returns false if no thumbnails can be created
if (unloading || file.constructor == DriveLibrary || !this.enableThumbnails || urlParams['thumb'] == '0' ||
- (file.realtime != null && !file.realtime.connected) || !this.ui.getThumbnail(this.thumbnailWidth, mxUtils.bind(this, function(canvas)
- {
- // Callback for getThumbnail
- var thumb = null;
-
- if (canvas != null)
+ (file.realtime != null && !file.realtime.connected) || !this.ui.getThumbnail(this.thumbnailWidth,
+ mxUtils.bind(this, function(canvas)
{
- try
+ // Callback for getThumbnail
+ var thumb = null;
+
+ if (canvas != null)
{
- // Security errors are possible
- thumb = canvas.toDataURL('image/png');
+ try
+ {
+ // Security errors are possible
+ thumb = canvas.toDataURL('image/png');
+ }
+ catch (e)
+ {
+ // ignore and continue with placeholder
+ }
}
- catch (e)
+
+ // Maximum thumbnail size is 2MB
+ if (thumb == null || thumb.length > this.maxThumbnailSize)
{
- // ignore and continue with placeholder
+ thumb = null;
}
- }
-
- // Maximum thumbnail size is 2MB
- if (thumb == null || thumb.length > this.maxThumbnailSize)
- {
- thumb = null;
- }
- else
- {
- // Converts base64 data into required format for Drive (base64url with no prefix)
- thumb = thumb.substring(thumb.indexOf(',') + 1).replace(/\+/g, '-').replace(/\//g, '_');
- }
-
- doSave(thumb, 'image/png');
- })))
+ else
+ {
+ // Converts base64 data into required format for Drive (base64url with no prefix)
+ thumb = thumb.substring(thumb.indexOf(',') + 1).replace(/\+/g, '-').replace(/\//g, '_');
+ }
+
+ doSave(thumb, 'image/png');
+ })))
{
// If-branch
doSave(null, null, file.constructor != DriveLibrary && (file.realtime == null || file.realtime.connected));
@@ -964,6 +1105,39 @@ DriveClient.prototype.saveFile = function(file, revision, success, error, noChec
};
/**
+ * Sends a message to all collaborators and stores the head revision ID.
+ */
+DriveClient.prototype.notifyRealtimeConverted = function(file)
+{
+ try
+ {
+ if (gapi.drive.realtime != null)
+ {
+ gapi.drive.realtime.load(file.getId(), mxUtils.bind(this, function(doc)
+ {
+ try
+ {
+ if (doc != null && doc.getModel() != null &&
+ doc.getModel().getRoot() != null)
+ {
+ doc.getModel().getRoot().set('realtimeConverted',
+ file.desc.headRevisionId);
+ }
+ }
+ catch (e)
+ {
+ // ignore
+ }
+ }));
+ }
+ }
+ catch (e)
+ {
+ // ignore
+ }
+};
+
+/**
* Verifies the mime type of the given file ID.
*/
DriveClient.prototype.verifyMimeType = function(fileId, fn, force, error)
@@ -1049,7 +1223,7 @@ DriveClient.prototype.redirectToNewApp = function(error, fileId)
*/
DriveClient.prototype.insertFile = function(title, data, folderId, success, error, mimeType, binary, allowRealtime)
{
- mimeType = (mimeType != null) ? mimeType : this.mimeType;
+ mimeType = (mimeType != null) ? mimeType : ((App.GOOGLE_REALTIME) ? this.mimeType : this.xmlMimeType);
allowRealtime = (allowRealtime != null) ? allowRealtime : true;
var metadata =
@@ -1062,7 +1236,7 @@ DriveClient.prototype.insertFile = function(title, data, folderId, success, erro
{
metadata.parents = [{'kind': 'drive#fileLink', 'id': folderId}];
}
-
+
// NOTE: Cannot create thumbnail on insert since no ui has no current file
this.executeRequest(this.createUploadRequest(null, metadata, data, false, binary), mxUtils.bind(this, function(resp)
{
@@ -1077,10 +1251,11 @@ DriveClient.prototype.insertFile = function(title, data, folderId, success, erro
error({message: mxResources.get('errorSavingFile')});
}
}
- else if (allowRealtime)
+ else if (App.GOOGLE_REALTIME && allowRealtime &&
+ this.isGoogleRealtimeMimeType(resp.mimeType))
{
this.loadRealtime(resp, mxUtils.bind(this, function(doc)
- {
+ {
if (this.user != null)
{
var file = new DriveFile(this.ui, data, resp, doc);
@@ -1094,11 +1269,11 @@ DriveClient.prototype.insertFile = function(title, data, folderId, success, erro
{
error({message: mxResources.get('loggedOut')});
}
- }), error);
+ }), error, false);
}
else
{
- success(resp);
+ success(new DriveFile(this.ui, data, resp));
}
}), error);
};
@@ -1109,20 +1284,27 @@ DriveClient.prototype.insertFile = function(title, data, folderId, success, erro
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
-DriveClient.prototype.createUploadRequest = function(id, metadata, data, revision, binary)
+DriveClient.prototype.createUploadRequest = function(id, metadata, data, revision, binary, etag)
{
binary = (binary != null) ? binary : false;
var bd = '-------314159265358979323846';
var delim = '\r\n--' + bd + '\r\n';
var close = '\r\n--' + bd + '--';
var ctype = 'application/octect-stream';
+
+ var headers = {'Content-Type' : 'multipart/mixed; boundary="' + bd + '"'};
+
+ if (etag != null)
+ {
+ headers['If-Match'] = etag;
+ }
var reqObj =
{
'path': '/upload/drive/v2/files' + (id != null ? '/' + id : ''),
'method': (id != null) ? 'PUT' : 'POST',
'params': {'uploadType': 'multipart'},
- 'headers': {'Content-Type' : 'multipart/mixed; boundary="' + bd + '"'},
+ 'headers': headers,
'body' : delim + 'Content-Type: application/json\r\n\r\n' + JSON.stringify(metadata) + delim +
'Content-Type: ' + ctype + '\r\n' + 'Content-Transfer-Encoding: base64\r\n' + '\r\n' +
((data != null) ? (binary) ? data : Base64.encode(data) : '') + close
@@ -1134,6 +1316,7 @@ DriveClient.prototype.createUploadRequest = function(id, metadata, data, revisio
}
reqObj.params['supportsTeamDrives'] = true;
+ reqObj.params['fields'] = this.allFields;
return gapi.client.request(reqObj);
};
@@ -1397,7 +1580,7 @@ DriveClient.prototype.pickLibrary = function(fn)
}
});
- // Reuses picker as long as token doesn't change.
+ // Reuses picker as long as token doesn't change
var token = gapi.auth.getToken().access_token;
if (this.libraryPicker == null || this.libraryPickerToken != token)
@@ -1477,3 +1660,255 @@ DriveClient.prototype.showPermissions = function(id)
shareClient.showSettingsDialog();
}));
};
+
+/**
+ * Converts the given file from realtime to XML.
+ */
+DriveClient.prototype.getRealtimeAge = function(desc, json)
+{
+ var mod = (json != null && json.value != null && json.value.modifiedDate != null) ?
+ json.value.modifiedDate.json : null;
+ var result = 0;
+
+ if (mod != null && mod > 0)
+ {
+ var ts = new Date(desc.modifiedDate);
+ var rt = new Date(mod);
+ result = ts.getTime() - rt.getTime();
+ }
+
+ return result;
+};
+
+/**
+ * Converts the given file from realtime to XML.
+ */
+DriveClient.prototype.convertRealtimeFile = function(desc, success, error)
+{
+ this.getRealtimeData(desc.id, mxUtils.bind(this, function(json)
+ {
+ var age = this.getRealtimeAge(desc, json);
+
+ // Uses the newer of the two
+ if (age < 0)
+ {
+ var node = this.convertJsonToXml(json);
+ console.log('converted realtime model', age, json, node);
+ success(new DriveFile(this.ui, mxUtils.getXml(node), desc));
+ }
+ else
+ {
+ console.log('using newer XML file', age, json);
+ this.getXmlFile(desc, null, success, error);
+ }
+ }), mxUtils.bind(this, function()
+ {
+ console.log('no realtime data, using XML file');
+ this.getXmlFile(desc, null, success, error);
+ }));
+};
+
+/**
+ * Returns the location as a new object.
+ */
+DriveClient.prototype.convertJsonToXml = function(json, uncompressed)
+{
+ if (json.value == null || json.value.diagrams == null)
+ {
+ throw Error('Invalid JSON: no diagrams in root map');
+ }
+ else
+ {
+ var node = mxUtils.createXmlDocument().createElement('mxfile');
+ var diagrams = json.value.diagrams.value;
+
+ for (var i = 0; i < diagrams.length; i++)
+ {
+ try
+ {
+ var diagramNode = this.decodeJsonPage(diagrams[i].value,
+ node.ownerDocument.createElement('diagram'),
+ uncompressed);
+
+ //if (diagramNode.getAttribute('name') == null)
+ //{
+ // TODO: Should only use when converting but not when comparing
+ //diagramNode.setAttribute('name', mxResources.get('pageWithNumber', [i + 1]));
+ //}
+
+ node.appendChild(diagramNode);
+ }
+ catch (e)
+ {
+ throw Error('Error on page ' + i + ': ' + e.stack);
+ }
+ }
+
+ //console.log('leaving convertJson', mxUtils.getPrettyXml(node));
+
+ return node;
+ }
+};
+
+/**
+ * Returns true if copy, export and print are not allowed for this file.
+ */
+DriveClient.prototype.decodeJsonPage = function(json, node, uncompressed)
+{
+ if (json == null)
+ {
+ throw Error('Invalid JSON: json for page is null');
+ }
+ else
+ {
+ var codec = new mxCodec();
+ var root = this.createJsonCell(json.root, codec);
+
+ if (root == null)
+ {
+ throw Error('Invalid JSON: no root cell for page');
+ }
+ else
+ {
+ // Dummy model for encoding
+ var modelNode = codec.encode(new mxGraphModel(root));
+ this.decodeJsonViewState(json, modelNode);
+
+ if (uncompressed)
+ {
+ node.appendChild(modelNode);
+ }
+ else
+ {
+ mxUtils.setTextContent(node, this.ui.editor.graph.compressNode(modelNode));
+ }
+
+ // Adds attributes to diagram node
+ if (json.id != null)
+ {
+ node.setAttribute('id', json.id.json);
+ }
+ else
+ {
+ // Workaround for missing page ID in JSON
+ this.node.setAttribute('id', Editor.guid());
+ }
+
+ if (json.name != null)
+ {
+ node.setAttribute('name', json.name.json);
+ }
+ }
+ }
+
+ //console.log('decoded json page', json, node);
+
+ return node;
+};
+
+/**
+ * Writes the view state to the given node.
+ */
+DriveClient.prototype.decodeJsonViewState = function(json, node)
+{
+ // Page format is stored as "width,height"
+ var pf = (json.pageFormat != null) ? json.pageFormat.json : null;
+
+ if (pf != null && pf.length > 0)
+ {
+ var values = pf.split(',');
+
+ if (values.length > 1)
+ {
+ node.setAttribute('pageWidth', values[0]);
+ node.setAttribute('pageHeight', values[1]);
+ }
+ }
+
+ var bg = (json.backgroundColor != null) ? json.backgroundColor.json : null;
+
+ if (bg != null && bg.length > 0)
+ {
+ node.setAttribute('background', bg);
+ }
+
+ var img = (json.backgroundImage != null) ? json.backgroundImage.json : null;
+
+ if (img != null && img.length > 0)
+ {
+ node.setAttribute('backgroundImage', img);
+ }
+
+ node.setAttribute('fold', (json.foldingEnabled != null) ? json.foldingEnabled.json : '0');
+ node.setAttribute('pageScale', (json.pageScale != null) ? json.pageScale.json : mxGraph.prototype.pageScale);
+ node.setAttribute('math', (json.mathEnabled != null) ? json.mathEnabled.json : '0');
+ node.setAttribute('shadow', (json.shadowVisible != null) ? json.shadowVisible.json : '0');
+
+ return node;
+};
+
+/**
+ * Syncs initial state from collab model to graph model.
+ */
+DriveClient.prototype.createJsonCell = function(json, codec)
+{
+ if (json != null && json.id != null)
+ {
+ var val = json.value;
+ var cell = this.jsonToCell(val, codec);
+ codec.putObject(json.id, cell);
+
+ cell.source = (val.source != null) ? this.createJsonCell(val.source, codec) : null;
+ cell.target = (val.target != null) ? this.createJsonCell(val.target, codec) : null;
+
+ // Cells can be serialized as parents of terminals
+ this.createJsonCell(val.parent, codec)
+
+ for (var i = 0; i < val.children.value.length; i++)
+ {
+ var child = this.createJsonCell(val.children.value[i], codec);
+
+ if (child != null)
+ {
+ cell.insert(child);
+ }
+ else
+ {
+ throw Error('Invalid JSON: no child ' + i + ' for cell ' + json.id);
+ }
+ }
+
+ return cell;
+ }
+ else if (json != null && json.ref != null)
+ {
+ return codec.objects[json.ref];
+ }
+ else
+ {
+ return null;
+ }
+};
+
+/**
+ * Adds the listener for automatically saving the diagram for local changes.
+ */
+DriveClient.prototype.jsonToCell = function(val, codec)
+{
+ var cell = new mxCell();
+
+ cell.id = val.cellId.json;
+ cell.vertex = val.type.json == 'vertex';
+ cell.edge = val.type.json == 'edge';
+ cell.connectable = val.connectable.json != '0';
+ cell.collapsed = val.collapsed.json == '1';
+ cell.visible = val.visible.json != '0';
+ cell.style = (val.style != null) ? val.style.json : null;
+ cell.value = (val.xmlValue != null) ?
+ mxUtils.parseXml(val.xmlValue.json).documentElement :
+ ((val.value != null) ? val.value.json : null);
+ cell.geometry = (val.geometry != null) ?
+ codec.decode(mxUtils.parseXml(val.geometry.json).documentElement) : null;
+
+ return cell;
+};
diff --git a/src/main/webapp/js/diagramly/DriveFile.js b/src/main/webapp/js/diagramly/DriveFile.js
index 96411ee6..99b39b2c 100644
--- a/src/main/webapp/js/diagramly/DriveFile.js
+++ b/src/main/webapp/js/diagramly/DriveFile.js
@@ -18,6 +18,11 @@ DriveFile = function(ui, data, desc, doc)
mxUtils.extend(DriveFile, DrawioFile);
/**
+ * Delay for last save in ms.
+ */
+DriveFile.prototype.saveDelay = 0;
+
+/**
* Returns true if copy, export and print are not allowed for this file.
*/
DriveFile.prototype.isRestricted = function()
@@ -27,9 +32,12 @@ DriveFile.prototype.isRestricted = function()
};
/**
- * Delay for last save in ms.
+ * Adds the listener for automatically saving the diagram for local changes.
*/
-DriveFile.prototype.saveDelay = 0;
+DriveFile.prototype.isConflict = function(err)
+{
+ return err != null && err.error != null && err.error.code == 412;
+};
/**
* Translates this point by the given vector.
@@ -87,7 +95,7 @@ DriveFile.prototype.isAutosaveOptional = function()
*/
DriveFile.prototype.isAutosave = function()
{
- return this.ui.editor.autosave || this.isAutosaveRevision();
+ return this.ui.editor.autosave || (this.realtime != null && this.isAutosaveRevision());
};
/**
@@ -103,8 +111,10 @@ DriveFile.prototype.isAutosaveNow = function()
return isNaN(backup) || isNaN(modified) || backup < modified;
}
-
- return true;
+ else
+ {
+ return true;
+ }
};
/**
@@ -146,11 +156,11 @@ DriveFile.prototype.isMovable = function()
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
-DriveFile.prototype.save = function(revision, success, error, unloading)
+DriveFile.prototype.save = function(revision, success, error, unloading, overwrite)
{
DrawioFile.prototype.save.apply(this, arguments);
- this.saveFile(null, revision, success, error, unloading);
+ this.saveFile(null, revision, success, error, unloading, overwrite);
};
/**
@@ -159,7 +169,7 @@ DriveFile.prototype.save = function(revision, success, error, unloading)
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
-DriveFile.prototype.saveFile = function(title, revision, success, error, unloading)
+DriveFile.prototype.saveFile = function(title, revision, success, error, unloading, overwrite)
{
if (!this.isEditable())
{
@@ -170,59 +180,119 @@ DriveFile.prototype.saveFile = function(title, revision, success, error, unloadi
}
else if (!this.savingFile)
{
- this.savingFile = true;
-
- // Makes sure no changes get lost while the file is saved
var prevModified = this.isModified;
var modified = this.isModified();
+
+ // Makes sure no changes get lost while the file is saved
this.setModified(false);
+
+ // Waits for success for modified state to be visible
+ this.isModified = function()
+ {
+ return true;
+ };
- this.ui.drive.saveFile(this, revision, mxUtils.bind(this, function(resp)
+ var doSave = mxUtils.bind(this, function(realOverwrite, realRevision)
{
- this.savingFile = false;
- this.isModified = prevModified;
+ this.savingFile = true;
- // Handles special case where resp is false eg
- // if the old file was converted to realtime
- if (resp != false)
+ this.ui.drive.saveFile(this, realRevision, mxUtils.bind(this, function(resp)
{
- if (revision)
+ this.isModified = prevModified;
+ this.savingFile = false;
+
+ // Handles special case where resp is false eg
+ // if the old file was converted to realtime
+ if (resp != false)
{
- this.lastAutosaveRevision = new Date().getTime();
+ if (revision)
+ {
+ this.lastAutosaveRevision = new Date().getTime();
+ }
+
+ this.desc = resp;
+ this.contentChanged();
+
+ if (success != null)
+ {
+ success(resp);
+ }
}
-
- this.desc = resp;
- this.contentChanged();
-
- if (success != null)
+ else
{
- success(resp);
+ this.setModified(modified || this.isModified());
+
+ if (error != null)
+ {
+ error(resp);
+ }
}
- }
- else
+ }), mxUtils.bind(this, function(err)
{
- this.setModified(modified || this.isModified());
+ var doError = mxUtils.bind(this, function()
+ {
+ this.setModified(modified || this.isModified());
+ this.isModified = prevModified;
+ this.savingFile = false;
+
+ if (error != null)
+ {
+ error(err);
+ }
+ });
- if (error != null)
+ if (this.isConflict(err))
{
- error();
+ this.showConflictDialog(function()
+ {
+ // Overwrites and creates revision
+ doSave(true, true);
+ }, function()
+ {
+ err = null;
+ doError();
+ });
}
- }
- }), mxUtils.bind(this, function(resp)
+ else
+ {
+ doError();
+ }
+ }), unloading, unloading, realOverwrite);
+ });
+
+ doSave(overwrite, revision);
+ }
+};
+
+/**
+ * Shows a conflict dialog to the user.
+ */
+DriveFile.prototype.makeCopy = function(success, error, timestamp)
+{
+ if (this.ui.spinner.spin(document.body, mxResources.get('saving')))
+ {
+ // Uses copyFile internally which is a remote REST call with the advantage of keeping
+ // the parents of the file in-place, but copies the remote file contents so needs to
+ // be updated as soon as we have the ID.
+ this.saveAs(this.ui.getCopyFilename(this, timestamp), mxUtils.bind(this, function(resp)
{
- this.savingFile = false;
- this.isModified = prevModified;
- this.setModified(modified || this.isModified());
+ // Replaces the descriptor to and writes the file
+ this.ui.spinner.stop();
+ this.desc = resp;
+ success();
+ this.setModified(false);
+ }), mxUtils.bind(this, function()
+ {
+ this.ui.spinner.stop();
if (error != null)
{
- error(resp);
+ error();
}
- }), unloading, unloading);
+ }));
}
};
-
/**
* Translates this point by the given vector.
*
@@ -364,3 +434,324 @@ DriveFile.prototype.close = function(unloading)
this.realtime = null;
}
};
+
+/**
+ * Shows a conflict dialog to the user.
+ */
+DriveFile.prototype.showConflictDialog = function(retry, error)
+{
+ if (!this.showingConflictDialog)
+ {
+ var resume = (this.ui.spinner != null && this.ui.spinner.pause != null) ?
+ this.ui.spinner.pause() : function() {};
+ var prev = this.changeListenerEnabled;
+ this.changeListenerEnabled = false;
+ this.showingConflictDialog = true;
+
+ this.ui.showError(mxResources.get('externalChanges'), mxResources.get('fileChangedOverwrite'),
+ mxResources.get('makeCopy'), mxUtils.bind(this, function()
+ {
+ this.showingConflictDialog = false;
+ this.changeListenerEnabled = prev;
+ this.makeCopy(retry, error, true);
+ }), null, mxResources.get('overwrite'), mxUtils.bind(this, function()
+ {
+ this.showingConflictDialog = false;
+ this.changeListenerEnabled = prev;
+ resume();
+ retry();
+ }), mxResources.get('cancel'), mxUtils.bind(this, function()
+ {
+ this.showingConflictDialog = false;
+ this.changeListenerEnabled = prev;
+ this.ui.hideDialog();
+ resume();
+ error();
+ }), 360, 180);
+
+ // Adds important notice to dialog
+ if (this.ui.dialog != null && this.ui.dialog.container != null)
+ {
+ var alert = document.createElement('a');
+ alert.className = 'geStatusAlert';
+ alert.style.display = 'block';
+ alert.style.position = 'absolute';
+ alert.style.cursor = 'pointer';
+ alert.style.bottom = '0';
+ alert.style.padding = '8px 0 8px 0';
+ alert.style.marginBottom = '26px';
+ alert.style.left = '0';
+ alert.style.right = '0';
+ alert.style.textAlign = 'center';
+ alert.style.borderRadius = '0';
+ alert.style.borderLeftStyle = 'none';
+ alert.style.borderRightStyle = 'none';
+ alert.style.textDecoration = 'none';
+ alert.style.fontWeight = 'bold';
+
+ alert.setAttribute('href', 'https://desk.draw.io/support/solutions/articles/16000087215');
+ alert.setAttribute('target', '_blank');
+ mxUtils.write(alert, mxResources.get('collaborativeEditingNotice'));
+
+ this.ui.dialog.container.appendChild(alert);
+ }
+ }
+};
+
+/**
+ * Checks the conversion of the realtime model for this file.
+ */
+DriveFile.prototype.checkConvert = function()
+{
+ var doCheck = mxUtils.bind(this, function(json)
+ {
+ try
+ {
+ if (this.ui.getCurrentFile() == this && !this.isModified())
+ {
+ this.ui.drive.getXmlFile(this.desc, null, mxUtils.bind(this, function(file)
+ {
+ try
+ {
+ var data = file.getData();
+ var node = (data != null) ? mxUtils.parseXml(data).documentElement : null;
+
+ if (node != null)
+ {
+ var tmp = this.ui.editor.extractGraphModel(node, true);
+
+ if (tmp != null)
+ {
+ node = tmp;
+ }
+ }
+
+ if (this.runCheck != null)
+ {
+ this.runCheck(json, node, data);
+ }
+ }
+ catch (e)
+ {
+ this.log('CATCH-PARSEFILE-' + e.stack);
+ this.runCheck(json, null, 'CATCH-PARSEFILE-' + e.stack);
+ }
+ }), mxUtils.bind(this, function(err)
+ {
+ this.log('ERROR-GETFILE');
+ this.runCheck(json, null, 'ERROR-GETFILE');
+ }), true);
+ }
+ }
+ catch (e)
+ {
+ this.log('CATCH-GETFILE-' + e.stack);
+ this.runCheck(json, null, 'CATCH-GETFILE-' + e.stack);
+ }
+ });
+
+ try
+ {
+ this.ui.drive.getRealtimeData(this.desc.id, doCheck, doCheck);
+ }
+ catch (e)
+ {
+ this.log('CATCH-GETJSON-' + e.stack, true);
+ }
+};
+
+/**
+ * Removes all attributes that are irrelevant for structural diff.
+ */
+DriveFile.prototype.getComparableFile = function(node)
+{
+ // Removes all attributes from the mxfile
+ while (node.attributes.length > 0)
+ {
+ node.removeAttribute(node.attributes[0].name);
+ }
+
+ // Removes all diagram IDs since those can be missing in
+ // realtime but will be added on the fly
+ var diagrams = node.getElementsByTagName('diagram');
+
+ for (var i = 0; i < diagrams.length; i++)
+ {
+ diagrams[i].removeAttribute('name');
+ diagrams[i].removeAttribute('id');
+
+ // Uncompress diagram data for structural comparison
+ var tmp = this.ui.editor.graph.decompress(mxUtils.getTextContent(diagrams[i]));
+
+ if (tmp != null && tmp.length > 0)
+ {
+ while (diagrams[i].firstChild != null)
+ {
+ diagrams[i].removeChild(diagrams[i].firstChild);
+ }
+
+ diagrams[i].appendChild(mxUtils.parseXml(tmp).documentElement);
+ }
+ }
+
+ // Some attributes have been initialized using different defaults
+ // in the UI compared to realtime so they must be ignored
+ var models = node.getElementsByTagName('mxGraphModel');
+
+ for (var i = 0; i < models.length; i++)
+ {
+ while (models[i].attributes.length > 0)
+ {
+ models[i].removeAttribute(models[i].attributes[0].name);
+ }
+ }
+
+ return node;
+};
+
+/**
+ * Removes all labels, user objects and styles from the given node.
+ */
+DriveFile.prototype.getAnonymizedXml = function(node)
+{
+ if (node != null)
+ {
+ var nodes = node.getElementsByTagName('mxCell');
+
+ for (var i = 0; i < nodes.length; i++)
+ {
+ nodes[i].removeAttribute('style');
+ nodes[i].removeAttribute('value');
+
+ if (nodes[i].parentNode != null && nodes[i].parentNode.nodeName == 'UserObject' &&
+ nodes[i].parentNode.parentNode != null)
+ {
+ nodes[i].parentNode.parentNode.replaceChild(nodes[i], nodes[i].parentNode);
+ }
+ }
+
+ return mxUtils.getPrettyXml(node);;
+ }
+ else
+ {
+ return 'null';
+ }
+};
+
+/**
+ * Removes all labels, user objects and styles from the given JSON.
+ */
+DriveFile.prototype.getAnonymizedJson = function(json)
+{
+ if (json != null)
+ {
+ var diagrams = json.value.diagrams.value;
+
+ for (var i = 0; i < diagrams.length; i++)
+ {
+ if (diagrams[i].value != null && diagrams[i].value.root != null)
+ {
+ this.anonymizeJsonCell(diagrams[i].value.root.value);
+ }
+ }
+
+ return JSON.stringify(json);
+ }
+ else
+ {
+ return 'null';
+ }
+};
+
+/**
+ * Returns the location as a new object.
+ */
+DriveFile.prototype.anonymizeJsonCell = function(json)
+{
+ if (json != null)
+ {
+ delete json.xmlValue;
+ delete json.value;
+ delete json.style;
+
+ if (json.children != null && json.children.value != null)
+ {
+ for (var i = 0; i < json.children.value.length; i++)
+ {
+ this.anonymizeJsonCell(json.children.value[i].value);
+ }
+ }
+ }
+};
+
+/**
+ * Debug output.
+ */
+DriveFile.prototype.debug = function()
+{
+ if (window.console != null && urlParams['test'] == '1')
+ {
+ console.log.apply(console, arguments);
+ }
+};
+
+/**
+ * Debug output.
+ */
+DriveFile.prototype.log = function(msg, sendReport)
+{
+ this.debug(msg);
+
+ try
+ {
+ this.ui.logEvent({category: this.ui.JSON_CHECK, action: msg, label: this.desc.id});
+
+ if (sendReport)
+ {
+ this.report('Realtime Log Report ' + new Date() +
+ '\n\nDescription: ' + JSON.stringify({version: this.ui.JSON_CHECK,
+ title: this.desc.title, editable: this.desc.editable,
+ copyable: this.desc.copyable, labels: this.desc.labels, id: this.desc.id,
+ userPermission: this.desc.userPermission, fileSize: this.desc.fileSize,
+ fileExtension: this.desc.fileExtension, modifiedDate: this.desc.modifiedDate,
+ mimeType: this.desc.mimeType}) +
+ '\n\nMessage:\n' + msg);
+ }
+ }
+ catch (e)
+ {
+ // ignore
+ }
+};
+
+/**
+ * Debug output.
+ */
+DriveFile.prototype.report = function(data)
+{
+ try
+ {
+ if (data.length > 3000000)
+ {
+ data = data.substring(0, 3000000) + '\n...[REPORT SHORTENED]'
+ }
+
+ this.debug(data);
+
+ mxUtils.post('/email', 'version=' + encodeURIComponent(EditorUi.VERSION) +
+ '&url=' + encodeURIComponent(window.location.href) +
+ '&data=' + encodeURIComponent(data),
+ mxUtils.bind(this, function(req)
+ {
+ this.debug('report sent');
+ }),
+ mxUtils.bind(this, function()
+ {
+ this.debug('report failed');
+ }));
+ }
+ catch (e)
+ {
+ // ignore
+ }
+};
diff --git a/src/main/webapp/js/diagramly/DriveRealtime.js b/src/main/webapp/js/diagramly/DriveRealtime.js
index 86e06067..186511bd 100644
--- a/src/main/webapp/js/diagramly/DriveRealtime.js
+++ b/src/main/webapp/js/diagramly/DriveRealtime.js
@@ -25,7 +25,7 @@ function DriveRealtime(file, doc)
this.ui.allowAnimation = false;
this.codec = new mxCodec();
-
+
this.disconnectListener = mxUtils.bind(this, function()
{
// LATER: How to reload realtime document without refreshing the page
@@ -181,6 +181,20 @@ DriveRealtime.prototype.start = function()
this.log('reset realtime');
}
+ // Forces a refresh if realtime was disabled on the file
+ this.root.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED, mxUtils.bind(this, function(evt)
+ {
+ if (evt.property == 'realtimeConverted')
+ {
+ this.ui.showRefreshDialog();
+ }
+ }));
+
+ if (this.root.has('realtimeConverted'))
+ {
+ this.ui.showRefreshDialog();
+ }
+
var prefix = this.createPrefix();
this.model.prefix = prefix + '-';
this.ui.editor.resetGraph();
@@ -265,9 +279,14 @@ DriveRealtime.prototype.start = function()
// Dummy node, should be XML node if used
this.page = new DiagramPage(document.createElement('diagram'));
this.page.mapping = new RealtimeMapping(this, this.diagramMap, this.page);
- this.diagramMap.set('name', mxResources.get('pageWithNumber', [1]));
- this.diagramMap.set('id', this.page.getId());
- this.page.setName(this.diagramMap.get('name'));
+
+ if (this.file.isEditable())
+ {
+ this.diagramMap.set('name', mxResources.get('pageWithNumber', [1]));
+ this.diagramMap.set('id', this.page.getId());
+ }
+
+ this.page.setName(this.diagramMap.get('name') || mxResources.get('pageWithNumber', [1]));
this.page.mapping.init();
}
else
@@ -282,10 +301,17 @@ DriveRealtime.prototype.start = function()
page.mapping = new RealtimeMapping(this, diagramMap, page);
this.ui.currentPage = page;
- if (this.file.isEditable() && !page.mapping.diagramMap.has('name'))
+ if (this.file.isEditable())
{
- page.mapping.diagramMap.set('name', mxResources.get('pageWithNumber', [1]));
- page.mapping.diagramMap.set('id', page.getId());
+ if (!page.mapping.diagramMap.has('name'))
+ {
+ page.mapping.diagramMap.set('name', mxResources.get('pageWithNumber', [1]));
+ }
+
+ if (!page.mapping.diagramMap.has('id'))
+ {
+ page.mapping.diagramMap.set('id', page.getId());
+ }
}
page.setName(page.mapping.diagramMap.get('name') || mxResources.get('pageWithNumber', [1]));
@@ -872,6 +898,7 @@ DriveRealtime.prototype.installPageSelectListener = function()
if (this.file.isEditable())
{
page.mapping.diagramMap.set('name', page.getName());
+ page.mapping.diagramMap.set('id', page.getId());
}
}
});
@@ -922,6 +949,12 @@ DriveRealtime.prototype.installPageSelectListener = function()
page.mapping = new RealtimeMapping(this, evt.values[i], page);
page.setName(page.mapping.diagramMap.get('name') || mxResources.get('pageWithNumber',
[this.ui.pages.length + 1]));
+
+ if (page.mapping.diagramMap.has('id'))
+ {
+ page.node.setAttribute('id', page.mapping.diagramMap.get('id'));
+ }
+
this.ui.pages.splice(evt.index + i, 0, page);
page.mapping.init();
}
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index d893a9a4..e7468f92 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -120,6 +120,15 @@
},
{name: 'portConstraintRotation', dispName: 'Port Const. Rot.', type: 'bool', defVal: false},
{name: 'snapToPoint', dispName: 'Snap to Point', type: 'bool', defVal: false},
+ {name: 'perimeter', dispName: 'Perimeter', defVal: 'none', type: 'enum',
+ enumList: [{val: 'none', dispName: 'None'},
+ {val: 'rectanglePerimeter', dispName: 'Rectangle'}, {val: 'ellipsePerimeter', dispName: 'Ellipse'},
+ {val: 'rhombusPerimeter', dispName: 'Rhombus'}, {val: 'trianglePerimeter', dispName: 'Triangle'},
+ {val: 'hexagonPerimeter2', dispName: 'Hexagon'}, {val: 'lifelinePerimeter', dispName: 'Lifeline'},
+ {val: 'orthogonalPerimeter', dispName: 'Orthogonal'}, {val: 'backbonePerimeter', dispName: 'Backbone'},
+ {val: 'calloutPerimeter', dispName: 'Callout'}, {val: 'parallelogramPerimeter', dispName: 'Parallelogram'},
+ {val: 'trapezoidPerimeter', dispName: 'Trapezoid'}, {val: 'stepPerimeter', dispName: 'Step'}]
+ },
{name: 'fixDash', dispName: 'Fixed Dash', type: 'bool', defVal: false},
{name: 'autosize', dispName: 'Autosize', type: 'bool', defVal: false},
{name: 'collapsible', dispName: 'Collapsible', type: 'bool', defVal: false},
@@ -2020,7 +2029,7 @@
input.value = pValue;
input.className = "gePropEditor";
- if (pType == "int" || pType == "float")
+ if ((pType == "int" || pType == "float") && !prop.allowAuto)
{
input.type = "number";
input.step = pType == "int"? "1" : "any";
@@ -2041,6 +2050,21 @@
function setInputVal()
{
var inputVal = input.value;
+ inputVal = inputVal.length == 0 && pType != "string"? 0 : inputVal;
+
+ if (prop.allowAuto)
+ {
+ if (inputVal.trim().toLowerCase() == "auto")
+ {
+ inputVal = "auto";
+ pType = "string";
+ }
+ else
+ {
+ inputVal = parseFloat(inputVal);
+ inputVal = isNaN(inputVal)? 0 : inputVal;
+ }
+ }
if (prop.min != null && inputVal < prop.min)
{
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 4d225de2..ebebd138 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -684,6 +684,7 @@
else
{
var diagramNode = node.ownerDocument.createElement('diagram');
+ diagramNode.setAttribute('id', Editor.guid());
mxUtils.setTextContent(diagramNode, data);
fileNode = node.ownerDocument.createElement('mxfile');
@@ -773,9 +774,7 @@
// Uses the graph state from the realtime model
mapping.writeRealtimeToNode(temp);
-
- var data = this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(temp)));
- mxUtils.setTextContent(this.pages[i].node, data);
+ mxUtils.setTextContent(this.pages[i].node, this.editor.graph.compressNode(temp));
// Marks the page as up-to-date
mapping.needsUpdate = false;
@@ -1631,6 +1630,49 @@
};
/**
+ * Constructs a filename for a copy of the given file.
+ */
+ EditorUi.prototype.getCopyFilename = function(file, timestamp)
+ {
+ var title = (file != null && file.getTitle() != null) ?
+ file.getTitle() : this.defaultFilename;
+
+ // Handles extension
+ var extension = '';
+ var dot = title.lastIndexOf('.');
+
+ if (dot >= 0)
+ {
+ extension = title.substring(dot);
+ title = title.substring(0, dot);
+ }
+
+ if (timestamp)
+ {
+ function getFormattedTime()
+ {
+ var today = new Date();
+ var y = today.getFullYear();
+ // JavaScript months are 0-based.
+ var m = today.getMonth() + 1;
+ var d = today.getDate();
+ var h = today.getHours();
+ var mi = today.getMinutes();
+ var s = today.getSeconds();
+
+ return y + "-" + m + "-" + d + "-" + h + "-" + mi + "-" + s;
+ }
+
+ var ts = new Date();
+ title += '-' + getFormattedTime();
+ }
+
+ title = mxResources.get('copyOf', [title]) + extension;
+
+ return title;
+ };
+
+ /**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
@@ -5820,6 +5862,7 @@
if (page.getName() == null)
{
page.setName(mxResources.get('pageWithNumber', [index + 1]));
+ page.needsUpdate = true;
}
graph.model.execute(new ChangePage(this, page, page, index));
diff --git a/src/main/webapp/js/diagramly/GitHubClient.js b/src/main/webapp/js/diagramly/GitHubClient.js
index ad0c8d23..ea95d05b 100644
--- a/src/main/webapp/js/diagramly/GitHubClient.js
+++ b/src/main/webapp/js/diagramly/GitHubClient.js
@@ -629,7 +629,7 @@ GitHubClient.prototype.saveFile = function(file, success, error)
{
resume = this.ui.spinner.pause();
- var dlg = new ErrorDialog(this.ui, mxResources.get('errorSavingFile'),
+ var dlg = new ErrorDialog(this.ui, mxResources.get('externalChanges'),
mxResources.get('fileChangedOverwrite'), mxResources.get('cancel'), mxUtils.bind(this, function()
{
error();
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 02b30e8e..9b8085f9 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -386,6 +386,27 @@
{
editorUi.actions.get('save').funct();
}, null, null, Editor.ctrlKey + '+S');
+
+ editorUi.actions.addAction('refresh', function()
+ {
+ var currentFile = editorUi.getCurrentFile();
+
+ function fn()
+ {
+ currentFile.setModified(false);
+ editorUi.loadFile(currentFile.getHash(), true);
+ };
+
+ if (currentFile != null && currentFile.isModified())
+ {
+ editorUi.confirm(mxResources.get('allChangesLost'), null, fn,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ else
+ {
+ fn();
+ }
+ }, null, null, 'Alt+Shift+R');
editorUi.actions.addAction('upload...', function()
{
@@ -945,7 +966,9 @@
var b = graph.getGraphBounds();
var tr = graph.view.translate;
var s = graph.view.scale;
- graph.insertVertex(parent, null, '', b.x / s - tr.x, b.y / s - tr.y, b.width / s, b.height / s, 'fillColor=none;strokeColor=red;');
+ graph.insertVertex(graph.getDefaultParent(), null, '',
+ b.x / s - tr.x, b.y / s - tr.y, b.width / s, b.height / s,
+ 'fillColor=none;strokeColor=red;');
}));
mxResources.parse('createSidebarEntry=Create sidebar entry');
@@ -1830,20 +1853,8 @@
if (file != null)
{
- var title = (file.getTitle() != null) ? file.getTitle() : editorUi.defaultFilename;
-
- // Handles extension
- var extension = '';
- var dot = title.lastIndexOf('.');
-
- if (dot >= 0)
- {
- extension = title.substring(dot);
- title = title.substring(0, dot);
- }
-
- title = mxResources.get('copyOf', [title]) + extension;
-
+ var title = editorUi.getCopyFilename(file);
+
if (file.constructor == DriveFile)
{
var dlg = new CreateDialog(editorUi, title, mxUtils.bind(this, function(newTitle, mode)
@@ -1860,18 +1871,18 @@
{
if (editorUi.spinner.spin(document.body, mxResources.get('saving')))
{
- // Makes sure the latest XML is in the file
- file.save(false, mxUtils.bind(this, function()
+ // Saveas does not update the file descriptor in Google Drive
+ file.saveAs(newTitle, mxUtils.bind(this, function(resp)
{
- // Saveas does not update the file descriptor in Google Drive
- file.saveAs(newTitle, mxUtils.bind(this, function(resp)
+ // Replaces file descriptor in-place and saves
+ file.desc = resp;
+
+ // Makes sure the latest XML is in the file
+ file.save(false, mxUtils.bind(this, function()
{
editorUi.spinner.stop();
- var url = editorUi.getUrl();
- window.openWindow(url + '#G' + resp.id, null, mxUtils.bind(this, function()
- {
- window.location.hash = 'G' + resp.id;
- }));
+ file.setModified(false);
+ file.addAllSavedStatus();
}), mxUtils.bind(this, function(resp)
{
editorUi.handleError(resp);
@@ -1884,7 +1895,7 @@
}
else
{
- this.editorUi.createFile(newTitle, this.editorUi.getFileData(true), null, mode);
+ editorUi.createFile(newTitle, editorUi.getFileData(true), null, mode);
}
}
}), mxUtils.bind(this, function()
@@ -2648,7 +2659,7 @@
if (file.realtime == null)
{
- this.addMenuItems(menu, ['save', 'share', '-'], parent);
+ this.addMenuItems(menu, ['save', 'share', '-', 'refresh', '-'], parent);
}
else
{
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index d1589797..fd0faa47 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -694,9 +694,10 @@ EditorUi.initMinimalTheme = function()
this.put('diagram', new Menu(mxUtils.bind(this, function(menu, parent)
{
+ var file = ui.getCurrentFile();
ui.menus.addSubmenu('extras', menu, parent, mxResources.get('preferences'));
menu.addSeparator(parent);
-
+
if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
{
ui.menus.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-'], parent);
@@ -721,17 +722,19 @@ EditorUi.initMinimalTheme = function()
}
ui.menus.addSubmenu('exportAs', menu, parent);
-
- var file = ui.getCurrentFile();
if (file != null && file.constructor == DriveFile)
{
ui.menus.addMenuItems(menu, ['-', 'share'], parent);
-
+
if (file.realtime != null)
{
ui.menus.addMenuItems(menu, ['chatWindowTitle'], parent);
}
+ else
+ {
+ ui.menus.addMenuItems(menu, ['-', 'refresh'], parent);
+ }
menu.addSeparator(parent);
}
diff --git a/src/main/webapp/js/diagramly/Pages.js b/src/main/webapp/js/diagramly/Pages.js
index 81fd0d4d..69973014 100644
--- a/src/main/webapp/js/diagramly/Pages.js
+++ b/src/main/webapp/js/diagramly/Pages.js
@@ -460,7 +460,7 @@ Graph.prototype.createViewState = function(node)
background: (bg != null && bg.length > 0) ? bg : this.defaultGraphBackground,
backgroundImage: (bgImg != null) ? new mxImage(bgImg.src, bgImg.width, bgImg.height) : null,
pageScale: (!isNaN(ps)) ? ps : mxGraph.prototype.pageScale,
- pageFormat: (!isNaN(pw) && !isNaN(ph)) ? new mxRectangle(0, 0, pw, pw) : this.pageFormat,
+ pageFormat: (!isNaN(pw) && !isNaN(ph)) ? new mxRectangle(0, 0, pw, ph) : mxSettings.getPageFormat(),
tooltips: node.getAttribute('tooltips') != '0',
connect: node.getAttribute('connect') != '0',
arrows: node.getAttribute('arrows') != '0',
@@ -496,8 +496,10 @@ Graph.prototype.saveViewState = function(vs, node)
node.setAttribute('pageHeight', pf.height);
}
- node.setAttribute('background', (vs != null && vs.background != null) ?
- vs.background : this.defaultGraphBackground);
+ if (vs != null && vs.background != null)
+ {
+ node.setAttribute('background', vs.background);
+ }
if (vs != null && vs.backgroundImage != null)
{
diff --git a/src/main/webapp/js/diagramly/vsdx/importer.js b/src/main/webapp/js/diagramly/vsdx/importer.js
index 55c36b6c..f343b92d 100644
--- a/src/main/webapp/js/diagramly/vsdx/importer.js
+++ b/src/main/webapp/js/diagramly/vsdx/importer.js
@@ -1287,14 +1287,14 @@ var com;
if (dScale != null)
{
- dScaleV = parseFloat(dScale.getAttribute("V"));
+ dScaleV = parseFloat(dScale.getAttribute("V")) || 1;
}
var pScale = master.pageSheet["PageScale"];
if (pScale != null)
{
- pScaleV = parseFloat(pScale.getAttribute("V"));
+ pScaleV = parseFloat(pScale.getAttribute("V")) || 1;
}
scale = pScaleV / dScaleV;
@@ -1533,7 +1533,7 @@ var com;
}
/*private*/ RowFactory.getIndex = function (elem) {
try {
- return parseInt(elem.getAttribute("IX"));
+ return parseInt(elem.getAttribute("IX")) || 1;
}
catch (e) {
return 1;
@@ -2142,7 +2142,7 @@ var com;
}
mxVsdxGeometry.prototype.getIndex$org_w3c_dom_Element = function (elem) {
try {
- return parseInt(elem.getAttribute("IX"));
+ return parseInt(elem.getAttribute("IX")) || 0;
}
catch (e) {
return 0;
@@ -8609,7 +8609,7 @@ var com;
var cell = cells[index158];
{
n = cell.getAttribute("N");
- var v = cell.getAttribute("V");
+ var v = cell.getAttribute("V") || cell.textContent || "";
switch ((n)) {
case "Value":
value = v;
@@ -10688,9 +10688,9 @@ var com;
var yS = "-0.4";
if (control != null) {
xEl = control.getElementsByTagName(com.mxgraph.io.vsdx.mxVsdxConstants.X).item(0);
- xS = xEl.getAttribute("F");
+ xS = xEl.getAttribute("F") || "";
yEl = control.getElementsByTagName(com.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0);
- yS = yEl.getAttribute("F");
+ yS = yEl.getAttribute("F") || "";
}
var geometry_4 = vertex.getGeometry();
xS = xS.split("Width/2+").join("");
@@ -11080,7 +11080,7 @@ var com;
var firstNURBS = firstGeom.getElementsByTagName(com.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0);
var firstE = firstNURBS.getElementsByTagName("E").item(0);
if (firstE != null) {
- var f = firstE.getAttribute("F");
+ var f = firstE.getAttribute("F") || "";
f = f.replace(new RegExp("NURBS\\(", 'g'), "");
f = f.replace(new RegExp("\\)", 'g'), "");
f = f.replace(new RegExp(",", 'g'), " ");
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index 3ddb74e7..9449b657 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -22,8 +22,8 @@ position:{cssPropBits:0,cssLitGroup:[a[23]],cssFns:[]},quotes:{cssPropBits:8,css
cssLitGroup:[a[14],a[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[a[52],a[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[a[42],a[56],a[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[a[19],a[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[a[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[a[26],a[71]],cssFns:[]},"text-wrap":{cssPropBits:0,
cssLitGroup:[a[46],a[71],a[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[a[71]],cssFns:"matrix() perspective() rotate() rotate3d() rotatex() rotatey() rotatez() scale() scale3d() scalex() scaley() scalez() skew() skewx() skewy() translate() translate3d() translatex() translatey() translatez()".split(" ")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[a[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[a[10],a[48],a[50],a[71]],cssFns:["cubic-bezier()",
"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[a[48],a[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[a[30],a[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[a[12],a[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[a[27],a[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[a[17],a[69]],
-cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[a[22],a[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[a[32],a[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[a[36],a[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[a[0],a[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[31],a[42],a[48],
-a[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[11],a[31],a[42],a[48],a[56],a[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[a[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[a[48],a[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[a[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
+cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[a[22],a[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[a[32],a[72],a[55]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[a[36],a[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[a[0],a[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[31],a[42],
+a[48],a[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[11],a[31],a[42],a[48],a[56],a[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[a[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[a[48],a[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[a[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},c;for(c in b)"string"===typeof b[c]&&Object.hasOwnProperty.call(b,c)&&(b[c]=b[b[c]]);"undefined"!==typeof window&&(window.cssSchema=b);var d,e;(function(){function a(a){var b=parseInt(a.substring(1),16);return 65535<b?(b-=65536,String.fromCharCode(55296+(b>>10),56320+(b&1023))):b==b?String.fromCharCode(b):" ">a[1]?"":a[1]}function b(a,b){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,
b)+'"'}function c(a){return g[a]||(g[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function f(a){return h[a]||(h[a]=("">a?"%0":"%")+a.charCodeAt(0).toString(16))}var g={"\\":"\\\\"},h={"\\":"%5c"},k=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]=|[^\"'\\\\/]|/(?![/*])",
@@ -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:"9.3.1",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:"9.3.4",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/")||
@@ -615,7 +615,7 @@ mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){g||a.setShadow(!1);a.b
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};
mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),h=this.graph.model.getTerminal(g,!0)==a;if(!b||h)h=this.graph.view.getVisibleTerminal(g,!h),this.traverse(h,b,c,g,e)}};
-mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(cell)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
@@ -1607,13 +1607,14 @@ Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b
Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var c=a.value.getAttribute("tooltip");if(null!=c)null!=c&&this.isReplacePlaceholders(a)&&(c=this.replacePlaceholders(a,c)),b=this.sanitizeHtml(c);else{c=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&c.push("link");for(var e=0;e<a.length;e++)0>mxUtils.indexOf(c,a[e].nodeName)&&0<a[e].nodeValue.length&&d.push({name:a[e].nodeName,value:a[e].nodeValue});d.sort(function(a,b){return a.name<b.name?
-1:a.name>b.name?1:0});for(e=0;e<d.length;e++)"link"==d[e].name&&this.isCustomLink(d[e].value)||(b+=("link"!=d[e].name?"<b>"+d[e].name+":</b> ":"")+mxUtils.htmlEntities(d[e].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b};
-Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
-Graph.prototype.zapGremlins=function(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(c))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
-HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
-HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
-HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
-HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":
-IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
+Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};Graph.prototype.compressNode=function(a){return this.compress(this.zapGremlins(mxUtils.getXml(a)))};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};
+Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};Graph.prototype.zapGremlins=function(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(c))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;
+HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";
+HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
+HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);
+HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
+HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+
+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,
mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index 8198335d..8690f5cc 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -592,7 +592,7 @@ c,b,p)}};h.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this
-1==p.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=p.indexOf("image=")?!1:!0};return h}();w.mxVsdxCodec=l;l.__class="com.mxgraph.io.mxVsdxCodec"})(m.io||(m.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
(function(c){(function(m){(function(w){var l=function(h){function f(){var b=h.call(this)||this;b.RESPONSE_END="";b.RESPONSE_DIAGRAM_START="";b.RESPONSE_DIAGRAM_END="";b.RESPONSE_HEADER="";return b}__extends(f,h);f.prototype.decodeVssx=function(b,a,d){var g=this,p="<mxlibrary>[";this.decodeVsdx(b,function(b){p=p.concat(b);var d=g.vsdxModel.getMasterShapes(),f=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b=[];null==
a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(g.vsdxModel.getPages())).next();if(null!=d){var D={str:"",toString:function(){return this.str}},l=0===b.length?"":",",w=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=w[a];var b=m.createMxGraph(),g=a.getMasterShape().getShape(),g=new c.mxgraph.io.vsdx.VsdxShape(f,g,!f.isEdge(g),d,null,m.vsdxModel),p=1;if(null!=a.pageSheet){var x=p=1,E=a.pageSheet.DrawingScale;null!=
-E&&(p=parseFloat(E.getAttribute("V")));E=a.pageSheet.PageScale;null!=E&&(x=parseFloat(E.getAttribute("V")));p=x/p}x=null;if(g.isVertex())for(m.edgeShapeMap.entries=[],m.parentsMap.entries=[],x=m.addShape(b,g,b.getDefaultParent(),0,1169),g=function(a){null==a.entries&&(a.entries=[]);return a.entries}(m.edgeShapeMap),E=0;E<g.length;E++){var t=g[E],z=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
+E&&(p=parseFloat(E.getAttribute("V"))||1);E=a.pageSheet.PageScale;null!=E&&(x=parseFloat(E.getAttribute("V"))||1);p=x/p}x=null;if(g.isVertex())for(m.edgeShapeMap.entries=[],m.parentsMap.entries=[],x=m.addShape(b,g,b.getDefaultParent(),0,1169),g=function(a){null==a.entries&&(a.entries=[]);return a.entries}(m.edgeShapeMap),E=0;E<g.length;E++){var t=g[E],z=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
b)return a.entries[d].value;return null}(m.parentsMap,t.getKey());m.addUnconnectedEdge(b,z,t.getValue(),1169)}else x=m.addUnconnectedEdge(b,null,g,1169);if(null!=x){m.scaleGraph(b,p);g=m.normalizeGeo(x);m.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";D.str=D.str.concat(l);D.str=D.str.concat('{"xml":"');b=h.prototype.processPage.call(m,b,null);D.str=D.str.concat(b);D.str=D.str.concat('","w":');D.str=D.str.concat(g.width);D.str=D.str.concat(',"h":');D.str=
D.str.concat(g.height);D.str=D.str.concat(',"title":');a=a.getName();null==a&&(a="");a=JSON.stringify(mxUtils.htmlEntities(a));D.str=D.str.concat(a);D.str=D.str.concat("}");l=","}};for(var m=g,C=0;C<w.length;C++)b(C);p=p.concat(D)}p=p.concat("]</mxlibrary>");a&&a(p)},d)};f.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,d);this.transPoint(a.offset,d);b=a.points;if(null!=b)for(var g=0;g<b.length;g++)this.transPoint(b[g],
d);this.transPoint(d,d)}return a};f.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};f.prototype.processPage=function(b,a){var d=b.getModel(),g="",p="",f;for(f in d.cells){var E=d.cells[f];if(b.getDefaultParent()===d.getParent(E)){var g=g.concat(p),g=g.concat('{"xml":"'),x=this.createMxGraph();x.addCell(E);this.sanitiseGraph(x);if(0===x.getModel().getChildCount(x.getDefaultParent()))return"continue";p=this.normalizeGeo(E);x=h.prototype.processPage.call(this,x,null);g=g.concat(x);g=
@@ -600,8 +600,8 @@ g.concat('","w":');g=g.concat(p.width);g=g.concat(',"h":');g=g.concat(p.height);
p.entries[t].key===x){p=p.entries[t].value;break a}p=null}null!=p&&(E=p.getName())}g=g.concat(E);g=g.concat('"}');p=","}}this.RESPONSE_DIAGRAM_START=0<g.length?",":"";return g};return f}(c.mxgraph.io.mxVsdxCodec);w.mxVssxCodec=l;l.__class="com.mxgraph.io.mxVssxCodec"})(m.io||(m.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a,b,g){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=g}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA=
function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();c.Row=f;f.__class="com.mxgraph.io.vsdx.geometry.Row"})(c.geometry||(c.geometry={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
-(function(c){(function(m){(function(m){(function(l){(function(h){var f=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(g){}return null};b.getRowObj=function(a,d){var g=a.getAttribute("T"),p=b.getIndex(a),f;f=(f=a.getAttribute("Del"))&&f.equals?f.equals("1"):"1"===f;if(!f){var E=null;p<=d.length&&(E=d[p-1]);var x=f=null,t=null,h=null,
-l=null,m=null,w=null,A=null;null!=E&&(f=E.x,x=E.y,t=E.getA(),h=E.getB(),l=E.getC(),m=E.getD(),A=E.getFormulaA(),w=E.getFormulaE());for(var E=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),F=0;F<E.length;F++){var B=E[F],Y=B.getAttribute("N"),J=B.getAttribute("V");switch(Y){case "X":f=b.getDoubleVal(J);break;case "Y":x=b.getDoubleVal(J);break;case "A":t=b.getDoubleVal(J);A=B.getAttribute("V");break;case "B":h=b.getDoubleVal(J);break;case "C":l=b.getDoubleVal(J);break;case "D":m=b.getDoubleVal(J);
+(function(c){(function(m){(function(m){(function(l){(function(h){var f=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(g){}return null};b.getRowObj=function(a,d){var g=a.getAttribute("T"),p=b.getIndex(a),f;f=(f=a.getAttribute("Del"))&&f.equals?f.equals("1"):"1"===f;if(!f){var E=null;p<=d.length&&(E=d[p-1]);var x=f=null,t=null,
+h=null,l=null,m=null,w=null,A=null;null!=E&&(f=E.x,x=E.y,t=E.getA(),h=E.getB(),l=E.getC(),m=E.getD(),A=E.getFormulaA(),w=E.getFormulaE());for(var E=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),F=0;F<E.length;F++){var B=E[F],Y=B.getAttribute("N"),J=B.getAttribute("V");switch(Y){case "X":f=b.getDoubleVal(J);break;case "Y":x=b.getDoubleVal(J);break;case "A":t=b.getDoubleVal(J);A=B.getAttribute("V");break;case "B":h=b.getDoubleVal(J);break;case "C":l=b.getDoubleVal(J);break;case "D":m=b.getDoubleVal(J);
break;case "E":w=J}}switch(g){case "MoveTo":return new c.mxgraph.io.vsdx.geometry.MoveTo(p,f,x);case "LineTo":return new c.mxgraph.io.vsdx.geometry.LineTo(p,f,x);case "ArcTo":return new c.mxgraph.io.vsdx.geometry.ArcTo(p,f,x,t);case "Ellipse":return new c.mxgraph.io.vsdx.geometry.Ellipse(p,f,x,t,h,l,m);case "EllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.EllipticalArcTo(p,f,x,t,h,l,m);case "InfiniteLine":return new c.mxgraph.io.vsdx.geometry.InfiniteLine(p,f,x,t,h);case "NURBSTo":return new c.mxgraph.io.vsdx.geometry.NURBSTo(p,
f,x,t,h,l,m,w);case "PolylineTo":return new c.mxgraph.io.vsdx.geometry.PolylineTo(p,f,x,A);case "RelCubBezTo":return new c.mxgraph.io.vsdx.geometry.RelCubBezTo(p,f,x,t,h,l,m);case "RelEllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(p,f,x,t,h,l,m);case "RelLineTo":return new c.mxgraph.io.vsdx.geometry.RelLineTo(p,f,x);case "RelMoveTo":return new c.mxgraph.io.vsdx.geometry.RelMoveTo(p,f,x);case "RelQuadBezTo":return new c.mxgraph.io.vsdx.geometry.RelQuadBezTo(p,f,x,t,h);case "SplineKnot":return new c.mxgraph.io.vsdx.geometry.SplineKnot(p,
f,x,t);case "SplineStart":return new c.mxgraph.io.vsdx.geometry.SplineStart(p,f,x,t,h,l,m)}}return new c.mxgraph.io.vsdx.geometry.DelRow(p)};return b}();h.RowFactory=f;f.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(l.geometry||(l.geometry={}))})(m.vsdx||(m.vsdx={}))})(m.io||(m.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
@@ -622,7 +622,7 @@ h.BULLET="Bullet";h.CASE="Case";h.CHARACTER="Character";h.COLOR="Color";h.COLOR_
"TextBlock";h.TEXT_STYLE="TextStyle";h.TO_PART="ToPart";h.TO_SHEET="ToSheet";h.TOP_MARGIN="TopMargin";h.TRUE="1";h.TXT_ANGLE="TxtAngle";h.TXT_HEIGHT="TxtHeight";h.TXT_LOC_PIN_X="TxtLocPinX";h.TXT_LOC_PIN_Y="TxtLocPinY";h.TXT_PIN_X="TxtPinX";h.TXT_PIN_Y="TxtPinY";h.TXT_WIDTH="TxtWidth";h.TYPE="Type";h.TYPE_GROUP="Group";h.TYPE_SHAPE="Shape";h.UNIQUE_ID="UniqueID";h.VERTICAL_ALIGN="VerticalAlign";h.WIDTH="Width";h.X_CON="XCon";h.X_DYN="XDyn";h.X="X";h.Y_CON="YCon";h.Y_DYN="YDyn";h.Y="Y";h.HIDE_TEXT=
"HideText";h.VSDX_ID="vsdxID";h.CONNECT_TO_PART_WHOLE_SHAPE=3;c.mxVsdxConstants=h;h.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
(function(c){(function(m){(function(m){(function(l){var h=function(){function f(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),
-this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}f.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))}catch(a){return 0}};f.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||
+this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}f.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))||0}catch(a){return 0}};f.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||
null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};f.prototype.processGeoElem=function(b){var a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var d=0;d<b.length;d++)0<this.rows.push(null)}for(d=0;d<a.length;d++){var g=a[d],p=g.getAttribute("N"),g=g.getAttribute("V");switch(p){case "NoFill":this.noFill=
function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoLine":this.noLine=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoShow":this.noShow=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoSnap":this.noSnap=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoQuickDrag":this.noQuickDrag=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g)}}a=this.rows.length;d=!1;for(p=0;p<b.length;p++)g=c.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[p],
this.rows),g.getIndex()>a?(0<this.rows.push(g),d=!0):this.rows[g.getIndex()-1]=g;d&&function(a,b){b.compare?a.sort(function(a,d){return b.compare(a,d)}):a.sort(b)}(this.rows,new f.mxVsdxGeometry$0(this))};f.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};f.prototype.getIndex$=function(){return this.index};f.prototype.isNoFill=function(){return this.noFill};
@@ -877,7 +877,7 @@ this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){f.prototype
a.equals?a.equals(b):a===b}(h,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"EnhMetaFile"))g="png";else return;h=a.firstChild;if(null!=h){if(null!=h&&1==h.nodeType){var l=h;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(l.nodeName.toLowerCase(),"rel")&&(l=l.getAttribute("r:id"),null!=l&&0!==l.length)){var h=p.lastIndexOf("/"),m="",t="";try{m=p.substring(0,h),t=p.substring(h,p.length)}catch(z){return}h=d.getRelationship(l,m+"/_rels"+t+".rels");if(null!=h){p=h.getAttribute("Target")||
"";l=h.getAttribute("Type");h=p.lastIndexOf("/");try{p=p.substring(h+1,p.length)}catch(z){return}null!=l&&function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(l,"image")&&(this.imageData={},(h=d.getMedia(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=h,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(p.toLowerCase(),".bmp")&&(g="jpg"),this.imageData.iType=g):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}h=
h.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(g,c.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var g=0;g<a.length;g++){var d=a[g],p=d.getAttribute("IX")||
-"";if(0!==p.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[p]="";else{for(var h=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",m="",t=0;t<h.length;t++){var z=h[t],d=z.getAttribute("N"),z=z.getAttribute("V");switch(d){case "Value":l=z;break;case "Format":m=z}}if(0!==l.length){try{(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(m,"{{")&&(l=(new Date(b.VSDX_START_TIME+
+"";if(0!==p.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[p]="";else{for(var h=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",m="",t=0;t<h.length;t++){var z=h[t],d=z.getAttribute("N"),z=z.getAttribute("V")||z.textContent||"";switch(d){case "Value":l=z;break;case "Format":m=z}}if(0!==l.length){try{(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(m,"{{")&&(l=(new Date(b.VSDX_START_TIME+
Math.floor(864E5*parseFloat(l)))).toString())}catch(aa){}this.fields[p]=l}}}}else f.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===
this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.textToList=function(a,b){if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"")){var d=this.getBullet(b);if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(d,
"0")){var f=a.split("\n");f[f.length-1]||f.pop();for(var h="",l=0;l<f.length;l++)h+=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(f[l],"li");h=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(h,"ul");f={};(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"4")?f["list-style-type"]="square":f["list-style-type"]="disc";return h=this.insertAttributes(h,f)}}return a};b.prototype.getTextParagraphFormated=function(a){var b="",g={};g.align=this.getHorizontalAlign(this.pp,!0);g["margin-left"]=this.getIndentLeft(this.pp);
@@ -967,7 +967,7 @@ b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabel
if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Organizational unit")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Organizational unit")){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0),d=null,d="0.0",f=null,f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),
f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Inh")&&(d="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");for(var l=b.split(";"),m="",t=0;t<l.length;t++){var z=l[t],z=z.trim();(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(z,"tabHeight=")&&
(m=z.split("tabHeight=").join(""))}(function(a,b){return a&&a.equals?a.equals(b):a===b})(m,"")&&(m="20");l=parseFloat(m);d=parseFloat(d);f=parseFloat(f);m=h.height;d=.1*h.width+100*d;d=new mxPoint(d,m-m*f-l/2);a.getGeometry().offset=d}else if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Domain 3D")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Domain 3D")){h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;
-d="0.0";f=null;f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F"),f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F"));h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="0.0";if(function(a,b){return a&&a.equals?a.equals(b):
+d="0.0";f=null;f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="0.0";if(function(a,b){return a&&a.equals?a.equals(b):
a===b}(f,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);m=h.height;d=.1*h.width+100*d;d=new mxPoint(d,m-m*f);a.getGeometry().offset=d}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var d=b.getType(this.getShape());this.styleDebug("shape type = "+d);if(null!=this.imageData||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,d)&&null!=this.masterShape&&
null!=this.masterShape.imageData){var f=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var h=function(a,b){return a[b]?a[b]:null}(f,"iType"),l=function(a,b){return a[b]?a[b]:null}(f,"iData");a.image="data:image/"+h+","+l;return a}var m=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(m,""))return this.styleDebug("No geom found"),a;var x=Graph.prototype.compress(m);a[mxConstants.STYLE_SHAPE]="stencil("+x+")"}catch(t){console.error(t.message,
t)}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Off-page reference")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+this.shapeName);
@@ -979,8 +979,8 @@ a===b}(f.toLowerCase(),"width*1")&&function(a,b){return a&&a.equals?a.equals(b):
b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"controls.row_")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isRotatedLabel=function(){var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V","");null!=this.masterShape&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")&&(a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(a,b){return a&&
a.equals?a.equals(b):a===b}(a,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0.0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*
(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_Y),
-0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var f=[];if(null!=this.shape){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.GEOM);if(0<h.length&&(h=h.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=h)){for(var h=h.getAttribute("F"),
-h=h.replace(RegExp("NURBS\\(","g"),""),h=h.replace(RegExp("\\)","g"),""),h=h.replace(RegExp(",","g")," "),h=h.replace(RegExp("\\s\\s","g")," "),h=h.split(" "),l=h.length,m=[];0<l--;)m.push(0);for(l=0;l<h.length;l++)m[l]=parseFloat(h[l]);for(l=2;l+4<h.length;l+=4){var x=new mxPoint,t=m[l+3];x.x=Math.floor(Math.round(100*(b.x+Math.min(100,Math.abs(a.x-b.x))*m[l+2]))/100);x.y=Math.floor(Math.round(100*(b.y-100*t))/100);0<f.push(x)}return f}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=
+0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var f=[];if(null!=this.shape){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.GEOM);if(0<h.length&&(h=h.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=h)){for(var h=h.getAttribute("F")||
+"",h=h.replace(RegExp("NURBS\\(","g"),""),h=h.replace(RegExp("\\)","g"),""),h=h.replace(RegExp(",","g")," "),h=h.replace(RegExp("\\s\\s","g")," "),h=h.split(" "),l=h.length,m=[];0<l--;)m.push(0);for(l=0;l<h.length;l++)m[l]=parseFloat(h[l]);for(l=2;l+4<h.length;l+=4){var x=new mxPoint,t=m[l+3];x.x=Math.floor(Math.round(100*(b.x+Math.min(100,Math.abs(a.x-b.x))*m[l+2]))/100);x.y=Math.floor(Math.round(100*(b.y-100*t))/100);0<f.push(x)}return f}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=
this.getId().toString();a=this.getForm();if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,""))for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getEdgeMarker(!0);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]=
"0"),this.styleMap[mxConstants.STYLE_STARTARROW]=d);d=this.getEdgeMarker(!1);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=d);d=Math.round(this.getStartArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+d);d=Math.round(this.getFinalArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=
""+d);d=Math.round(this.getLineWidth())|0;1!==d&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+d);d=this.getStrokeColor();(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=c.mxgraph.io.vsdx.mxVsdxConstants.TRUE);this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,d=this.getFillColor(),function(a,b){return a&&a.equals?a.equals(b):
diff --git a/src/main/webapp/js/mxgraph/Dialogs.js b/src/main/webapp/js/mxgraph/Dialogs.js
index c7dbf6c0..59114bab 100644
--- a/src/main/webapp/js/mxgraph/Dialogs.js
+++ b/src/main/webapp/js/mxgraph/Dialogs.js
@@ -773,14 +773,8 @@ var EditDiagramDialog = function(editorUi)
if (select.value == 'new')
{
- window.openFile = new OpenFile(function()
- {
- editorUi.hideDialog();
- window.openFile = null;
- });
-
- window.openFile.setData(data, null);
- editorUi.editor.graph.openLink(editorUi.getUrl());
+ editorUi.hideDialog();
+ editorUi.editor.editAsNew(data);
}
else if (select.value == 'replace')
{
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index 1f2dcbc3..6da08ce9 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -2925,6 +2925,14 @@ Graph.prototype.bytesToString = function(arr)
};
/**
+ * Returns a base64 encoded version of the compressed outer XML of the given node.
+ */
+Graph.prototype.compressNode = function(node)
+{
+ return this.compress(this.zapGremlins(mxUtils.getXml(node)));
+};
+
+/**
* Returns a base64 encoded version of the compressed string.
*/
Graph.prototype.compress = function(data)
@@ -4797,6 +4805,10 @@ if (typeof mxVertexHandler != 'undefined')
// Mapping for multiple calls to cloneCells with the same set of cells
var mapping = new Object();
+ // Populates the mapping to fix lookups for forward refs from edges
+ // to cells in parents that are cloned later in the loop below
+// this.cloneCells([model.root], this.isCloneInvalidEdges(), mapping);
+
for (var i = 0; i < childCount; i++)
{
var parent = model.getChildAt(model.getRoot(), i);
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index 4ae85efd..6b89d99d 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -22,8 +22,8 @@ position:{cssPropBits:0,cssLitGroup:[a[23]],cssFns:[]},quotes:{cssPropBits:8,css
cssLitGroup:[a[14],a[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[a[52],a[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[a[42],a[56],a[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[a[19],a[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[a[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[a[26],a[71]],cssFns:[]},"text-wrap":{cssPropBits:0,
cssLitGroup:[a[46],a[71],a[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[a[71]],cssFns:"matrix() perspective() rotate() rotate3d() rotatex() rotatey() rotatez() scale() scale3d() scalex() scaley() scalez() skew() skewx() skewy() translate() translate3d() translatex() translatey() translatez()".split(" ")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[a[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[a[10],a[48],a[50],a[71]],cssFns:["cubic-bezier()",
"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[a[48],a[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[a[30],a[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[a[12],a[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[a[27],a[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[a[17],a[69]],
-cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[a[22],a[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[a[32],a[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[a[36],a[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[a[0],a[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[31],a[42],a[48],
-a[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[11],a[31],a[42],a[48],a[56],a[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[a[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[a[48],a[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[a[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
+cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[a[22],a[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[a[32],a[72],a[55]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[a[36],a[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[a[0],a[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[31],a[42],
+a[48],a[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[11],a[31],a[42],a[48],a[56],a[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[a[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[a[48],a[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[a[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},c;for(c in b)"string"===typeof b[c]&&Object.hasOwnProperty.call(b,c)&&(b[c]=b[b[c]]);"undefined"!==typeof window&&(window.cssSchema=b);var d,e;(function(){function a(a){var b=parseInt(a.substring(1),16);return 65535<b?(b-=65536,String.fromCharCode(55296+(b>>10),56320+(b&1023))):b==b?String.fromCharCode(b):" ">a[1]?"":a[1]}function b(a,b){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,
b)+'"'}function c(a){return g[a]||(g[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function f(a){return h[a]||(h[a]=("">a?"%0":"%")+a.charCodeAt(0).toString(16))}var g={"\\":"\\\\"},h={"\\":"%5c"},k=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]=|[^\"'\\\\/]|/(?![/*])",
@@ -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:"9.3.1",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:"9.3.4",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/")||
@@ -615,7 +615,7 @@ mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){g||a.setShadow(!1);a.b
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};
mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),h=this.graph.model.getTerminal(g,!0)==a;if(!b||h)h=this.graph.view.getVisibleTerminal(g,!h),this.traverse(h,b,c,g,e)}};
-mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(cell)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
@@ -1607,13 +1607,14 @@ Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b
Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var c=a.value.getAttribute("tooltip");if(null!=c)null!=c&&this.isReplacePlaceholders(a)&&(c=this.replacePlaceholders(a,c)),b=this.sanitizeHtml(c);else{c=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&c.push("link");for(var e=0;e<a.length;e++)0>mxUtils.indexOf(c,a[e].nodeName)&&0<a[e].nodeValue.length&&d.push({name:a[e].nodeName,value:a[e].nodeValue});d.sort(function(a,b){return a.name<b.name?
-1:a.name>b.name?1:0});for(e=0;e<d.length;e++)"link"==d[e].name&&this.isCustomLink(d[e].value)||(b+=("link"!=d[e].name?"<b>"+d[e].name+":</b> ":"")+mxUtils.htmlEntities(d[e].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b};
-Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
-Graph.prototype.zapGremlins=function(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(c))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
-HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
-HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
-HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
-HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":
-IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
+Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};Graph.prototype.compressNode=function(a){return this.compress(this.zapGremlins(mxUtils.getXml(a)))};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};
+Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};Graph.prototype.zapGremlins=function(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(c))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;
+HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";
+HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
+HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);
+HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
+HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+
+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,
mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
diff --git a/src/main/webapp/js/sanitizer/sanitizer.min.js b/src/main/webapp/js/sanitizer/sanitizer.min.js
index 6e7d30d5..0d8f9a3e 100644
--- a/src/main/webapp/js/sanitizer/sanitizer.min.js
+++ b/src/main/webapp/js/sanitizer/sanitizer.min.js
@@ -1,4 +1,5 @@
// NOTE: Modified to support data URIs for images, ie. data:image/*
+// Modified to allow "word-break: break-word" in styles. It is done by adding "break-word" which is at index 55 of J array J[55] to "cssLitGroup" of "word-break"
(function(){var c=void 0,n=!0,s=null,C=!1,J=["aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow,springgreen,steelblue,tan,teal,thistle,tomato,transparent,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","),
"all-scroll,col-resize,crosshair,default,e-resize,hand,help,move,n-resize,ne-resize,no-drop,not-allowed,nw-resize,pointer,progress,row-resize,s-resize,se-resize,sw-resize,text,vertical-text,w-resize,wait".split(","),"armenian,decimal,decimal-leading-zero,disc,georgian,lower-alpha,lower-greek,lower-latin,lower-roman,square,upper-alpha,upper-latin,upper-roman".split(","),"100,200,300,400,500,600,700,800,900,bold,bolder,lighter".split(","),"block-level,inline-level,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),
"condensed,expanded,extra-condensed,extra-expanded,narrower,semi-condensed,semi-expanded,ultra-condensed,ultra-expanded,wider".split(","),"inherit,inline,inline-block,inline-box,inline-flex,inline-grid,inline-list-item,inline-stack,inline-table,run-in".split(","),"behind,center-left,center-right,far-left,far-right,left-side,leftwards,right-side,rightwards".split(","),"large,larger,small,smaller,x-large,x-small,xx-large,xx-small".split(","),"dashed,dotted,double,groove,outset,ridge,solid".split(","),
@@ -23,7 +24,7 @@ position:{cssPropBits:0,cssLitGroup:[J[23]],cssFns:[]},quotes:{cssPropBits:8,css
cssLitGroup:[J[14],J[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[J[52],J[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[J[42],J[56],J[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[J[19],J[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[J[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[J[26],J[71]],cssFns:[]},"text-wrap":{cssPropBits:0,
cssLitGroup:[J[46],J[71],J[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[J[71]],cssFns:"matrix(),perspective(),rotate(),rotate3d(),rotatex(),rotatey(),rotatez(),scale(),scale3d(),scalex(),scaley(),scalez(),skew(),skewx(),skewy(),translate(),translate3d(),translatex(),translatey(),translatez()".split(",")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[J[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[J[10],J[48],J[50],J[71]],cssFns:["cubic-bezier()",
"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[J[48],J[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[J[30],J[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[J[12],J[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[J[27],J[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[J[17],J[69]],
-cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
+cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72],J[55]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
J[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[11],J[31],J[42],J[48],J[56],J[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[J[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[J[48],J[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[J[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},O;for(O in L)"string"===typeof L[O]&&Object.hasOwnProperty.call(L,O)&&(L[O]=L[L[O]]);"undefined"!==typeof window&&(window.cssSchema=L);var U,X;
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 83dfccf5..fd8b55c2 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -2,6 +2,7 @@ window.STENCIL_PATH=window.STENCIL_PATH||"https://www.draw.io/stencils";window.S
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
// NOTE: Modified to support data URIs for images, ie. data:image/*
+// Modified to allow "word-break: break-word" in styles. It is done by adding "break-word" which is at index 55 of J array J[55] to "cssLitGroup" of "word-break"
(function(){var c=void 0,n=!0,s=null,C=!1,J=["aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow,springgreen,steelblue,tan,teal,thistle,tomato,transparent,turquoise,violet,wheat,white,whitesmoke,yellow,yellowgreen".split(","),
"all-scroll,col-resize,crosshair,default,e-resize,hand,help,move,n-resize,ne-resize,no-drop,not-allowed,nw-resize,pointer,progress,row-resize,s-resize,se-resize,sw-resize,text,vertical-text,w-resize,wait".split(","),"armenian,decimal,decimal-leading-zero,disc,georgian,lower-alpha,lower-greek,lower-latin,lower-roman,square,upper-alpha,upper-latin,upper-roman".split(","),"100,200,300,400,500,600,700,800,900,bold,bolder,lighter".split(","),"block-level,inline-level,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),
"condensed,expanded,extra-condensed,extra-expanded,narrower,semi-condensed,semi-expanded,ultra-condensed,ultra-expanded,wider".split(","),"inherit,inline,inline-block,inline-box,inline-flex,inline-grid,inline-list-item,inline-stack,inline-table,run-in".split(","),"behind,center-left,center-right,far-left,far-right,left-side,leftwards,right-side,rightwards".split(","),"large,larger,small,smaller,x-large,x-small,xx-large,xx-small".split(","),"dashed,dotted,double,groove,outset,ridge,solid".split(","),
@@ -26,7 +27,7 @@ position:{cssPropBits:0,cssLitGroup:[J[23]],cssFns:[]},quotes:{cssPropBits:8,css
cssLitGroup:[J[14],J[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[J[52],J[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[J[42],J[56],J[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[J[19],J[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[J[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[J[26],J[71]],cssFns:[]},"text-wrap":{cssPropBits:0,
cssLitGroup:[J[46],J[71],J[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[J[71]],cssFns:"matrix(),perspective(),rotate(),rotate3d(),rotatex(),rotatey(),rotatez(),scale(),scale3d(),scalex(),scaley(),scalez(),skew(),skewx(),skewy(),translate(),translate3d(),translatex(),translatey(),translatez()".split(",")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[J[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[J[10],J[48],J[50],J[71]],cssFns:["cubic-bezier()",
"steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[J[48],J[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[J[30],J[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[J[12],J[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[J[27],J[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[J[17],J[69]],
-cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
+cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[J[22],J[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[J[32],J[72],J[55]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[J[36],J[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[J[0],J[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[31],J[42],J[48],
J[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[J[0],J[11],J[31],J[42],J[48],J[56],J[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[J[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[J[48],J[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[J[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius",
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},O;for(O in L)"string"===typeof L[O]&&Object.hasOwnProperty.call(L,O)&&(L[O]=L[L[O]]);"undefined"!==typeof window&&(window.cssSchema=L);var U,X;
@@ -664,7 +665,7 @@ mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){g||a.setShadow(!1);a.b
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};
mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),k=this.graph.model.getTerminal(g,!0)==a;if(!b||k)k=this.graph.view.getVisibleTerminal(g,!k),this.traverse(k,b,c,g,e)}};
-mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(cell)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
@@ -1955,9 +1956,9 @@ x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000
this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,
2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),
y=!1,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install();
-Editor=function(a,d,e,b,h){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=b||this.createGraph(d,e);this.editable=null!=h?h:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(a,b){var d=null!=b?b.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(d){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(a,d){var b=null!=d?d.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+
"/help.png";
Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
@@ -1976,26 +1977,26 @@ Editor.previousLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAA
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.popupsAllowed=!0;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;
Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};
Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,d){var e=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+
-(0<e.length?"&":"?")+"client=1"),null,!0)):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,d){var e=new Graph(null,d,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
+Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(d){"ready"==d.data&&d.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+
+(0<e.length?"&":"?")+"client=1"),null,!0)):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.isChromelessView()||"1"==urlParams.grid;this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=this.graph.defaultGraphBackground;
this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled=
-"0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var d=parseFloat(a.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(d=a.getAttribute("page"),this.graph.pageVisible=null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=
-this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var d=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight"));isNaN(d)||isNaN(e)||(this.graph.pageFormat=new mxRectangle(0,0,d,e));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
-Editor.prototype.setGraphXml=function(a){if(null!=a){var d=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),d.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var e=d.document.createElement("mxGraphModel");e.appendChild(a);d.decode(e,this.graph.getModel());
+"0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var b=parseFloat(a.getAttribute("pageScale"));!isNaN(b)&&0<b?this.graph.pageScale=b:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=null!=b?"0"!=b:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=
+this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var b=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight"));isNaN(b)||isNaN(e)||(this.graph.pageFormat=new mxRectangle(0,0,b,e));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
+Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var e=b.document.createElement("mxGraphModel");e.appendChild(a);b.decode(e,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,d=new mxUndoManager;this.undoListener=function(a,e){d.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,d){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,d){for(var e=a.getSelectionCellsForChanges(d.getProperty("edit").changes),h=a.getModel(),q=[],u=0;u<e.length;u++)(h.isVertex(e[u])||h.isEdge(e[u]))&&null!=a.view.getState(e[u])&&
-q.push(e[u]);a.setSelectionCells(q)};d.addListener(mxEvent.UNDO,e);d.addListener(mxEvent.REDO,e);return d};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()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],u=0;u<e.length;u++)(k.isVertex(e[u])||k.isEdge(e[u]))&&null!=a.view.getState(e[u])&&
+q.push(e[u]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,d,e,b,h,m,p,q,u){var c=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(c=80);e+=c;b+=c;var f=e,g=b,k=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),r=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),l=Math.max(1,Math.round((k-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(d.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);
-b=Math.min(b,k-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=k+"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 n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";r+=n.x;l+=n.y;h&&
-document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");h=this.getPosition(r,l,e,b);r=h.x;l=h.y;w.style.width=e+"px";w.style.height=b+"px";w.style.left=r+"px";w.style.top=l+"px";w.style.zIndex=this.zIndex;w.appendChild(d);document.body.appendChild(w);!q&&d.clientHeight>w.clientHeight-64&&(d.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",
-m.style.top=l+14+"px",m.style.left=r+e+38-c+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){k=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=k+"px";r=Math.max(1,Math.round((document.body.clientWidth-
-e-64)/2));l=Math.max(1,Math.round((k-b-a.footerHeight)/3));e=Math.min(f,document.body.scrollWidth-64);b=Math.min(g,k-64);var n=this.getPosition(r,l,e,b);r=n.x;l=n.y;w.style.left=r+"px";w.style.top=l+"px";w.style.width=e+"px";w.style.height=b+"px";!q&&d.clientHeight>w.clientHeight-64&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=l+14+"px",this.dialogImg.style.left=r+e+38-c+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=
+function Dialog(a,b,e,d,k,l,p,q,u){var c=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(c=80);e+=c;d+=c;var f=e,g=d,n=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),r=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),h=Math.max(1,Math.round((n-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);
+d=Math.min(d,n-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=n+"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 m=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=m.x+"px";this.bg.style.top=m.y+"px";r+=m.x;h+=m.y;k&&
+document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(r,h,e,d);r=k.x;h=k.y;w.style.width=e+"px";w.style.height=d+"px";w.style.left=r+"px";w.style.top=h+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",
+l.style.top=h+14+"px",l.style.left=r+e+38-c+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){n=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=n+"px";r=Math.max(1,Math.round((document.body.clientWidth-
+e-64)/2));h=Math.max(1,Math.round((n-d-a.footerHeight)/3));e=Math.min(f,document.body.scrollWidth-64);d=Math.min(g,n-64);var m=this.getPosition(r,h,e,d);r=m.x;h=m.y;w.style.left=r+"px";w.style.top=h+"px";w.style.width=e+"px";w.style.height=d+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=h+14+"px",this.dialogImg.style.left=r+e+38-c+"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";
@@ -2004,150 +2005,150 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
-"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,d){return new mxPoint(a,d)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),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,d){this.create(a,d)};
-PrintDialog.prototype.create=function(a){function d(a){var b=q.checked||c.checked,d=parseInt(g.value)/100;isNaN(d)&&(d=1,g.value="100%");var d=.75*d,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(b){var h=q.checked?1:parseInt(f.value);isNaN(h)||(r=mxUtils.getScaleForPageCount(h,e,k))}e.getGraphBounds();var y=h=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);r*=d;!b&&e.pageVisible?(d=e.getPageLayout(),h-=d.x*k.width,y-=d.y*k.height):
-b=!0;b=PrintDialog.createPrintPreview(e,r,k,0,h,y,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,b,h,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");b=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-h.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});b.appendChild(h);p.appendChild(b);b=b.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");h.appendChild(u);mxEvent.addListener(u,
-"click",function(a){c.checked=!c.checked;q.checked=!c.checked;mxEvent.consume(a)});b.appendChild(h);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(f);mxUtils.write(h," "+mxResources.get("pages")+" (max)");b.appendChild(h);p.appendChild(b);mxEvent.addListener(c,"change",
-function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!c.checked});b=b.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");b.appendChild(h);h=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";h.appendChild(g);b.appendChild(h);p.appendChild(b);b=document.createElement("tr");h=document.createElement("td");h.colSpan=2;
-h.style.paddingTop="20px";h.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&h.appendChild(u);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)});k.className="geBtn";h.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});k.className="geBtn gePrimaryBtn";h.appendChild(k);a.editor.cancelFirst||
-h.appendChild(u);b.appendChild(h);p.appendChild(b);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){if(null!=a.wnd){var d=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}};
-PrintDialog.createPrintPreview=function(a,d,e,b,h,m,p){d=new mxPrintPreview(a,d,e,b,h,m);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";d.backgroundColor=a;var q=d.writeHead;d.writeHead=function(a){q.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 d};
+"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),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 d=q.checked||c.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(d){var k=q.checked?1:parseInt(f.value);isNaN(k)||(r=mxUtils.getScaleForPageCount(k,e,n))}e.getGraphBounds();var y=k=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);r*=b;!d&&e.pageVisible?(b=e.getPageLayout(),k-=b.x*n.width,y-=b.y*n.height):
+d=!0;d=PrintDialog.createPrintPreview(e,r,n,0,k,y,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+k.appendChild(u);mxEvent.addListener(u,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.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;q.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change",
+function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.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 g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);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 n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
+k.appendChild(u);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};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,e,d,k,l,p){b=new mxPrintPreview(a,b,e,d,k,l);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 q=b.writeHead;b.writeHead=function(a){q.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 d(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==r?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",r.src),k.style.fontSize="11px",k.innerHTML=r.src.substring(0,42)+"...")}var b=a.editor.graph,h,m,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var q=document.createElement("tbody");h=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");h.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",b.pageFormat);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");
-mxUtils.write(m,mxResources.get("background")+":");h.appendChild(m);m=document.createElement("td");m.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 f=b.background;d();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;d()});mxEvent.consume(c)});
-m.appendChild(c);mxUtils.write(m,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=b.getGridSize();m.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?b.getGridSize():a)});h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
-":");h.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var r=b.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(c)});e();m.appendChild(k);h.appendChild(m);q.appendChild(h);h=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var l=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&m.appendChild(l);var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==g.value&&b.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,u.get());c.ignoreColor=b.background==f;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=r?r.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||b.model.execute(c)});n.className="geBtn gePrimaryBtn";m.appendChild(n);a.editor.cancelFirst||m.appendChild(l);h.appendChild(m);q.appendChild(h);p.appendChild(q);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,d,e,b){function h(a,c,b){if(b||g!=document.activeElement&&k!=document.activeElement){a=!1;for(c=0;c<l.length;c++)b=l[c],B?"custom"==b.key&&(q.value=b.key,B=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(q.value=b.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",f.style.display="none"):(g.value=e.width/100,k.value=e.height/100,m.setAttribute("checked","checked"),
-q.value="custom",u.style.display="none",f.style.display="")}}d="format-"+d;var m=document.createElement("input");m.setAttribute("name",d);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
-u.style.height="24px";m.style.marginRight="6px";u.appendChild(m);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));u.appendChild(d);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 f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
-g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";f.appendChild(k);mxUtils.write(f," in");u.style.display="none";f.style.display="none";for(var r={},l=PageSetupDialog.getFormats(),n=0;n<l.length;n++){var w=l[n];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var B=!1;h();a.appendChild(q);mxUtils.br(a);
-a.appendChild(u);a.appendChild(f);var y=e,t=function(a,c){var d=r[q.value];null!=d.format?(g.value=d.format.width/100,k.value=d.format.height/100,f.style.display="none",u.style.display=""):(u.style.display="none",f.style.display="");d=parseFloat(g.value);if(isNaN(d)||0>=d)g.value=e.width/100;d=parseFloat(k.value);if(isNaN(d)||0>=d)k.value=e.height/100;d=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(k.value)));"custom"!=q.value&&p.checked&&(d=new mxRectangle(0,0,
-d.height,d.width));c&&B||d.width==y.width&&d.height==y.height||(y=d,null!=b&&b(y))};mxEvent.addListener(d,"click",function(a){m.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",t);mxEvent.addListener(g,"click",t);mxEvent.addListener(k,"blur",t);mxEvent.addListener(k,"click",t);mxEvent.addListener(p,"change",t);mxEvent.addListener(m,"change",t);mxEvent.addListener(q,"change",function(a){B="custom"==q.value;
-t(a,!0)});t();return{set:function(a){e=a;h(null,null,!0)},get:function(){return y},widthInput:g,heightInput:k}};
+var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==r?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",r.src),n.style.fontSize="11px",n.innerHTML=r.src.substring(0,42)+"...")}var d=a.editor.graph,k,l,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
+mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var 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 f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)});
+l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=d.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
+":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var r=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,r,u.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=r?r.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
+c.ignoreColor&&c.ignoreImage||d.model.execute(c)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,d){if(d||g!=document.activeElement&&n!=document.activeElement){a=!1;for(c=0;c<h.length;c++)d=h[c],A?"custom"==d.key&&(q.value=d.key,A=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
+e.height==d.format.height?(q.value=d.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
+q.value="custom",u.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
+u.style.height="24px";l.style.marginRight="6px";u.appendChild(l);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 f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
+g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");u.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var w=h[m];r[w.key]=w;var v=document.createElement("option");v.setAttribute("value",w.key);mxUtils.write(v,w.title);q.appendChild(v)}var A=!1;k();a.appendChild(q);mxUtils.br(a);
+a.appendChild(u);a.appendChild(f);var y=e,t=function(a,c){var b=r[q.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",u.style.display=""):(u.style.display="none",f.style.display="");b=parseFloat(g.value);if(isNaN(b)||0>=b)g.value=e.width/100;b=parseFloat(n.value);if(isNaN(b)||0>=b)n.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));c&&A||b.width==y.width&&b.height==y.height||(y=b,null!=d&&d(y))};mxEvent.addListener(b,"click",function(a){l.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;t(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",t);mxEvent.addListener(g,"click",t);mxEvent.addListener(n,"blur",t);mxEvent.addListener(n,"click",t);mxEvent.addListener(p,"change",t);mxEvent.addListener(l,"change",t);mxEvent.addListener(q,"change",function(a){A="custom"==q.value;
+t(a,!0)});t();return{set:function(a){e=a;k(null,null,!0)},get:function(){return y},widthInput:g,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=
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var d=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(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
-mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",g=a.gridSize*this.scale*this.gridSteps):
-d="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-c,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,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=g,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=[],g=1;g<this.gridSteps;g++){var e=g*b;d.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+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 f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,g=this.view.translate,e=this.pageFormat,r=d*this.pageScale,l=this.view.getBackgroundPageBounds();b=l.width;c=l.height;var n=
-new mxRectangle(d*g.x,d*g.y,e.width*r,e.height*r),w=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(c/n.height)-1:0,v=a?Math.ceil(b/n.width)-1:0,h=l.x+b,y=l.y+c;null==this.horizontalPageBreaks&&0<w&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?w:v,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(b+1)*n.height)),
-new mxPoint(Math.round(h),Math.round(l.y+(b+1)*n.height))]:[new mxPoint(Math.round(l.x+(b+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(b+1)*n.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 d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){for(var f=0;f<b.length;f++)if(this.graph.getModel().isVertex(b[f])){var g=this.graph.getCellGeometry(b[f]);if(null!=g&&g.relative)return!1}return d.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.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,g=this.graph.pageScale,e=d.width*g,d=d.height*g,g=Math.floor(Math.min(0,b)/e),r=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-r)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,d){b.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,g,e){var f=h.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=m.apply(this,arguments),g=b.getParent(d);
-if(null==c||c!=d&&c!=g)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(g)&&b.isVertex(g)&&!this.graph.isContainer(g);)d=g,g=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(),g=d.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&d.isVertex(g)){c=!0;break}g=d.getParent(g)}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,d,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=d||document.body;var b=this.editor.graph;b.lightbox=e;b.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
-this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var h=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||b.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=h,this.menubarContainer.onmousedown=
-h,this.toolbarContainer.onselectstart=h,this.toolbarContainer.onmousedown=h,this.diagramContainer.onselectstart=h,this.diagramContainer.onmousedown=h,this.sidebarContainer.onselectstart=h,this.sidebarContainer.onmousedown=h,this.formatContainer.onselectstart=h,this.formatContainer.onmousedown=h,this.footerContainer.onselectstart=h,this.footerContainer.onmousedown=h,null!=this.tabContainer&&(this.tabContainer.onselectstart=h));!this.editor.chromeless||this.editor.editable?(d=function(a){var c=mxEvent.getSource(a);
-if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return h(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",d):this.diagramContainer.oncontextmenu=d):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(d=b.view.getDrawPane().ownerSVGElement,null!=d&&(d.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 m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return m||p.apply(this,arguments)};this.keydownHandler=
-mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=b.cellEditor.isStopEditingEvent;b.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,f=null,g=null,k=null,r=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,d=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),d.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==k)this.toolbar.createTextToolbar();else{for(var l=0;l<k.length;l++)this.toolbar.container.appendChild(k[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
-g}c=b.cellEditor.isContentEditing();f=a;g=e;k=d}}),l=this,n=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){n.apply(this,arguments);r();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!=l.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
-d.substring(0,d.length-1));l.toolbar.setFontName(d);l.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,c){w.apply(this,arguments);r()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
-if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(A){}var v=b.fireMouseEvent;b.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var B="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=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(d.push(c.style[g]),f.push(g));g=b.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],l=0;l<e.length;l++){var k=e[l],
-n=k.indexOf("=");0<=n&&(g=k.substring(0,n),k=k.substring(n+1),null!=a[g]&&"none"==k&&(d.push(k),f.push(g)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"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 t=
-["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],t,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(d=0;d<H[a].length;d++)B.push(H[a][d]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(B,y[a])&&B.push(y[a]);var G=function(a,c){var d=b.getModel();
-d.beginUpdate();try{if(c)for(var f=d.isEdge(l),g=f?b.currentEdgeStyle:b.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var k=g[f[e]];null!=k&&b.setCellStyles(f[e],k,a)}else for(k=0;k<a.length;k++){for(var l=a[k],n=d.getStyle(l),r=null!=n?n.split(";"):[],F=B.slice(),e=0;e<r.length;e++){var t=r[e],v=t.indexOf("=");if(0<=v){var w=t.substring(0,v),h=mxUtils.indexOf(F,w);0<=h&&F.splice(h,1);for(var q=0;q<H.length;q++){var z=H[q];if(0<=mxUtils.indexOf(z,w))for(var A=0;A<
-z.length;A++){var m=mxUtils.indexOf(F,z[A]);0<=m&&F.splice(m,1)}}}}for(var g=(f=d.isEdge(l))?b.currentEdgeStyle:b.currentVertexStyle,p=d.getStyle(l),e=0;e<F.length;e++){var w=F[e],J=g[w];null==J||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(y,w))||(p=mxUtils.setStyle(p,w,J))}d.setStyle(l,p)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,c){G(c.getProperty("cells"))});b.addListener("textInserted",function(a,c){G(c.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));G(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,g=!1;if(0<d.length)for(var e=0;e<d.length&&(f=b.getModel().isVertex(d[e])||f,!(g=b.getModel().isEdge(d[e])||g)||!f);e++);else g=f=!0;for(var d=c.getProperty("keys"),k=c.getProperty("values"),e=0;e<d.length;e++){var l=0<=mxUtils.indexOf(t,d[e]);if("strokeColor"!=d[e]||null!=k[e]&&"none"!=
-k[e])if(0<=mxUtils.indexOf(y,d[e]))g||0<=mxUtils.indexOf(z,d[e])?null==k[e]?delete b.currentEdgeStyle[d[e]]:b.currentEdgeStyle[d[e]]=k[e]:f&&0<=mxUtils.indexOf(B,d[e])&&(null==k[e]?delete b.currentVertexStyle[d[e]]:b.currentVertexStyle[d[e]]=k[e]);else if(0<=mxUtils.indexOf(B,d[e])){if(f||l)null==k[e]?delete b.currentVertexStyle[d[e]]:b.currentVertexStyle[d[e]]=k[e];if(g||l||0<=mxUtils.indexOf(z,d[e]))null==k[e]?delete b.currentEdgeStyle[d[e]]:b.currentEdgeStyle[d[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
-Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
-b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?
-"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
-this.getCssClassForMarker("end",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(b.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=b.currentVertexStyle.fontFamily||"Helvetica",c=String(b.currentVertexStyle.fontSize||"12"),d=b.getView().getState(b.getSelectionCell());null!=d&&(a=d.style[mxConstants.STYLE_FONTFAMILY]||a,c=d.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);
-this.toolbar.setFontSize(c)}),b.getSelectionModel().addListener(mxEvent.CHANGE,a),b.getModel().addListener(mxEvent.CHANGE,a));b.addListener(mxEvent.CELLS_ADDED,function(a,c){var d=c.getProperty("cells"),f=c.getProperty("parent");b.getModel().isLayer(f)&&!b.isCellVisible(f)&&null!=d&&0<d.length&&b.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
+mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,d=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",b="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(b=unescape(encodeURIComponent(this.createSvgGrid(c))),b=window.btoa?btoa(b):Base64.encode(b,!0),b="url(data:image/svg+xml;base64,"+b+")",g=a.gridSize*this.scale*this.gridSteps):
+b="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-c,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
+d,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=g,c.style.backgroundColor=d,c.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var c=this.gridSteps*d,b=[],g=1;g<this.gridSteps;g++){var e=g*d;b.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+b.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(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+d,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,d,c){var b=this.view.scale,g=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();d=h.width;c=h.height;var m=
+new mxRectangle(b*g.x,b*g.y,e.width*r,e.height*r),w=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(c/m.height)-1:0,v=a?Math.ceil(d/m.width)-1:0,k=h.x+d,y=h.y+c;null==this.horizontalPageBreaks&&0<w&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?w:v,d=0;d<=c;d++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(d+1)*m.height)),
+new mxPoint(Math.round(k),Math.round(h.y+(d+1)*m.height))]:[new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(d+1)*m.width),Math.round(y))];null!=a[d]?(a[d].points=b,a[d].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[d]=b)}for(d=c;d<a.length;d++)a[d].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 f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(d,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(),d=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,g=this.graph.pageScale,e=b.width*g,b=b.height*g,g=Math.floor(Math.min(0,d)/e),r=Math.floor(Math.min(0,
+c)/b);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,d+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/b)-r)*b)};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,d,c,b,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var d=this.graph.getModel(),c=d.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),g=d.getParent(b);
+if(null==c||c!=b&&c!=g)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(g)&&d.isVertex(g)&&!this.graph.isContainer(g);)b=g,g=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,d){var c=p.apply(this,arguments);if(!c)for(var b=this.graph.getModel(),g=b.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&b.isVertex(g)){c=!0;break}g=b.getParent(g)}return c};mxGraphHandler.prototype.selectDelayed=
+function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var d=a.getCell();null==d&&(d=this.cell);var c=this.graph.view.getState(d);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),b=c.getParent(d);!this.graph.isCellSelected(b)&&c.isVertex(b);)d=b,b=c.getParent(d);this.graph.selectCellForEvent(d,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var d=this.graph.getModel(),c=d.getParent(a);d.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
+(a=c),c=d.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
+this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();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 l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return l||p.apply(this,arguments)};this.keydownHandler=
+mxUtils.bind(this,function(a){32==a.which?(l=!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()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=
+function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var 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,f=null,g=null,n=null,r=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
+g}c=d.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,m=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){m.apply(this,arguments);r();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!=h.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+b.substring(0,b.length-1));h.toolbar.setFontName(b);h.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 w=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){w.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
+if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(B){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var A="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),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=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],h=0;h<e.length;h++){var n=e[h],
+m=n.indexOf("=");0<=m&&(g=n.substring(0,m),n=n.substring(m+1),null!=a[g]&&"none"==n&&(b.push(n),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"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 t=
+["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],t,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)A.push(H[a][b]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(A,y[a])&&A.push(y[a]);var G=function(a,c){var b=d.getModel();
+b.beginUpdate();try{if(c)for(var f=b.isEdge(n),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&d.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var n=a[h],m=b.getStyle(n),r=null!=m?m.split(";"):[],F=A.slice(),e=0;e<r.length;e++){var t=r[e],v=t.indexOf("=");if(0<=v){var w=t.substring(0,v),k=mxUtils.indexOf(F,w);0<=k&&F.splice(k,1);for(var q=0;q<H.length;q++){var z=H[q];if(0<=mxUtils.indexOf(z,w))for(var B=0;B<
+z.length;B++){var l=mxUtils.indexOf(F,z[B]);0<=l&&F.splice(l,1)}}}}for(var g=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,p=b.getStyle(n),e=0;e<F.length;e++){var w=F[e],J=g[w];null==J||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(y,w))||(p=mxUtils.setStyle(p,w,J))}b.setStyle(n,p)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){G(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){G(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,c){var d=[c.getProperty("cell")];c.getProperty("terminalInserted")&&d.push(c.getProperty("terminal"));G(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),h=c.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(t,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
+h[e])if(0<=mxUtils.indexOf(y,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(A,b[e])&&(null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(A,b[e])){if(f||n)null==h[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=h[e];if(g||n||0<=mxUtils.indexOf(z,b[e]))null==h[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
+d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
+"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
+this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),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"),f=c.getProperty("parent");d.getModel().isLayer(f)&&!d.isCellVisible(f)&&null!=b&&0<b.length&&d.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,
-"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));b.addListener("gridSizeChanged",mxUtils.bind(this,function(){b.isGridEnabled()&&b.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};
+"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;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
-var d=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){d.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var d=this.editor.graph;9==a.which&&d.isEnabled()&&!mxEvent.isAltDown(a)&&(d.isEditing()?d.stopEditing(!1):d.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
-EditorUi.prototype.onKeyPress=function(a){var d=this.editor.graph;!this.isImmediateEditingEvent(a)||d.isEditing()||d.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,d.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(d.textarea),a.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(a)))};
+var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
+EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.getCssClassForMarker=function(a,d,e,b){return"flexArrow"==d?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==b?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==b?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+
-a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==b?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==b?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==b?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==b?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==b?"geSprite geSprite-"+a+"thindiamond":
-"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==b?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==b||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+
+EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+
+a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":
+"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+
a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,d=this.actions.get("paste"),e=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(d.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,d=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(d){d.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var b=mxClipboard.paste;mxClipboard.paste=function(d){var e=null;d.cellEditor.isContentEditing()?document.execCommand("paste",
-!1,null):e=b.apply(this,arguments);a.updatePasteActionStates();return e};var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,b){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
+EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
+!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.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,d){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var d=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(c,d,b,f){if(null!=a.container){b=null!=b?b:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),k=a.view.translate,l=a.view.scale,n=mxRectangle.fromRectangle(g);
-n.x=n.x/l-k.x;n.y=n.y/l-k.y;n.width/=l;n.height/=l;var k=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var y=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(d||1,y/n.width)):l;d=(y-c*n.width)/2/c;var F=0==this.lightboxVerticalDivider?0:(t-c*n.height)/this.lightboxVerticalDivider/c;e&&(d=Math.max(d,0),F=Math.max(F,0));if(e||g.width<y||g.height<t)a.view.scaleAndTranslate(c,
-Math.floor(d-n.x),Math.floor(F-n.y)),a.container.scrollTop=k*c/l,a.container.scrollLeft=r*c/l;else if(0!=b||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+b/l),Math.floor(g.y+f/l))}});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",
+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,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),h=a.view.translate,n=a.view.scale,m=mxRectangle.fromRectangle(g);
+m.x=m.x/n-h.x;m.y=m.y/n-h.y;m.width/=n;m.height/=n;var h=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var y=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,y/m.width)):n;b=(y-c*m.width)/2/c;var F=0==this.lightboxVerticalDivider?0:(t-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),F=Math.max(F,0));if(e||g.width<y||g.height<t)a.view.scaleAndTranslate(c,
+Math.floor(b-m.x),Math.floor(F-m.y)),a.container.scrollTop=h*c/n,a.container.scrollLeft=r*c/n;else if(0!=d||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/n),Math.floor(g.y+f/n))}});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 h=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",h);h();var m=0,h=mxUtils.bind(this,function(a,c,d){m++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=d&&b.setAttribute("title",d);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);b.appendChild(a);this.chromelessToolbar.appendChild(b);
-return b}),p=h(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var u=h(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
+"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 l=0,k=mxUtils.bind(this,function(a,c,b){l++;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}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.fontSize="14px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);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&&(q.innerHTML="",mxUtils.write(q,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 f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",q.style.display="inline-block"):
-(u.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);h(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");h(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");h(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 g=null,k=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;k=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";k=null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var n=h(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 d=n.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=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){n.style.display=1<w.getChildCount(w.root)?
-"":"none"})}this.addChromelessToolbarItems(h);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||h(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(f=0;f<this.lightboxToolbarActions.length;f++){var v=
-this.lightboxToolbarActions[f];h(v.fn,v.icon,v.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||h(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)||l(30),r())}));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)?r():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():l(100);mxEvent.consume(a)}));
-mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||l(30)}));var B=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<B&&Math.abs(this.scrollTop-
-a.container.scrollTop)<B&&Math.abs(this.startX-d.getGraphX())<B&&Math.abs(this.startY-d.getGraphY())<B&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():l(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 t=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),d=this.getPagePadding(),b=this.getPageSize(),f=Math.ceil(2*d.x+c.width*b.width),g=Math.ceil(2*d.y+c.height*b.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=d.x-c.x*b.width;d=d.y-c.y*b.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
-d?t.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(f,d),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((d-b)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+(u.style.display="none",p.style.display="none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);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 g=null,n=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";n=null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var m=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=m.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")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){m.style.display=1<w.getChildCount(w.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(f=0;f<this.lightboxToolbarActions.length;f++){var v=
+this.lightboxToolbarActions[f];k(v.fn,v.icon,v.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)||h(30),r())}));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)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));
+mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var A=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)<A&&Math.abs(this.scrollTop-
+a.container.scrollTop)<A&&Math.abs(this.startX-b.getGraphX())<A&&Math.abs(this.startY-b.getGraphY())<A&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(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 t=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==
+b?t.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(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=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),b=0,f=0;null!=z&&(b=a.container.offsetWidth/2-z.x+c.x,f=a.container.offsetHeight/2-z.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=d&&e.chromelessResize(!1,null,b*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==b&&0==f||(a.container.scrollLeft-=b*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,d){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var b=mxEvent.getSource(c);null!=b;){if(b==a.container){z=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(d);mxEvent.consume(c);break}b=b.parentNode}}))};
+this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,f=0;null!=z&&(d=a.container.offsetWidth/2-z.x+c.x,f=a.container.offsetHeight/2-z.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
+1),a.container.scrollTop-=f*(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){z=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"))};
-EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,e=60;null!=d&&(e=parseInt(d));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
+EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,d){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(b){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+b.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,d){this.currentMenuElt=d;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};
EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};
-EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var d=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
-EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var d=0<a.indexOf("?")?1:0,e;for(e in urlParams)a=0==d?a+"?":a+"&",a+=e+"="+urlParams[e],d++;return a};
-EditorUi.prototype.setScrollbars=function(a){var d=this.editor.graph,e=d.container.style.overflow;d.scrollbars=a;this.editor.updateGraphComponents();e!=d.container.style.overflow&&("hidden"==d.container.style.overflow?(a=d.view.translate,d.view.setTranslate(a.x-d.container.scrollLeft/d.view.scale,a.y-d.container.scrollTop/d.view.scale),d.container.scrollLeft=0,d.container.scrollTop=0,d.minimumGraphSize=null,d.sizeDidChange()):(a=d.view.translate.x,e=d.view.translate.y,d.view.translate.x=0,d.view.translate.y=
-0,d.sizeDidChange(),d.container.scrollLeft-=Math.round(a*d.view.scale),d.container.scrollTop-=Math.round(e*d.view.scale)));this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var d=a.getPagePadding();a.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(d.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
-1;d=a.getGraphBounds();0<d.width&&0<d.height&&(d.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(d.x+d.width-a.container.clientWidth,d.x-10)),d.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(d.y+d.height-a.container.clientHeight,d.y-10)))}else{var d=a.getGraphBounds(),e=Math.max(d.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(a.container.clientHeight-Math.max(d.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(d=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-d.width)/2)-d.x),Math.floor(Math.max(0,(a.container.clientHeight-d.height)/2)-d.y))):(d=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-d.width)/2)-d.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
-d.height)/4))-d.y)))};
-EditorUi.prototype.setPageVisible=function(a){var d=this.editor.graph,e=mxUtils.hasScrollbars(d.container),b=0,h=0;e&&(b=d.view.translate.x*d.view.scale-d.container.scrollLeft,h=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=a;d.pageBreaksVisible=a;d.preferPageSize=a;d.view.validateBackground();e&&(a=d.getSelectionCells(),d.clearSelection(),d.setSelectionCells(a));d.sizeDidChange();e&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-b,d.container.scrollTop=d.view.translate.y*
-d.view.scale-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,d,e,b){this.ui=a;this.previousColor=this.color=d;this.previousImage=this.image=e;this.previousFormat=this.format=b;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}this.ignoreImage||(this.image=this.previousImage,d=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=d);null!=this.previousFormat&&(this.format=this.previousFormat,d=a.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),
-this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);return b};mxCodecRegistry.register(a)})();
+EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
+EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,e;for(e in urlParams)a=0==b?a+"?":a+"&",a+=e+"="+urlParams[e],b++;return a};
+EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,e=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();e!=b.container.style.overflow&&("hidden"==b.container.style.overflow?(a=b.view.translate,b.view.setTranslate(a.x-b.container.scrollLeft/b.view.scale,a.y-b.container.scrollTop/b.view.scale),b.container.scrollLeft=0,b.container.scrollTop=0,b.minimumGraphSize=null,b.sizeDidChange()):(a=b.view.translate.x,e=b.view.translate.y,b.view.translate.x=0,b.view.translate.y=
+0,b.sizeDidChange(),b.container.scrollLeft-=Math.round(a*b.view.scale),b.container.scrollTop-=Math.round(e*b.view.scale)));this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
+1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
+b.height)/4))-b.y)))};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,k=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
+b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),
+this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};
EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),d=this.actions.get("redo"),e=this.editor.undoManager,b=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,b);e.addListener(mxEvent.UNDO,b);e.addListener(mxEvent.REDO,b);e.addListener(mxEvent.CLEAR,b);var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);b()};var m=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,d){m.apply(this,arguments);b()};b()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,d=!a.isSelectionEmpty(),e=!1,b=!1,h=a.getSelectionCells();if(null!=h)for(var m=0;m<h.length;m++){var p=h[m];a.getModel().isEdge(p)&&(b=!0);a.getModel().isVertex(p)&&(e=!0);if(b&&e)break}h="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
-0;m<h.length;m++)this.actions.get(h[m]).setEnabled(d);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(b);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);b=e&&1==
-a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||b&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||b&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(b&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(d||null!=a.view.currentRoot);
-this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));d=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);
-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);d=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(d);this.menus.get("insert").setEnabled(d);this.menus.get("direction").setEnabled(d&&e);this.menus.get("align").setEnabled(d&&
-e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(d&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(d);this.actions.get("selectEdges").setEnabled(d);this.actions.get("selectAll").setEnabled(d);this.actions.get("selectNone").setEnabled(d);this.updatePasteActionStates()};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var d=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,b=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,b=d?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var h=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(h=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-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 q=0;if(null!=this.sidebarFooterContainer){var u=
-this.footerHeight+h,q=Math.max(0,Math.min(b-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"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?m+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+h+"px";this.hsplit.style.left=m+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);d?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-d=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=d-q+"px",this.formatContainer.style.height=d+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,b-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+h+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=h+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+h+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+h+"px",this.formatContainer.style.bottom=
-this.footerHeight+h+"px",this.diagramContainer.style.bottom=this.footerHeight+h+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var p=k[l];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(e=!0);if(d&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
+0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==
+a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);
+this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
+this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&
+e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),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 q=0;if(null!=this.sidebarFooterContainer){var u=
+this.footerHeight+k,q=Math.max(0,Math.min(d-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"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?l+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=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
+b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-u)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=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",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=u+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=
+this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2155,251 +2156,252 @@ EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
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 d=document.createElement("div");d.className=a;return d};
-EditorUi.prototype.addSplitHandler=function(a,d,e,b){function h(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,q+(d?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(u=!0,c=null)}}function m(a){h(a);p=q=null}var p=null,q=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(d?a.style.left:a.style.bottom);d||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var d=null!=c?c-e:0;c=f();b(d);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,h,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,m)})};
-EditorUi.prototype.showDialog=function(a,d,e,b,h,m,p,q){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,d,e,b,h,m,p,q);this.dialogs.push(this.dialog)};
+EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(u=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
+EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p,q){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p,q);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),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,d){var e=this.editor.graph,b=e.cellEditor.saveSelection(),h=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(b);d(a)},function(){e.cellEditor.restoreSelection(b)});this.showDialog(m.container,230,h,!0,!1);m.init()};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),l=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(l.container,230,k,!0,!1);l.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var d=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var b=a.lastIndexOf("&lt;/mxGraphModel&gt;");b>e&&(d=a.substring(e,b+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(h){}return d};
-EditorUi.prototype.extractGraphModelFromEvent=function(a){var d=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
-(d=e);return d};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(d))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,d,e){var b=this.editor.graph;if(b.isEnabled()){b.getModel().beginUpdate();try{a()}catch(h){throw h;}finally{this.allowAnimation&&d&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(b),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){b.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(b.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,d,e,b){b=this.editor.graph.cellEditor;var h=b.saveSelection(),m=mxUtils.prompt(a,d);b.restoreSelection(h);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){e(m,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,d,e){a=new LinkDialog(this,a,d,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
+EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
+(b=e);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.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 d=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=d&&0<d.length){var e=new Image;e.onload=function(){a(new mxImage(d,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=d}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,d,e){mxUtils.confirm(a)?null!=d&&d():null!=e&&e()};
-EditorUi.prototype.createOutline=function(a){var d=new mxOutline(this.editor.graph);d.border=20;mxEvent.addListener(window,"resize",function(){d.update()});this.addListener("pageFormatChanged",function(){d.update()});return d};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function d(a,c,d){p.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var f=b.getSelectionCells(),g=0;g<f.length;g++)if(b.getModel().isVertex(f[g])&&b.isCellResizable(f[g])){var e=b.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),b.getModel().setGeometry(f[g],e))}}finally{b.getModel().endUpdate()}}else f=
-b.getSelectionCell(),g=b.model.getParent(f),e=null,1==b.getSelectionCount()&&b.model.isVertex(f)&&null!=b.layoutManager&&!b.isCellLocked(f)&&(e=b.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?b.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||b.model.add(g,f,Math.min(b.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-p.length){b.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var e=this,b=this.editor.graph,h=new mxKeyHandler(b),m=h.isEventIgnored;h.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)&&m.apply(this,arguments)};h.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};h.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=h.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&
-mxEvent.isAltDown(a)){var f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=u[a.keyCode]&&!b.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=b.connectVertex(b.getSelectionCell(),u[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
-b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?function(){d(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){d(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return c.apply(this,arguments)};h.bindAction=mxUtils.bind(this,function(a,c,d,b){var f=this.actions.get(d);
-null!=f&&(d=function(){f.isEnabled()&&f.funct()},c?b?h.bindControlShiftKey(a,d):h.bindControlKey(a,d):b?h.bindShiftKey(a,d):h.bindKey(a,d))});var f=h.escape;h.escape=function(a){f.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){b.exitGroup()});h.bindControlShiftKey(35,function(){b.enterGroup()});h.bindKey(36,function(){b.home()});h.bindKey(35,function(){b.refresh()});h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(80,!0,"print");h.bindAction(79,
-!0,"outline",!0);h.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)h.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),h.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),h.bindControlKey(13,function(){b.isEnabled()&&b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),!1))}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(46,!1,"delete"),h.bindAction(46,!0,"deleteAll"),h.bindAction(72,!0,"resetView"),h.bindAction(72,
-!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,!0,"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,"toBack",!0),h.bindAction(70,!0,
-"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,!0,"lockUnlock"),h.bindAction(76,!0,"layers",!0),h.bindAction(80,!0,"formatPanel",!0),h.bindAction(85,!0,"underline"),h.bindAction(85,!0,
-"ungroup",!0),h.bindAction(190,!0,"superscript"),h.bindAction(188,!0,"subscript"),h.bindKey(13,function(){b.isEnabled()&&b.startEditingAtCell()}),h.bindKey(113,function(){b.isEnabled()&&b.startEditingAtCell()});mxClient.IS_WIN?h.bindAction(89,!0,"redo"):h.bindAction(90,!0,"redo",!0);return h};
+EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)};
+EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
+EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f=
+d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
+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 e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=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)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=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 f=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=f)return f.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!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b);
+null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var f=k.escape;k.escape=function(a){f.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,
+!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,
+!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,
+"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,
+"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
-"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<d.length;a++)null!=d[a]&&null!=d[a].parentNode&&d[a].parentNode.removeChild(d[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
-(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-Graph=function(a,d,e,b,h){mxGraph.call(this,a,d,e,b);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;d=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=a.indexOf("/",d+2),0<d&&(this.domainUrl=a.substring(0,d)),d=a.lastIndexOf("/"),0<d&&(this.domainPathUrl=a.substring(0,d+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 m=null,p=null,q=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event");if(!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())){var f=b.getState();null!=f&&this.model.isEdge(f.cell)&&(m=new mxPoint(b.getGraphX(),b.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=b,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,b.getGraphX(),b.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(b))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,f;for(f in b)if(null!=b[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(d.getEvent())&&
-!mxEvent.isShiftDown(d.getEvent())&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=m&&null!=q&&null!=p){if(b=q,Math.abs(m.x-d.getGraphX())>f||Math.abs(m.y-d.getGraphY())>f){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var g=this.selectionCellsHandler.getHandler(b.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),k=this.view.getEdgeStyle(b);f=k==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==g.bends.length-1||null!=b.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=b.absolutePoints,null!=f&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(m.x,m.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=g.bends.length-1:null!=k&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(d.getGraphX(),d.getGraphX(),e),u=m=p=q=null,c=!1,d.consume(),this.graphHandler.reset()}}}else if(b=d.getState(),null!=b&&this.model.isEdge(b.cell)){g=null;f=b.absolutePoints;if(null!=f)if(e=new mxRectangle(d.getGraphX(),
-d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,d.getGraphX(),d.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)k=this.view.getEdgeStyle(b),g="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(k=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),
-k<f.length-1&&0<=k&&(g=0==Math.round(f[k].x-f[k+1].x)?"col-resize":"row-resize"));null!=g&&b.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){u=m=p=q=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==b&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],d=this.graph.pageFormat,b=this.graph.pageScale,g=d.width*b,d=d.height*b,b=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),l=0;l<k.width;l++)c.push(new mxRectangle(((k.x+l)*g+b.x)*e,(k.y*d+b.y)*e,g*e,d*e));for(l=0;l<k.height;l++)c.push(new mxRectangle((k.x*g+b.x)*e,((k.y+l)*d+b.y)*e,g*e,d*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),d=[],b=0;b<c.length;b++){var f=this.graph.view.getState(c[b]),f=null!=f?f.style:this.graph.getCellStyle(c[b]);
-"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[b]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&d.push(f)):d.push(c[b])}return d};this.connectionHandler.createTargetVertex=function(a,c){var d=this.graph.view.getState(c),d=null!=d?d.style:this.graph.getCellStyle(c);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(c),this.graph.model.isVertex(d)&&(c=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);
-this.getRubberband=function(){return g};var k=(new Date).getTime(),r=0,l=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;l.apply(this,arguments);a!=this.currentState?(k=(new Date).getTime(),r=0):r=(new Date).getTime()-k};var n=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&n.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var B=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(B=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=B)}));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,
+Graph=function(a,b,e,d,k){mxGraph.call(this,a,b,e,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 l=null,p=null,q=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 f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?u=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(u=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(d);f=h==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(e=u);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==g.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=u,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),u=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){g=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)h=this.view.getEdgeStyle(d),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(h=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
+h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){u=l=p=q=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 f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,g=b.width*d,b=b.height*d,d=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)c.push(new mxRectangle(((h.x+n)*g+d.x)*e,(h.y*b+d.y)*e,g*e,b*e));for(n=0;n<h.height;n++)c.push(new mxRectangle((h.x*g+d.x)*e,((h.y+n)*b+d.y)*e,g*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var f=this.graph.view.getState(c[d]),f=null!=f?f.style:this.graph.getCellStyle(c[d]);
+"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[d]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&b.push(f)):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 g=new mxRubberband(this);
+this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),r=0):r=(new Date).getTime()-n};var m=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&m.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var A=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(A=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=A)}));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 t=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 t.apply(this,arguments)};this.selectRegion=function(a,c){var d=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(d,c);return d};this.getAllCells=function(a,c,d,b,f,g){g=null!=g?g:[];if(0<d||0<b){var e=this.getModel(),k=a+d,l=c+b;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var n=e.getChildCount(f),F=0;F<n;F++){var r=e.getChildAt(f,F),t=this.view.getState(r);if(null!=
-t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var y=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(t=mxUtils.getBoundingBox(t,y));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=l&&t.y>=c&&t.x+t.width<=k&&g.push(r);this.getAllCells(a,c,d,b,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,d){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var d=c.getProperty("event").getState();H=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var d=
-c.getProperty("event"),b=c.getProperty("cell");null==b?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),g.start(d.x,d.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);H=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return t.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,f,g){g=null!=g?g:[];if(0<b||0<d){var e=this.getModel(),h=a+b,n=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),F=0;F<m;F++){var r=e.getChildAt(f,F),t=this.view.getState(r);if(null!=
+t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var y=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(t=mxUtils.getBoundingBox(t,y));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=c&&t.x+t.width<=h&&g.push(r);this.getAllCells(a,c,b,d,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();H=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)),g.start(b.x,b.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);H=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var G=this.updateMouseEvent;this.updateMouseEvent=function(a){a=G.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,d,e){e=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="'+d+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,d)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
+Graph.createSvgImage=function(a,b,e){e=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">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!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.defaultGraphBackground="#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,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,h=!0,m=null,p=mxUtils.bind(this,function(a){h=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){h=h&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<d&&Math.abs(m.y-mxEvent.getClientY(a))<d}),u=mxUtils.bind(this,function(c){if(h)for(var d=mxEvent.getSource(c);null!=
-d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,c);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,d,e,p,q,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-d,e,p,q,u){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var b=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,d,b,p,q,u);if(null!=g)return g;if(this.isCellVisible(b)&&(q&&this.model.isEdge(b)||p&&this.model.isVertex(b))&&(g=this.view.getState(b),null!=g&&(null==u||!u(g,a,d))&&this.intersects(g,a,d)))return b}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 d=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+d.x)*e,(a.y+d.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
-function(d){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
-if(null!=a)if(a=a.parentNode,this.useCssTransforms){var d=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(d!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var e=a.style.display;a.style.display="none";a.getBBox();a.style.display=e}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var d=mxGraphView.prototype.validateBackgroundPage;
-mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);d.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,d,m){var b=this.useCssTransforms,h=this.view.scale,u=this.view.translate;b&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
-!1);e.apply(this,arguments);b&&(this.view.scale=h,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,d,e){d=d.getAttribute("href");if(null!=d&&!this.isCustomLink(d)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(d)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(d),a);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(a,d,e){var b=window;"_self"==d&&window!=window.top?window.location.href=a:a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top?(a=a.split("#")[1],window.location.hash=="#"+a&&(window.location.hash=""),window.location.hash=a):(b=window.open(a,d),null==b||e||(b.opener=null));return b};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,u);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,p,q,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,e,p,q,u){p=null!=p?p:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),g=this.getScaledCellAt(a,b,d,p,q,u);if(null!=g)return g;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(g=this.view.getState(d),null!=g&&(null==u||!u(g,a,b))&&this.intersects(g,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,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
+function(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 e=a.style.display;a.style.display="none";a.getBBox();a.style.display=e}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
+mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,k=this.view.scale,u=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
+!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
+Graph.prototype.openLink=function(a,b,e){var d=window;"_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||e||(d.opener=null));return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var d=this.graph.view.getState(a);a=null!=d?d.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),d.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(a,
-"resizeLast","0"),d.spacing=a.stackSpacing||d.spacing,d.border=a.stackBorder||d.border,d.marginLeft=a.marginLeft||0,d.marginRight=a.marginRight||0,d.marginTop=a.marginTop||0,d.marginBottom=a.marginBottom||0,d.fill=!0,d):"treeLayout"==a.childLayout?(d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),d.groupPadding=mxUtils.getValue(a,"parentPadding",20),d.levelDistance=mxUtils.getValue(a,"treeLevelDistance",
-30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d):"flowLayout"==a.childLayout?(d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),d.parentBorder=mxUtils.getValue(a,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",
-mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(d.x/this.view.scale-this.view.translate.x),b=Math.ceil(d.y/this.view.scale-this.view.translate.y),h=Math.floor(e/a.width),m=Math.floor(b/a.height);return new mxRectangle(h,m,Math.ceil((e+Math.floor(d.width/this.view.scale))/a.width)-h,Math.ceil((b+Math.floor(d.height/this.view.scale))/a.height)-m)};
-Graph.prototype.sanitizeHtml=function(a,d){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,d;for(d in this.model.cells){var e=this.model.cells[d];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a);a=null!=b?b.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,
+"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",
+30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",
+mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)};
+Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)&&!mxClient.IS_MAC};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
-Graph.prototype.isSplitTarget=function(a,d,e){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(d=this.replacePlaceholders(a,d));return d};
-Graph.prototype.isLabelMovable=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
-Graph.prototype.getGlobalVariable=function(a){var d=null;"date"==a?d=(new Date).toLocaleDateString():"time"==a?d=(new Date).toLocaleTimeString():"timestamp"==a?d=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),d=this.formatDate(new Date,a));return d};
-Graph.prototype.formatDate=function(a,d,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\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)||(d=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");d=String(b.masks[d]||d||b.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),k=a[q+"Hours"](),r=a[q+"Minutes"](),l=a[q+"Seconds"](),q=a[q+"Milliseconds"](),n=e?0:a.getTimezoneOffset(),w={d:u,dd:p(u),ddd:b.i18n.dayNames[c],dddd:b.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:b.i18n.monthNames[f],mmmm:b.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:k%12||12,hh:p(k%12||12),H:k,HH:p(k),M:r,MM:p(r),s:l,ss:p(l),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(m,""),o:(0<n?"-":"+")+p(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
+Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};
+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,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,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),e=!0);var q=e?"getUTC":"get",u=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),w={d:u,dd:p(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:r,MM:p(r),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+p(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%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 w?w[a]:a.slice(1,
a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var d=this.getModel(),e=d.getChildCount(d.root),b=0;b<e;b++)mxUtils.bind(this,function(b){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var h=document.createElement("input");h.style.display="inline-block";h.setAttribute("type","checkbox");d.isVisible(b)&&(h.setAttribute("checked","checked"),
-h.defaultChecked=!0);e.appendChild(h);var q=this.convertValueToString(b)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(h,"click",function(){null!=h.getAttribute("checked")?h.removeAttribute("checked"):h.setAttribute("checked","checked");d.setVisible(b,h.checked)})})(d.getChildAt(d.root,b));return a};
-Graph.prototype.replacePlaceholders=function(a,d){var e=[];if(null!=d){for(var b=0;match=this.placeholderPattern.exec(d);){var h=match[0];if(2<h.length&&"%label%"!=h&&"%tooltip%"!=h){var m=null;if(match.index>b&&"%"==d.charAt(match.index-1))m=h.substring(1);else{var p=h.substring(1,h.length-1);if(0>p.indexOf("{"))for(var q=a;null==m&&null!=q;)null!=q.value&&"object"==typeof q.value&&(m=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==m&&(m=this.getGlobalVariable(p))}e.push(d.substring(b,
-match.index)+(null!=m?m:h));b=match.index+h.length}}e.push(d.substring(b))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,d,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(d)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,d,e,b,h,m){m=m?m:!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);d==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):d==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=d==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,u=this.view.translate,c=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(b)&&!h?null:this.getCellAt(c+p.x*q,u+p.y*q);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),q=this.view.getState(m),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(m=
-null));if(h=!mxEvent.isShiftDown(b)||h)d==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=d==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];this.model.beginUpdate();try{q=m;if(null==q&&h){for(var c=a,f=this.getCellGeometry(a);null!=
-f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),k=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(k,"part",!1)){var r=this.model.getParent(c);this.model.isVertex(r)&&(c=r)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var l=mxEvent.isControlDown(b)&&h||null==m&&null!=f&&f.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var n=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=l.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==l.parent&&(n=b.parent.getIndex(b),this.model.add(b.parent,l,n))}null==m&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&d==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent,
-q,n));null!=l&&e.push(l);null==m&&null!=q&&e.push(q);null==q&&null!=l&&l.geometry.setTerminalPoint(p,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}return e};
-Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),d=[],e,b;for(b in this.model.cells)if(e=this.model.cells[b],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&d.push(e);return d.join(" ")};
-Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var d=a.getAttribute("placeholder"),e=a,b=null;null==b&&null!=e;)null!=e.value&&"object"==typeof e.value&&(b=e.hasAttribute(d)?null!=e.getAttribute(d)?e.getAttribute(d):"":null),e=this.model.getParent(e);return b||""}return a.value.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
+k.defaultChecked=!0);e.appendChild(k);var q=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(d,
+match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
+Graph.prototype.connectVertex=function(a,b,e,d,k,l){l=l?l:!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-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
+var q=this.view.scale,u=this.view.translate,c=u.x*q,u=u.y*q;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,u+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
+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==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var c=a,f=this.getCellGeometry(a);null!=
+f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),n=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(n,"part",!1)){var r=this.model.getParent(c);this.model.isVertex(r)&&(c=r)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(d)&&k||null==l&&null!=f&&f.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var m=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=h.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==h.parent&&(m=d.parent.getIndex(d),this.model.add(d.parent,h,m))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,
+q,m));null!=h&&e.push(h);null==l&&null!=q&&e.push(q);null==q&&null!=h&&h.geometry.setTerminalPoint(p,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
+Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return 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 d=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return d};
-Graph.prototype.updateAlternateBounds=function(a,d,e){if(null!=a&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var b=this.layoutManager.getLayout(this.model.getParent(a));null!=b&&b.constructor==mxStackLayout&&(b.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,d,e,b,h){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),q=this.getCellGeometry(e[m]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=u){var f=this.model.getParent(e[m]),g=this.layoutManager.getLayout(f);
-null==g?null!=h&&this.isMoveCellsEvent(h)&&this.moveSiblings(p,f,u,c):null!=h&&mxEvent.isAltDown(h)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,d,e,b){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,d,!0,!0);for(d=0;d<h.length;d++)if(h[d]!=a.cell){var m=this.view.getState(h[d]),p=this.getCellGeometry(h[d]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(b*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(h[d],p))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,d,e,b){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var h=d.horizontal;null!=a&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==h&&!d.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),d.horizontal?m.width+=e+Math.min(0,p.width/this.view.scale-m.width):m.height+=b+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
-m));a=this.model.getParent(a);d=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return null!=d.connectable?"0"!=d.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,d,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,d,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
-Graph.prototype.isCellFoldable=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=d.collapsible||!this.isContainer(a)&&"1"==d.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
-Graph.prototype.zoom=function(a,d){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.getTooltipForCell=function(a){var d="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),d=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var b=[];this.isEnabled()&&e.push("link");for(var h=0;h<a.length;h++)0>mxUtils.indexOf(e,a[h].nodeName)&&0<a[h].nodeValue.length&&b.push({name:a[h].nodeName,value:a[h].nodeValue});b.sort(function(a,d){return a.name<d.name?
--1:a.name>d.name?1:0});for(h=0;h<b.length;h++)"link"==b[h].name&&this.isCustomLink(b[h].value)||(d+=("link"!=b[h].name?"<b>"+b[h].name+":</b> ":"")+mxUtils.htmlEntities(b[h].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;">'+d+"</div>"))}}return d};Graph.prototype.stringToBytes=function(a){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=a.charCodeAt(e);return d};
-Graph.prototype.bytesToString=function(a){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);return d.join("")};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
-Graph.prototype.zapGremlins=function(a){for(var d=[],e=0;e<a.length;e++){var b=a.charCodeAt(e);(32<=b||9==b||10==b||13==b)&&d.push(a.charAt(e))}return d.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";
-HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
-HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
-HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
-HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":
-IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
+Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
+Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
+Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var u=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=u){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
+null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,u,c):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a,
+l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.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,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?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()};
+Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,b){return a.name<b.name?
+-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(b+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};
+Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.prototype.compressNode=function(a){return this.compress(this.zapGremlins(mxUtils.getXml(a)))};Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};
+Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;
+HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";
+HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);
+HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);
+HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
+HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDQxNERDRTU1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDQxNERDRTY1QjY1MTFFNDkzNTRFQTVEMTdGMTdBQjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0NDE0RENFMzVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0NDE0RENFNDVCNjUxMUU0OTM1NEVBNUQxN0YxN0FCNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsvuX50AAANaSURBVHja7FjRZ1tRGD9ZJ1NCyIQSwrivI4Q8hCpjlFDyFEoYfSp9Ko1QWnmo0If+BSXkIfo0QirTMUpeGo2EPfWllFYjZMLKLDJn53d3biU337m5J223bPbxk5t7v+/c3/2+73znO8fDOWezKM/YjMpz68Lj8ejY+QTeCCwLxOS9qPxtyN+6wAeBTwJ31CCO0cJDjXBGBN4LfIepSwykTUT1bgpuib0SONIgo8KRHOtRiCFcvUcgZeGrHPNBxLIyFPyRgTGz0xLbegJCdmzpElue5KlAIMDX19d5uVzm5+fnfDAYmMA17uEZdOx2Yvb/sHlu2S0xwymn5ufneTab5b1ej08S6EAXNrDd2dnhiUTim21MvMtwQ6yiIrWwsMDPzs64rsBmf3/fvM7n89TYlUnEllSkQqEQv7q64g+Vk5MTVXosORErU0Zer5f0FEIlw2N6MxwO82QyaXql2+2SxDqdjopYWUUsqEp45IldqtWq6UWVh/1+P7+8vCTJ4QMUJSRIEXuneoH96w8PDyeWAnhSJfCqwm6NIlaklFdXV0cGhRcQ2mlJQXK5nMq2YPEZbnteU1U2lUqN/D84OGD9fl+5fgnSrFarsUwmw0qlEru4uBjTicViTk3Cr27HSnxR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+
+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,
-mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(d){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
-!mxEvent.isTouchEvent(d.getEvent())||this.graph.model.isVertex(d.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,b){d=!1;var e=b.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var m=this.getState(b.getState());null==m&&mxEvent.isTouchEvent(e)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,b){var e=b.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
-this.update(this.getState(b.getState()),b.getGraphX(),b.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,function(a,b){var e=b.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),b):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?
-this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(b.getGraphX(),b.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,b.getGraphX(),b.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,d){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
-HoverIcons.prototype.createArrow=function(a,d){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
-"inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=d&&e.setAttribute("title",d);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y),
+mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
+!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(d.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
+this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?
+this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
+HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
+"inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y),
this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown||
this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
-HoverIcons.prototype.visitNodes=function(a){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&a(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(d){d.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(a,d,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=d&&"orthogonalEdgeStyle"===
-mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",a),d.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,d,e){return this.graph.view.getState(this.graph.getCellAt(d,e))};
-HoverIcons.prototype.click=function(a,d,e){var b=e.getEvent(),h=e.getGraphX(),m=e.getGraphY(),h=this.getStateAt(a,h,m);null==h||!this.graph.model.isEdge(h.cell)||mxEvent.isControlDown(b)||h.getVisibleTerminalState(!0)!=a&&h.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,d,this.graph.defaultEdgeLength,b),this.graph.selectCellsForConnectVertex(a,b,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(b)?this.update(this.getState(this.graph.view.getState(a[1]))):
-this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(h.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
+HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
+mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
+HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
+this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
-var d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=d&&(a.x-=d.horizontalOffset/2,a.y-=d.verticalOffset/2,a.width+=d.horizontalOffset,a.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&a.add(d.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
+var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
"px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+
-"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var d=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),b=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=d&&d==e&&e==b&&b==a&&(a=b=e=d=null);var h=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,d){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==b||null==h||b.height<6*h.height&&b.width<6*h.width)?d.style.visibility="hidden":d.style.visibility="visible"});
-m(d,this.arrowRight);m(e,this.arrowLeft);m(b,this.arrowUp);m(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",
+"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(),
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==k||d.height<6*k.height&&d.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"});
+l(b,this.arrowRight);l(e,this.arrowLeft);l(d,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",
mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==a?a=d:a.add(d))});return a};
-HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var d=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(a=d)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a)}return a};
-HoverIcons.prototype.update=function(a,d,e){if(this.graph.connectionArrowsEnabled){var b=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,b=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,d,e))}),this.updateDelay+10))):null!=this.startTime&&(b=(new Date).getTime()-this.startTime);
-this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,e)?this.reset(!1):(null!=this.currentState||b>this.activationDelay)&&this.currentState!=a&&(b>this.updateDelay&&null!=a||null==this.bbox||null==d||null==e||!mxUtils.contains(this.bbox,d,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):
+HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
+HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a)}return a};
+HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);
+this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):
this.reset())}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 d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var b=this.getState(a);null!=b&&this.graph.model.isEdge(b.cell)&&null!=b.style&&1!=b.style[mxConstants.STYLE_CURVED]&&!b.invalid&&this.updateLineJumps(b)&&this.graph.cellRenderer.redraw(b,!1,this.isRendering());b=d.apply(this,arguments);null!=
-b&&this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(b);return b};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var 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 c=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,d,f){var e=new mxPoint(d,f);e.type=c;b.push(e);e=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==e||e.type!=c||e.x!=d||e.y!=f},r=.5*this.scale,d=!1,b=[],l=0;l<c.length-1;l++){for(var n=c[l+1],w=c[l],v=[],h=c[l+2];l<
-c.length-2&&mxUtils.ptSegDistSq(w.x,w.y,h.x,h.y,n.x,n.y)<1*this.scale*this.scale;)n=h,l++,h=c[l+2];for(var d=e(0,w.x,w.y)||d,y=0;y<this.validEdges.length;y++){var t=this.validEdges[y],q=t.absolutePoints;if(null!=q&&mxUtils.intersects(a,t)&&"1"!=t.style.noJump)for(t=0;t<q.length-1;t++){for(var m=q[t+1],p=q[t],h=q[t+2];t<q.length-2&&mxUtils.ptSegDistSq(p.x,p.y,h.x,h.y,m.x,m.y)<1*this.scale*this.scale;)m=h,t++,h=q[t+2];h=mxUtils.intersection(w.x,w.y,n.x,n.y,p.x,p.y,m.x,m.y);if(null!=h&&(Math.abs(h.x-
-p.x)>r||Math.abs(h.y-p.y)>r)&&(Math.abs(h.x-m.x)>r||Math.abs(h.y-m.y)>r)){m=h.x-w.x;p=h.y-w.y;h={distSq:m*m+p*p,x:h.x,y:h.y};for(m=0;m<v.length;m++)if(v[m].distSq>h.distSq){v.splice(m,0,h);h=null;break}null==h||0!=v.length&&v[v.length-1].x===h.x&&v[v.length-1].y===h.y||v.push(h)}}}for(t=0;t<v.length;t++)d=e(1,v[t].x,v[t].y)||d}h=c[c.length-1];d=e(0,h.x,h.y)||d}a.routedPoints=b;return d}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,d){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),l,n=!0,w=null,v=null;l=[];var q=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var t=
-this.state.routedPoints[y],z=new mxPoint(t.x/this.scale,t.y/this.scale);0==y?z=c[0]:y==this.state.routedPoints.length-1&&(z=c[c.length-1]);var m=!1;if(null!=w&&1==t.type){var p=this.state.routedPoints[y+1],t=p.x/this.scale-z.x,p=p.y/this.scale-z.y,t=t*t+p*p;null==q&&(q=new mxPoint(z.x-w.x,z.y-w.y),v=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/v,q.y=q.y*f/v);t>f*f&&0<v&&(t=w.x-z.x,p=w.y-z.y,t=t*t+p*p,t>f*f&&(m=new mxPoint(z.x-q.x,z.y-q.y),t=new mxPoint(z.x+q.x,z.y+q.y),l.push(m),this.addPoints(a,l,d,b,!1,
-null,n),l=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(m.x-q.y*l,m.y+q.x*l),a.lineTo(t.x-q.y*l,t.y+q.x*l),a.lineTo(t.x,t.y)):"arc"==e?(l*=1.3,a.curveTo(m.x-q.y*l,m.y+q.x*l,t.x-q.y*l,t.y+q.x*l,t.x,t.y)):(a.moveTo(t.x,t.y),n=!0),l=[t],m=!0))}else q=null;m||(l.push(z),w=z)}this.addPoints(a,l,d,b,!1,null,n);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,d,b){if(null==c||null==
-a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{c=this.getTerminalPort(a,c,b);var f=this.getNextPoint(a,d,b),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var h=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,h,v,n);h=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);h+=parseFloat(a.style[b?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);f=this.getPerimeterPoint(c,f,0==g&&e,h);0!=g&&(h=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,h,v,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,d,b,f),b)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,d,b,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,a[f]);if(null!=g){var k=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==b||k<b)d=g,b=k}}null!=d&&(e=d)}return e};
-var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,d){var b=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(b=d.state.view.graph.replacePlaceholders(d.state.cell,b));return b};var q=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 d=
-c.substring(8,c.length-1),b=mxUtils.parseXml(a.view.graph.decompress(d));return new mxShape(new mxStencil(b.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var d=mxStencilRegistry.stencils[a];if(null==d&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){d=mxStencilRegistry.libraries[e];if(null!=d){if(null==mxStencilRegistry.packages[e]){for(var b=0;b<d.length;b++){var h=d[b];if(".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,null);else if(".js"==h.toLowerCase().substring(h.length-3,h.length))try{if(mxStencilRegistry.allowEval){var m=
-mxUtils.load(h);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",h,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);d=mxStencilRegistry.stencils[a]}}return d};
-mxStencilRegistry.getBasenameForStencil=function(a){var d=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var d=a[1],e=2;e<a.length-1;e++)d+="/"+a[e];return d};
-mxStencilRegistry.loadStencilSet=function(a,d,e,b){var h=mxStencilRegistry.packages[a];if(null!=e&&e||null==h){var m=!1;if(null==h)try{if(b){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,m=!0,mxStencilRegistry.parseStencilSet(b.documentElement,d,m))}));return}h=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=h;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=h&&null!=
-h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,d,m)}};mxStencilRegistry.loadStencil=function(a,d){if(null!=d)mxUtils.get(a,mxUtils.bind(this,function(a){d(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var d=0;d<a.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[d]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,d,e){if("stencils"==a.nodeName)for(var b=a.firstChild;null!=b;)"shapes"==b.nodeName&&mxStencilRegistry.parseStencilSet(b,d,e),b=b.nextSibling;else{e=null!=e?e:!0;var b=a.firstChild,h="";a=a.getAttribute("name");for(null!=a&&(h=a+".");null!=b;){if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.getAttribute("name"),null!=a)){var h=h.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(h+m.toLowerCase(),new mxStencil(b));if(null!=d){var p=b.getAttribute("w"),
-q=b.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);d(h,m,a,p,q)}}b=b.nextSibling}}};
+(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 e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var e=new mxPoint(b,f);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=f},r=.5*this.scale,b=!1,d=[],h=0;h<c.length-1;h++){for(var m=c[h+1],w=c[h],v=[],k=c[h+2];h<
+c.length-2&&mxUtils.ptSegDistSq(w.x,w.y,k.x,k.y,m.x,m.y)<1*this.scale*this.scale;)m=k,h++,k=c[h+2];for(var b=e(0,w.x,w.y)||b,y=0;y<this.validEdges.length;y++){var t=this.validEdges[y],q=t.absolutePoints;if(null!=q&&mxUtils.intersects(a,t)&&"1"!=t.style.noJump)for(t=0;t<q.length-1;t++){for(var l=q[t+1],p=q[t],k=q[t+2];t<q.length-2&&mxUtils.ptSegDistSq(p.x,p.y,k.x,k.y,l.x,l.y)<1*this.scale*this.scale;)l=k,t++,k=q[t+2];k=mxUtils.intersection(w.x,w.y,m.x,m.y,p.x,p.y,l.x,l.y);if(null!=k&&(Math.abs(k.x-
+p.x)>r||Math.abs(k.y-p.y)>r)&&(Math.abs(k.x-l.x)>r||Math.abs(k.y-l.y)>r)){l=k.x-w.x;p=k.y-w.y;k={distSq:l*l+p*p,x:k.x,y:k.y};for(l=0;l<v.length;l++)if(v[l].distSq>k.distSq){v.splice(l,0,k);k=null;break}null==k||0!=v.length&&v[v.length-1].x===k.x&&v[v.length-1].y===k.y||v.push(k)}}}for(t=0;t<v.length;t++)b=e(1,v[t].x,v[t].y)||b}k=c[c.length-1];b=e(0,k.x,k.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,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,w=null,v=null;h=[];var q=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var t=
+this.state.routedPoints[y],z=new mxPoint(t.x/this.scale,t.y/this.scale);0==y?z=c[0]:y==this.state.routedPoints.length-1&&(z=c[c.length-1]);var l=!1;if(null!=w&&1==t.type){var p=this.state.routedPoints[y+1],t=p.x/this.scale-z.x,p=p.y/this.scale-z.y,t=t*t+p*p;null==q&&(q=new mxPoint(z.x-w.x,z.y-w.y),v=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/v,q.y=q.y*f/v);t>f*f&&0<v&&(t=w.x-z.x,p=w.y-z.y,t=t*t+p*p,t>f*f&&(l=new mxPoint(z.x-q.x,z.y-q.y),t=new mxPoint(z.x+q.x,z.y+q.y),h.push(l),this.addPoints(a,h,b,d,!1,
+null,m),h=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(l.x-q.y*h,l.y+q.x*h),a.lineTo(t.x-q.y*h,t.y+q.x*h),a.lineTo(t.x,t.y)):"arc"==e?(h*=1.3,a.curveTo(l.x-q.y*h,l.y+q.x*h,t.x-q.y*h,t.y+q.x*h,t.x,t.y)):(a.moveTo(t.x,t.y),m=!0),h=[t],l=!0))}else q=null;l||(h.push(z),w=z)}this.addPoints(a,h,b,d,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
+a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var k=Math.cos(-g),v=Math.sin(-g),f=mxUtils.getRotatedPoint(f,k,v,m);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);f=this.getPerimeterPoint(c,f,0==g&&e,k);0!=g&&(k=Math.cos(g),v=Math.sin(g),f=mxUtils.getRotatedPoint(f,k,v,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||n<d)b=g,d=n}}null!=b&&(e=b)}return e};
+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 q=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(n){null!=window.console&&console.log("Error in shape: "+n)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l=
+mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
+mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,l=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
+q=d.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(k,l,a,p,q)}}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 d=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
-d.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));
-for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var b=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=b.apply(this,arguments),c=a.getCell;
-a.getCell=mxUtils.bind(this,function(a){var d=c.apply(this,arguments);this.error=null;return d});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&&
+"#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));
+for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments),c=a.getCell;
+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,d,b){c=null!=c?c:0;d=null!=d?d:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},k=0;k<a;k++){var l=e.getChildAt(e.getRoot(),k);if(1!=a||this.isCellLocked(this.getDefaultParent()))l=this.importCells([l],0,0,this.model.getRoot(),null,g)[0],n=this.model.getChildren(l),this.moveCells(n,c,d),f=f.concat(n);else var n=
-e.getChildren(l),f=f.concat(this.importCells(n,c,d,this.getDefaultParent(),null,g))}if(b){this.isGridEnabled()&&(c=this.snap(c),d=this.snap(d));var t=this.getBoundingBoxFromGeometry(f,!0);null!=t&&this.moveCells(f,c-t.x,d-t.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var d=mxUtils.getValue(a.style,"points",null);if(null!=d){var b=[];try{for(var f=JSON.parse(d),d=0;d<f.length;d++){var e=f[d];b.push(new mxConnectionConstraint(new mxPoint(e[0],
-e[1]),2<e.length?"0"!=e[2]:!0))}}catch(E){}return b}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),d=0,b=0;b<c;b++){var f=this.model.getChildAt(a,b);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||d++)}return 0<d||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 d=this.model.getParent(a);null!=d&&(d=this.layoutManager.getLayout(d),null!=d&&d.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(),d=[];c.beginUpdate();try{for(var b=0;b<a.length;b++){var f=a[b];if(c.isEdge(f)){var e=c.getTerminal(f,!0),g=c.getTerminal(f,!1);c.setTerminal(f,g,!0);c.setTerminal(f,e,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();
-var l=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);c.setGeometry(f,k);var t=this.view.getState(f),r=this.view.getState(e),y=this.view.getState(g);if(null!=t){var F=null!=r?this.getConnectionConstraint(t,r,!0):null,h=null!=y?this.getConnectionConstraint(t,y,!1):null;this.setConnectionConstraint(f,e,!0,h);this.setConnectionConstraint(f,g,!1,F)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
-2;k.y+=k.height/2-k.width/2;var v=k.width;k.width=k.height;k.height=v;c.setGeometry(f,k);var q=this.view.getState(f);if(null!=q){var w=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==w?w="south":"south"==w?w="west":"west"==w?w="north":"north"==w&&(w="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,w,[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==
-a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);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 d=0;d<c.length;d++){var b=this.view.getState(c[d]);null!=b&&null!=b.shape&&null!=b.shape.stencil&&this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(c[d]):this.isReplacePlaceholders(c[d])&&
-this.view.invalidate(c[d],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var d=a.ownerDocument.createElement(null!=c?c:"span"),b=Array.prototype.slice.call(a.attributes);attr=b.pop();)d.setAttribute(attr.nodeName,attr.nodeValue);d.innerHTML=a.innerHTML;a.parentNode.replaceChild(d,a)};Graph.prototype.updateLabelElements=function(a,c,d){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);
-if(null!=e&&0<e.length){b.innerHTML=e;for(var g=b.getElementsByTagName(null!=d?d:"*"),k=0;k<g.length;k++)c(g[k]);b.innerHTML!=e&&this.cellLabelChanged(a[f],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,d){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 b=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&
-f.hasAttribute(b)){this.setAttributeForCell(f,b,c);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var b=[],d=0;d<a.length;d++){var f=this.model.getParent(a[d]);null==f||c.get(f)||(c.put(f,!0),b.push(f))}for(d=0;d<b.length;d++)if(f=this.view.getState(b[d]),
+Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c?c:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var n=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))n=this.importCells([n],0,0,this.model.getRoot(),null,g)[0],m=this.model.getChildren(n),this.moveCells(m,c,b),f=f.concat(m);else var m=
+e.getChildren(n),f=f.concat(this.importCells(m,c,b,this.getDefaultParent(),null,g))}if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var t=this.getBoundingBoxFromGeometry(f,!0);null!=t&&this.moveCells(f,c-t.x,b-t.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var d=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];d.push(new mxConnectionConstraint(new mxPoint(e[0],
+e[1]),2<e.length?"0"!=e[2]:!0))}}catch(E){}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 f=this.model.getChildAt(a,d);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.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 f=a[d];if(c.isEdge(f)){var e=c.getTerminal(f,!0),g=c.getTerminal(f,!1);c.setTerminal(f,g,!0);c.setTerminal(f,e,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();
+var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var t=this.view.getState(f),r=this.view.getState(e),y=this.view.getState(g);if(null!=t){var F=null!=r?this.getConnectionConstraint(t,r,!0):null,k=null!=y?this.getConnectionConstraint(t,y,!1):null;this.setConnectionConstraint(f,e,!0,k);this.setConnectionConstraint(f,g,!1,F)}b.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/
+2;h.y+=h.height/2-h.width/2;var v=h.width;h.width=h.height;h.height=v;c.setGeometry(f,h);var q=this.view.getState(f);if(null!=q){var w=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==w?w="south":"south"==w?w="west":"west"==w?w="north":"north"==w&&(w="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,w,[f])}b.push(f)}}}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"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);
+if(null!=e&&0<e.length){d.innerHTML=e;for(var g=d.getElementsByTagName(null!=b?b:"*"),h=0;h<g.length;h++)c(g[h]);d.innerHTML!=e&&this.cellLabelChanged(a[f],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"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&
+f.hasAttribute(d)){this.setAttributeForCell(f,d,c);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}for(b=0;b<d.length;b++)if(f=this.view.getState(d[b]),
null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)c.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=
-function(a){for(var c=[],d=0;d<a.length;d++)if(this.isCellDeletable(a[d])){var b=this.view.getState(a[d]);if(null!=b){var f=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&b==mxConstants.NONE&&c.push(a[d])}}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,d){var b;null!=a.value&&"object"==typeof a.value?b=a.value.cloneNode(!0):(b=mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=d&&0<d.length?b.setAttribute(c,d):b.removeAttribute(c);this.model.setValue(a,b)};Graph.prototype.getDropTarget=function(a,c,d,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))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 d=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var b=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=b||this.firstClickSource!=
-f||null!=b&&null!=b.text&&null!=b.text.node&&(mxUtils.contains(b.text.boundingBox,d.x,d.y)||mxUtils.isAncestorNode(b.text.node,mxEvent.getSource(a)))||(null!=b||this.isCellLocked(this.getDefaultParent()))&&(null==b||this.isCellLocked(b.cell))||!(null!=b||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(d.x,d.y,b))}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,d=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var b=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,b.x*f.width),d=Math.max(d,b.y*f.height);return new mxPoint(this.snap(c+a),this.snap(d+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),d=this.getInsertPoint(),b=this.snap(Math.round(Math.max(d.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(d.y,
-(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(b,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,d){var b=new mxCell;b.value="Text";b.style="text;html=1;resizable=0;points=[];";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=d){b.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";b.geometry.relative=!0;b.connectable=!1;var f=this.view.getRelativePoint(d,a,c);b.geometry.x=Math.round(1E4*f.x)/
-1E4;b.geometry.y=Math.round(f.y);b.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(d,b.geometry),e=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else b.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-f.x,b.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([b],null!=d?d.cell:null),
-this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};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,d){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var d=0;d<a.length;d++){var b=this.getAbsoluteUrl(a[d].getAttribute("href"));
-null!=b&&(a[d].setAttribute("rel",this.linkRelation),a[d].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[d],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var f=this.container.style.cursor,e=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
-g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,d){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
-"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var d=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(d>e||b>e)&&this.clear()}}else{for(d=c.getSource();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null!=d?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
-!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var f=b.getSource(),k=b.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=
-this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=mxEvent.isMiddleMouseButton(k)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,k),b.consume())):null!=d&&!b.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&d(b.getEvent()));this.clear()},activate:function(a){this.currentLink=
-g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,
-c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var d=this.getModel(),b=this.gridSize,f=[];d.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var k=d.getParent(a[g]),l=this.moveCells([e[g]],b,b,!1)[0];f.push(l);if(c)d.add(k,e[g]);else{var n=k.getIndex(a[g]);d.add(k,e[g],n+1)}}}finally{d.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,d){if(null!=a){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<b.length;e++)f.push(b[e]);
-document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",d);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"),d=[],b=0;b<c.length;b++)d.push(c[b]);document.execCommand("createlink",!1,mxUtils.trim(a));
-c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==d.length+1)for(b=c.length-1;0<=b;b--)if(c[b]!=d[b-1]){for(c=c[b].getElementsByTagName("a");0<c.length;){for(d=c[0].parentNode;null!=c[0].firstChild;)d.insertBefore(c[0].firstChild,c[0]);d.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),d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);
-return c||"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==d[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var d=[],b=null,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var k=a?g.getCenterX():g.getCenterY(),b=null!=b?Math.max(b,k):k,f=null!=f?Math.min(f,k):k;d.push(g)}}if(2<d.length){d.sort(function(c,d){return a?c.x-d.x:c.y-d.y});
-g=this.view.translate;k=this.view.scale;f=f/k-(a?g.x:g.y);b=b/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var l=(b-f)/(d.length-1),b=f,e=1;e<d.length-1;e++){var n=this.view.getState(this.model.getParent(d[e].cell)),t=this.getCellGeometry(d[e].cell),b=b+l;null!=t&&null!=n&&(t=t.clone(),a?t.x=Math.round(b-t.width/2)-n.origin.x:t.y=Math.round(b-t.height/2)-n.origin.y,this.getModel().setGeometry(d[e].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),d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(b=0;b<c.length;b++){var f=this.view.getState(a[b]);if(null!=f){var e=this.getCellGeometry(c[b]);null==e||!e.relative||this.model.isEdge(a[b])||d.get(this.model.getParent(a[b]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}d=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),
-0);for(b=0;b<a.length;b++)f.add(e,c[b]);return d.encode(f)};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,d,b,f,e,g,k,l){var n=this.useCssTransforms;n&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;d=null!=d?d:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||b?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());
-if(null==t)throw Error(mxResources.get("drawingEmpty"));var r=this.view.scale,y=mxUtils.createXmlDocument(),h=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"svg"):y.createElement("svg");null!=a&&(null!=h.style?h.style.backgroundColor=a:h.setAttribute("style","background-color:"+a));null==y.createElementNS?(h.setAttribute("xmlns",mxConstants.NS_SVG),h.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);
-a=c/r;var v=Math.max(1,Math.ceil(t.width*a)+2*d),w=Math.max(1,Math.ceil(t.height*a)+2*d);h.setAttribute("version","1.1");h.setAttribute("width",v+"px");h.setAttribute("height",w+"px");h.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+v+" "+w);y.appendChild(h);var q=this.createSvgCanvas(h);q.foOffset=f?-.5:0;q.textOffset=f?-.5:0;q.imageOffset=f?-.5:0;q.translate(Math.floor((d/c-t.x)/r),Math.floor((d/c-t.y)/r));var x=document.createElement("textarea"),z=q.createAlternateContent;q.createAlternateContent=
-function(a,c,d,b,f,e,g,k,l,n,t,r,y){var h=this.state;if(null!=this.foAltText&&(0==b||0!=h.fontSize&&e.length<5*b/h.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(b/2));v.setAttribute("y",Math.round((f+h.fontSize)/2));v.setAttribute("fill",h.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(h.fontSize)+"px");v.setAttribute("font-family",h.fontFamily);(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight",
-"bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");try{return x.innerHTML=e,v.textContent=x.value,v}catch(Ca){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var m=this.backgroundImage;if(null!=m){c=r/c;var F=this.view.translate,p=new mxRectangle(F.x*c,F.y*c,m.width*c,m.height*c);mxUtils.intersects(t,p)&&
-q.image(F.x,F.y,m.width,m.height,m.src,!0)}q.scale(a);q.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var B=k.drawCellState;k.drawCellState=function(a,c){for(var d=a.view.graph,b=d.isCellSelected(a.cell),f=d.model.getParent(a.cell);!e&&!b&&null!=f;)b=d.isCellSelected(f),f=d.model.getParent(f);(e||b)&&B.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),q);null!=l&&this.updateLinkTargets(h,l);return h}finally{n&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};
-Graph.prototype.updateLinkTargets=function(a,c){for(var d=a.getElementsByTagName("a"),b=0;b<d.length;b++){var f=d[b].getAttribute("href");null==f&&(f=d[b].getAttribute("xlink:href"));null!=f&&/^https?:\/\//.test(f)&&d[b].setAttribute("target",c)}};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,d){for(;null!=a&&a.nodeName!=c;){if(a==d)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 d=document.createRange();d.selectNode(a);c.removeAllRanges();c.addRange(d)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),d=c.createRange(),d.setEndPoint("StartToStart",
-a),d.select())};Graph.prototype.insertRow=function(a,c){for(var d=a.tBodies[0],b=d.rows[0].cells,f=0,e=0;e<b.length;e++)var g=b[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);d=d.insertRow(c);for(e=0;e<f;e++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var d=a.tHead;if(null!=d)for(var b=0;b<d.rows.length;b++){var f=document.createElement("th");d.rows[b].appendChild(f);mxUtils.br(f)}d=
-a.tBodies[0];for(b=0;b<d.rows.length;b++)f=d.rows[b].insertCell(c),mxUtils.br(f);return d.rows[0].cells[0<=c?c:d.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var d=a.tBodies[0].rows,b=0;b<d.length;b++)d[b].cells.length>c&&d[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var d=document.createElement("div");d.innerHTML=a;a=document.createDocumentFragment();
-for(var b;b=d.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function d(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 b=document.createElement("a");b.setAttribute("rel",this.linkRelation);b.setAttribute("href",
-this.getAbsoluteUrl(a));b.setAttribute("title",d(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);mxUtils.write(b,d(c,40));this.isCustomLink(a)&&mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return b};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 d=this.getCellAt(c.graphX,c.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,c.graphX,c.graphY)||(c.state=this.view.getState(d),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,d=!1,b=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),d=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||
-!b&&!mxEvent.isMouseEvent(f.getEvent())&&(d&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.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=[],d=0,b=a.rangeCount;d<
-b;++d)c.push(a.getRangeAt(d));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,d=a.length;c<d;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(Y){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
-(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));h.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?m.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 d=this.graph.view.getState(a);this.textarea.className=null!=d&&1==d.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var d=this.graph.getModel().getParent(a),b=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(d)&&null!=b&&b.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
-"gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,d){d.originalNode=a;a=a.firstChild;for(var b=d.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return d}function d(a,c){if(null!=a)if(c.originalNode!=
-a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?b(a):(d(a,c),c=c.nextSibling);a=f}}function b(a){for(var c=a.firstChild;null!=c;){var d=c.nextSibling;b(c);c=d}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)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var b=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){d(this.textarea,b)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),
-c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),d=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
-f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,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(b*mxConstants.LINE_HEIGHT)+
-"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,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 k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var b=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
-this.restoreSelection(this.switchSelectionState);this.switchSelectionState=d;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 d=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;var b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=b.x*this.bounds.width;this.bounds.y+=b.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/d)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/d)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/d)+(this.textarea.offsetHeight-
-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*d);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/d)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*d);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=d:mxUtils.setPrefixedStyle(this.textarea.style,
-"transform","scale("+d+","+d+")")}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 d=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));return d=this.graph.sanitizeHtml(d,!0)};
+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 f=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==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 f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))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,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=
+f||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&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==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(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.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 f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/
+1E4;d.geometry.y=Math.round(f.y);d.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.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 f=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
+g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
+"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
+!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var f=d.getSource(),h=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=
+this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=
+g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.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,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],d,d,!1)[0];f.push(n);if(c)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<d.length;e++)f.push(d[e]);
+document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].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,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,f=null!=f?Math.min(f,h):h;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});
+g=this.view.translate;h=this.view.scale;f=f/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(d-f)/(b.length-1),d=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)),t=this.getCellGeometry(b[e].cell),d=d+n;null!=t&&null!=m&&(t=t.clone(),a?t.x=Math.round(d-t.width/2)-m.origin.x:t.y=Math.round(d-t.height/2)-m.origin.y,this.getModel().setGeometry(b[e].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 f=this.view.getState(a[d]);if(null!=f){var e=this.getCellGeometry(c[d]);null==e||!e.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),
+0);for(d=0;d<a.length;d++)f.add(e,c[d]);return b.encode(f)};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,f,e,g,h,n){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());
+if(null==t)throw Error(mxResources.get("drawingEmpty"));var r=this.view.scale,y=mxUtils.createXmlDocument(),k=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"svg"):y.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==y.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);
+a=c/r;var v=Math.max(1,Math.ceil(t.width*a)+2*b),w=Math.max(1,Math.ceil(t.height*a)+2*b);k.setAttribute("version","1.1");k.setAttribute("width",v+"px");k.setAttribute("height",w+"px");k.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+v+" "+w);y.appendChild(k);var q=this.createSvgCanvas(k);q.foOffset=f?-.5:0;q.textOffset=f?-.5:0;q.imageOffset=f?-.5:0;q.translate(Math.floor((b/c-t.x)/r),Math.floor((b/c-t.y)/r));var x=document.createElement("textarea"),z=q.createAlternateContent;q.createAlternateContent=
+function(a,c,b,d,f,e,g,h,n,m,t,r,y){var k=this.state;if(null!=this.foAltText&&(0==d||0!=k.fontSize&&e.length<5*d/k.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(d/2));v.setAttribute("y",Math.round((f+k.fontSize)/2));v.setAttribute("fill",k.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(k.fontSize)+"px");v.setAttribute("font-family",k.fontFamily);(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight",
+"bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");try{return x.innerHTML=e,v.textContent=x.value,v}catch(Ca){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var l=this.backgroundImage;if(null!=l){c=r/c;var F=this.view.translate,p=new mxRectangle(F.x*c,F.y*c,l.width*c,l.height*c);mxUtils.intersects(t,p)&&
+q.image(F.x,F.y,l.width,l.height,l.src,!0)}q.scale(a);q.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var A=h.drawCellState;h.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!d&&null!=f;)d=b.isCellSelected(f),f=b.model.getParent(f);(e||d)&&A.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),q);null!=n&&this.updateLinkTargets(k,n);return k}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};
+Graph.prototype.updateLinkTargets=function(a,c){for(var b=a.getElementsByTagName("a"),d=0;d<b.length;d++){var f=b[d].getAttribute("href");null==f&&(f=b[d].getAttribute("xlink:href"));null!=f&&/^https?:\/\//.test(f)&&b[d].setAttribute("target",c)}};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,f=0,e=0;e<d.length;e++)var g=d[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<f;e++)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 f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=
+a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);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,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||
+!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.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(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 l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var 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 q=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 f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}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)}q.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){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"<br/>"):h,!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),
+f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,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=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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 h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(c?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!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!=h&&(this.textarea.innerHTML=h);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,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-
+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(F){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(a.style,
-mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&d==mxConstants.NONE&&b==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 g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,d,b,f,e){mxEvent.isAltDown(e)&&(f=null);g.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 d=this.graph.view.translate,b=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/
-b-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/b-d.y);this.hint.innerHTML=c+", "+d;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)&&
+this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(F){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.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 g=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);g.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 k=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=k.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)),
+var n=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=n.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,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(d.x/f-b.x),b=this.roundLength(d.y/f-b.y);this.hint.innerHTML=e+", "+b;this.hint.style.visibility=
-"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.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(),d.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,f=this.graph.view.scale,e=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=e+", "+d;this.hint.style.visibility=
+"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.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=":
@@ -2410,146 +2412,146 @@ HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.trian
!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 r=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){r.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 d=null!=this.div&&"none"!=this.div.style.display,
-b=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,f=this.first.y,e=(this.currentX-b)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(d){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
-this.y,this.width,this.height),k=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(b,f,this.graph.getDefaultParent(),!0,!0),d=0;d<k.length;d++)if(this.graph.isCellMovable(k[d])){var l=this.graph.view.getState(k[d]),n=this.graph.getCellGeometry(k[d]);null!=l&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(k[d],n))}}finally{this.graph.model.endUpdate()}}else e=
-new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var d=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);d.x-=b.x;d.y-=b.y;var b=c.getX()+d.x,d=c.getY()+d.y,f=this.first.x-b,e=this.first.y-d,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
-this.update(b,d),this.isSpaceEvent(c)?(b=this.x+this.width,d=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=b-this.width),this.y<this.first.y&&(this.y=d-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
+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,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,e=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
+this.y,this.width,this.height),h=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=
+new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var 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,f=this.first.x-d,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)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,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,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 l=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);l.apply(this,arguments)};var n=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,d,b){v.apply(this,arguments);d!=this.currentTerminalState?(n=(new Date).getTime(),w=0):w=(new Date).getTime()-n;this.currentTerminalState=d};var B=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&B.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var d=null!=a&&0==a,b=this.state.getVisibleTerminalState(d),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-b,d):null,d=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),f):null)?this.fixedHandleImage:null!=f&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,c,d){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var t=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),d=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);if(c.isEdge(d)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),
-null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return t.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),d=c.getParent(a.cell),b=this.graph.getCellGeometry(a.cell);return c.isEdge(d)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):z.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var d=this.graph.getModel(),b=d.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!d.isEdge(b)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+"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 h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
+this.secondDiv=null);h.apply(this,arguments)};var m=(new Date).getTime(),w=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),w=0):w=(new Date).getTime()-m;this.currentTerminalState=b};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.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),f=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!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&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 t=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 t.apply(this,arguments)};var z=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))):z.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.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 G=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){G.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var A=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){A.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.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,d){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,d){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 d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);this.updateLinkHint(d,
-b);if(null!=d||null!=b&&0<b.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,d){if(null==c&&(null==d||0==d.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=d&&0<d.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
-this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var b=document.createElement("img");b.setAttribute("src",Editor.editImage);b.setAttribute("title",mxResources.get("editLink"));b.setAttribute("width","11");b.setAttribute("height","11");b.style.marginLeft="10px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
-function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));b=document.createElement("img");b.setAttribute("src",Dialog.prototype.clearImage);b.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));b.setAttribute("width","13");b.setAttribute("height","10");b.style.marginLeft="4px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=d)for(b=0;b<d.length;b++){var f=document.createElement("div");f.style.marginTop=null!=c||0<b?"6px":"0px";f.appendChild(this.graph.createLinkForHint(d[b].getAttribute("href"),mxUtils.getTextContent(d[b])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.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,d){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
-this.changeHandler=mxUtils.bind(this,function(c,d){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),d=this.graph.getLinksForState(this.state);if(null!=c||null!=d&&0<d.length)this.updateLinkHint(c,d),this.redrawHandles()};var x=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){x.apply(this,
-arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.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),d=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),a=null!=d?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==d&&(d=this.state);d=d.y+d.height;null!=c&&(d=Math.max(d,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(d+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var I=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.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 f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.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 x=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){x.apply(this,
+arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.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 I=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
function(){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){R.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 P=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(P.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 X=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){X.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 d(){mxActor.call(this)}function e(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function r(){mxActor.call(this)}function l(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,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function B(){mxActor.call(this)}function y(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function H(){mxCylinder.call(this)}function G(){mxShape.call(this)}function A(){mxShape.call(this)}
+(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 e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(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,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function A(){mxActor.call(this)}function y(){mxActor.call(this)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function H(){mxCylinder.call(this)}function G(){mxShape.call(this)}function B(){mxShape.call(this)}
function J(){mxEllipse.call(this)}function K(){mxShape.call(this)}function x(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function R(){mxShape.call(this)}function P(){mxShape.call(this)}function X(){mxShape.call(this)}function U(){mxShape.call(this)}function F(){mxCylinder.call(this)}function ea(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function ba(){mxArrowConnector.call(this);
this.spacing=0}function L(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function S(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function T(){mxActor.call(this)}function D(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ga(){mxActor.call(this)}function W(){mxActor.call(this)}function aa(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function fa(){mxRhombus.call(this)}function ma(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ia(){mxConnector.call(this)}function wa(a,c,d,b,f,e,g,k,l,n){g+=l;var na=b.clone();b.x-=f*(2*g+l);b.y-=e*(2*g+l);f*=g+l;e*=g+l;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(b,c)):(a.moveTo(0,0),a.lineTo(b-c,0),a.lineTo(b,c),a.lineTo(b,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};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)),qa=(.5-Ba)/2;mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b,f/Ba);a.translate((b-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*qa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-qa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(e,mxCylinder);e.prototype.size=
-20;e.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.min(b,f/(.5+Ba));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-qa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-qa)*c),a.lineTo(.5*c,(1-qa)*c)):(a.translate((b-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*qa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-qa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,f-c),a.curveTo(b,f+c/3,0,f+c/3,0,f-c),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(h,mxCylinder);h.prototype.size=30;h.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(b-c,0),a.lineTo(b-c,c),a.lineTo(b,c)):(a.moveTo(0,0),a.lineTo(b-c,0),a.lineTo(b,c),a.lineTo(b,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",h);mxUtils.extend(m,mxActor);m.prototype.redrawPath=
-function(a,c,d,b,f){a.moveTo(0,0);a.quadTo(b/2,.5*f,b,0);a.quadTo(.5*b,f/2,b,f);a.quadTo(b/2,.5*f,0,f);a.quadTo(.5*b,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,d,b,f,e){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
-var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,d),a.lineTo(c,d)):(a.moveTo(b-c,d),a.lineTo(b,d)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,d),a.lineTo(b,d)):(a.moveTo(0,d),a.lineTo(b-c,d),a.lineTo(b-c,0),a.lineTo(b,0)),a.lineTo(b,f),a.lineTo(0,f),a.lineTo(0,d),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,
-d,b,f){c=Math.max(0,Math.min(b,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,c,d,b,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*b/4,c*(1-1.4),b,c/2);a.lineTo(b,f-c/2);a.quadTo(3*b/4,f-1.4*c,b/2,f-c/2);a.quadTo(b/4,f-c*(1-1.4),0,f-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),d=a.width,b=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=
-b,new mxRectangle(a.x,a.y+c,d,b-2*c);c*=d;return new mxRectangle(a.x+c,a.y,d-2*c,b)}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,d,b,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,
-0);a.lineTo(b,0);a.lineTo(b,f-c/2);a.quadTo(3*b/4,f-1.4*c,b/2,f-c/2);a.quadTo(b/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",c);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,d,b){var f=mxUtils.getValue(this.style,"size");return null!=f?b*Math.max(0,Math.min(1,f)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b-c,f)],this.isRounded,
-d,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,f)],this.isRounded,d,!0)};mxCellRenderer.registerShape("trapezoid",
-g);mxUtils.extend(k,mxActor);k.prototype.size=.5;k.prototype.redrawPath=function(a,c,d,b,f){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(b,f)],this.isRounded,d,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
-k);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,d,b,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=b/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);l.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};l.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)};l.prototype.quadTo=function(a,c,d,b){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=b};l.prototype.curveTo=function(a,c,d,b,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};l.prototype.arcTo=function(a,c,d,b,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};l.prototype.lineTo=function(a,c){if(null!=
-this.lastX&&null!=this.lastY){var d=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),e=Math.sqrt(b*b+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),na=this.defaultVariation;5>g&&(g=5,na/=3);for(var k=d(a-this.lastX)*b/g,d=d(c-this.lastY)*f/g,b=b/e,f=f/e,e=0;e<g;e++){var l=(Math.random()-.5)*na;this.originalLineTo.call(this.canvas,k*e+this.lastX-l*f,d*e+this.lastY-
-l*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};l.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 l(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,c,d,b,f){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(b/2,Math.min(f/
-2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(b*e,f*e)),a.moveTo(c+e,d),a.lineTo(c+b-e,d),a.quadTo(c+b,d,c+b,d+e),a.lineTo(c+b,d+f-e),a.quadTo(c+b,d+f,c+b-e,d+f),a.lineTo(c+e,d+f),a.quadTo(c,d+f,c,d+f-e),a.lineTo(c,d+e),a.quadTo(c,d,c+e,d)):(a.moveTo(c,d),a.lineTo(c+b,d),a.lineTo(c+b,d+f),a.lineTo(c,d+f),a.lineTo(c,d)),a.close(),a.end(),a.fillAndStroke()}};
-var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,d,b,f){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(n,mxRectangleShape);n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.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,d=a.height;
-a=new mxRectangle(a.x,a.y,c,d);var b=c*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,b=Math.max(b,Math.min(c*f,d*f));a.x+=Math.round(b);a.width-=Math.round(2*b)}return a};n.prototype.paintForeground=function(a,c,d,b,f){var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,d);a.lineTo(c+e,d+f);a.moveTo(c+b-e,d);a.lineTo(c+b-e,d+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,c,d,b,f){a.setFillColor(mxConstants.NONE);a.rect(c,d,b,f);a.fill()};w.prototype.paintForeground=function(a,
-c,d,b,f){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,d,b,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d=Math.max(0,Math.min(f,
-parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f-d),new mxPoint(Math.min(b,e+k),f-d),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-d),new mxPoint(0,
-f-d)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(B,mxActor);B.prototype.size=.2;B.prototype.fixedSize=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,d,b,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,f/2),new mxPoint(b-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("step",B);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*f),new mxPoint(b-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,d,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(t,mxRectangleShape);t.prototype.isHtmlAllowed=function(){return!1};t.prototype.paintForeground=function(a,c,d,b,f){var e=Math.min(b/5,f/5)+1;a.begin();a.moveTo(c+b/2,d+e);a.lineTo(c+b/2,d+f-e);a.moveTo(c+e,d+f/2);a.lineTo(c+b-e,d+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("plus",t);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,d,b,f){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
-1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;d+=e;b-=2*e;f-=2*e;0<b&&0<f&&(a.setShadow(!1),Ea.apply(this,[a,c,d,b,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.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};z.prototype.paintForeground=function(a,c,d,
-b,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;d+=e;b-=2*e;f-=2*e;0<b&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var k=this.style["symbol"+e+"Align"],na=this.style["symbol"+e+"VerticalAlign"],l=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],t=
-this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||t,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(b+this.strokewidth,f+this.strokewidth),t+=y,r+=y);var y=c,h=d,y=k==mxConstants.ALIGN_CENTER?y+(b-l)/2:k==mxConstants.ALIGN_RIGHT?y+(b-l-t):y+t,h=na==mxConstants.ALIGN_MIDDLE?h+(f-n)/2:na==mxConstants.ALIGN_BOTTOM?h+(f-n-r):h+r;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,y,h,l,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(H,mxCylinder);H.prototype.redrawPath=function(a,c,d,b,f,e){e?(a.moveTo(0,0),a.lineTo(b/2,f/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",H);mxUtils.extend(G,mxShape);G.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.ellipse(b/4,0,b/2,f/4);a.fillAndStroke();a.begin();a.moveTo(b/2,f/4);a.lineTo(b/2,2*f/3);a.moveTo(b/2,f/3);a.lineTo(0,
-f/3);a.moveTo(b/2,f/3);a.lineTo(b,f/3);a.moveTo(b/2,2*f/3);a.lineTo(0,f);a.moveTo(b/2,2*f/3);a.lineTo(b,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(A,mxShape);A.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};A.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(b/6,f/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,f);a.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",A);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,d+f);a.lineTo(c+7*b/8,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",J);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(b,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(b,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
-K);mxUtils.extend(x,mxShape);x.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};x.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(3*b/8,f/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0,f/8,b,7*f/8);a.fillAndStroke()};x.prototype.paintForeground=function(a,c,d,b,f){a.begin();a.moveTo(3*b/8,f/8*1.1);a.lineTo(5*b/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",x);mxUtils.extend(C,mxRectangleShape);
-C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.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)};C.prototype.paintBackground=function(a,c,d,b,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-a,c,d,b,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,d,b,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+b/2,d+e),a.lineTo(c+b/2,d+f),a.end(),a.stroke())};C.prototype.paintForeground=function(a,c,d,b,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,d,b,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",
-C);mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.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))};I.prototype.paintBackground=function(a,c,d,b,f){var e=this.corner,g=Math.min(b,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(f,Math.max(1.5*
-e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);l!=mxConstants.NONE&&(a.setFillColor(l),a.rect(c,d,b,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,d,b,f),a.setGradient(this.fill,this.gradient,c,d,b,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,d);a.lineTo(c+g,d);a.lineTo(c+g,d+Math.max(0,
-k-1.5*e));a.lineTo(c+Math.max(0,g-e),d+k);a.lineTo(c,d+k);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,d);a.lineTo(c+b,d);a.lineTo(c+b,d+f);a.lineTo(c,d+f);a.lineTo(c,d+k);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,d,b){b=C.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;d.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+
-c,Math.min(a.y+a.height,Math.max(a.y+b,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,d,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,d,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*
-c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return d.x<a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,d.y)));d.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,d.x)),a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,d,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,
-new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))*c.view.scale))),c.style),c,d,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,d,b){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,k=a.y,l=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==
-mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+l,k+e),new mxPoint(g+l,k+n),new mxPoint(g,k+n-e),new mxPoint(g,k)]):(e=l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+e,k),new mxPoint(g+l,k),new mxPoint(g+l-e,k+n),new mxPoint(g,k+n),new mxPoint(g+e,k)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(d.x<g||d.x>g+l?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(k,a,d)};mxStyleRegistry.putValue("parallelogramPerimeter",
-mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,d,b){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,k=a.y,l=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=l*Math.max(0,Math.min(1,f)),k=[new mxPoint(e+f,k),new mxPoint(e+l-f,k),new mxPoint(e+l,k+n),new mxPoint(e,k+n),new mxPoint(e+f,k)]):c==mxConstants.DIRECTION_WEST?
-(f=l*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+l,k),new mxPoint(e+l-f,k+n),new mxPoint(e+f,k+n),new mxPoint(e,k)]):c==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k+f),new mxPoint(e+l,k),new mxPoint(e+l,k+n),new mxPoint(e,k+n-f),new mxPoint(e,k+f)]):(f=n*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+l,k+f),new mxPoint(e+l,k+n-f),new mxPoint(e,k+n),new mxPoint(e,k)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(d.x<e||d.x>e+
-l?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(k,a,d)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,d,b){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?B.prototype.fixedSize:B.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,k=a.y,l=a.width,n=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?(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(g+l-f,k),new mxPoint(g+l,a),new mxPoint(g+l-f,k+n),new mxPoint(g,k+n),new mxPoint(g+f,a),new mxPoint(g,k)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(l,e)):l*Math.max(0,Math.min(1,e)),k=[new mxPoint(g+f,k),new mxPoint(g+l,k),new mxPoint(g+l-f,a),new mxPoint(g+l,k+n),new mxPoint(g+f,k+n),new mxPoint(g,a),new mxPoint(g+f,k)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,
-Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k+f),new mxPoint(t,k),new mxPoint(g+l,k+f),new mxPoint(g+l,k+n),new mxPoint(t,k+n-f),new mxPoint(g,k+n),new mxPoint(g,k+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),k=[new mxPoint(g,k),new mxPoint(t,k+f),new mxPoint(g+l,k),new mxPoint(g+l,k+n-f),new mxPoint(t,k+n),new mxPoint(g,k+n-f),new mxPoint(g,k)]);t=new mxPoint(t,a);b&&(d.x<g||d.x>g+l?t.y=d.y:t.x=d.x);return mxUtils.getPerimeterPoint(k,t,d)};mxStyleRegistry.putValue("stepPerimeter",
-mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,d,b){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,k=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(n,g),new mxPoint(e+k,g+f),new mxPoint(e+k,g+l-f),new mxPoint(n,
-g+l),new mxPoint(e,g+l-f),new mxPoint(e,g+f),new mxPoint(n,g)]):(f=k*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+k-f,g),new mxPoint(e+k,a),new mxPoint(e+k-f,g+l),new mxPoint(e+f,g+l),new mxPoint(e,a),new mxPoint(e+f,g)]);n=new mxPoint(n,a);b&&(d.x<e||d.x>e+k?n.y=d.y:n.x=d.x);return mxUtils.getPerimeterPoint(g,n,d)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,c,d,b,
-f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,d);a.ellipse((b-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",R);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,c,d,b,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,
-d);a.begin();a.moveTo(b/2,e+g);a.lineTo(b/2,f);a.end();a.stroke();a.begin();a.moveTo((b-e)/2-g,e/2);a.quadTo((b-e)/2-g,e+g,b/2,e+g);a.quadTo((b+e)/2+g,e+g,(b+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,d,b,f){a.translate(c,d);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
-2;U.prototype.paintBackground=function(a,c,d,b,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,d);a.ellipse(0,e,b-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,b/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",U);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=32;F.prototype.jettyHeight=12;F.prototype.redrawPath=function(a,c,d,b,f,e){var g=parseFloat(mxUtils.getValue(this.style,
-"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));d=g/2;var g=d+g/2,k=.3*f-c/2,l=.7*f-c/2;e?(a.moveTo(d,k),a.lineTo(g,k),a.lineTo(g,k+c),a.lineTo(d,k+c),a.moveTo(d,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(d,l+c)):(a.moveTo(d,0),a.lineTo(b,0),a.lineTo(b,f),a.lineTo(d,f),a.lineTo(d,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(d,l),a.lineTo(d,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(d,k),a.close());a.end()};mxCellRenderer.registerShape("component",
-F);mxUtils.extend(ea,mxDoubleEllipse);ea.prototype.outerStroke=!0;ea.prototype.paintVertexShape=function(a,c,d,b,f){var e=Math.min(4,Math.min(b/5,f/5));0<b&&0<f&&(a.ellipse(c+e,d+e,b-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,d,b,f),a.stroke())};mxCellRenderer.registerShape("endState",ea);mxUtils.extend(ka,ea);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=
+function fa(){mxRhombus.call(this)}function ma(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function la(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ia(){mxConnector.call(this)}function wa(a,c,b,d,f,e,g,h,n,m){g+=n;var na=d.clone();d.x-=f*(2*g+n);d.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(na.x-f-g,na.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};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)),qa=(.5-Ba)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/Ba);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*qa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-qa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=
+20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+Ba));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-qa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-qa)*c),a.lineTo(.5*c,(1-qa)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*qa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-qa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-
+1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-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.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=
+function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);a.quadTo(.5*d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==g?(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,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,
+b,d,f){c=Math.max(0,Math.min(d,Math.min(f,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,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=function(a,c,b,d,f){c=f*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,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-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,f){c=f*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,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",c);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,d){var f=mxUtils.getValue(this.style,"size");return null!=f?d*Math.max(0,Math.min(1,f)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,d,f){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,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,
+b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,d,f){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,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",
+g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,d,f){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,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",
+n);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);h.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};h.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)};h.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};h.prototype.curveTo=function(a,c,b,d,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,c,b,d,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};h.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),f=Math.abs(c-this.lastY),e=Math.sqrt(d*d+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),na=this.defaultVariation;5>g&&(g=5,na/=3);for(var h=b(a-this.lastX)*d/g,b=b(c-this.lastY)*f/g,d=d/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*na;this.originalLineTo.call(this.canvas,h*e+this.lastX-n*f,b*e+this.lastY-
+n*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};h.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 h(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,c,b,d,f){if(null==a.handJiggle)Ja.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(d/2,Math.min(f/
+2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(d*e,f*e)),a.moveTo(c+e,b),a.lineTo(c+d-e,b),a.quadTo(c+d,b,c+d,b+e),a.lineTo(c+d,b+f-e),a.quadTo(c+d,b+f,c+d-e,b+f),a.lineTo(c+e,b+f),a.quadTo(c,b+f,c,b+f-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};
+var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.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 f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};m.prototype.paintForeground=function(a,c,b,d,f){var e=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,e=Math.max(e,Math.min(d*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.moveTo(c+d-e,b);a.lineTo(c+d-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",m);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};w.prototype.paintForeground=function(a,
+c,b,d,f){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,
+parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),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,f-b),new mxPoint(Math.min(d,e+h),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,
+f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(A,mxActor);A.prototype.size=.2;A.prototype.fixedSize=20;A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(a,c,b,d,f){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,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",A);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,c,b,d,f){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*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(t,mxRectangleShape);t.prototype.isHtmlAllowed=function(){return!1};t.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("plus",t);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,f){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+
+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&(a.setShadow(!1),Ea.apply(this,[a,c,b,d,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.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};z.prototype.paintForeground=function(a,c,b,
+d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var h=this.style["symbol"+e+"Align"],na=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],m=this.style["symbol"+e+"Height"],t=
+this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||t,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),t+=y,r+=y);var y=c,k=b,y=h==mxConstants.ALIGN_CENTER?y+(d-n)/2:h==mxConstants.ALIGN_RIGHT?y+(d-n-t):y+t,k=na==mxConstants.ALIGN_MIDDLE?k+(f-m)/2:na==mxConstants.ALIGN_BOTTOM?k+(f-m-r):k+r;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,y,k,n,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(H,mxCylinder);H.prototype.redrawPath=function(a,c,b,d,f,e){e?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",H);mxUtils.extend(G,mxShape);G.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,
+f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};
+mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",J);mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",
+K);mxUtils.extend(x,mxShape);x.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};x.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};x.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",x);mxUtils.extend(C,mxRectangleShape);
+C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.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)};C.prototype.paintBackground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,c,b,d,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,d,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+e),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};C.prototype.paintForeground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",
+C);mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.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))};I.prototype.paintBackground=function(a,c,b,d,f){var e=this.corner,g=Math.min(d,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(f,Math.max(1.5*
+e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,d,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,d,f),a.setGradient(this.fill,this.gradient,c,b,d,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,
+h-1.5*e));a.lineTo(c+Math.max(0,g-e),b+h);a.lineTo(c,b+h);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",I);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=C.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",v.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=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?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n,h+e),new mxPoint(g+n,h+m),new mxPoint(g,h+m-e),new mxPoint(g,h)]):(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+n,h),new mxPoint(g+n-e,h+m),new mxPoint(g,h+m),new mxPoint(g+e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",
+mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,h=a.y,n=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+n-f,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+f,h)]):c==mxConstants.DIRECTION_WEST?
+(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h+f),new mxPoint(e+n,h+m-f),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<e||b.x>e+
+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?A.prototype.fixedSize:A.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,h=a.y,n=a.width,m=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?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n-f,h),new mxPoint(g+n,a),new mxPoint(g+n-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+n,h),new mxPoint(g+n-f,a),new mxPoint(g+n,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,
+Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(t,h),new mxPoint(g+n,h+f),new mxPoint(g+n,h+m),new mxPoint(t,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(t,h+f),new mxPoint(g+n,h),new mxPoint(g+n,h+m-f),new mxPoint(t,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);t=new mxPoint(t,a);d&&(b.x<g||b.x>g+n?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(h,t,b)};mxStyleRegistry.putValue("stepPerimeter",
+mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,h=a.width,n=a.height,m=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?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+n-f),new mxPoint(m,
+g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(m,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);m=new mxPoint(m,a);d&&(b.x<e||b.x>e+h?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(g,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,c,b,d,
+f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(d/2,e);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",R);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,
+b);a.begin();a.moveTo(d/2,e+g);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-g,e/2);a.quadTo((d-e)/2-g,e+g,d/2,e+g);a.quadTo((d+e)/2+g,e+g,(d+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",X);mxUtils.extend(U,mxShape);U.prototype.inset=
+2;U.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,d-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",U);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=32;F.prototype.jettyHeight=12;F.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,
+"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,h=.3*f-c/2,n=.7*f-c/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+c),a.lineTo(b,h+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,h+c),a.lineTo(0,h+c),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",
+F);mxUtils.extend(ea,mxDoubleEllipse);ea.prototype.outerStroke=!0;ea.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",ea);mxUtils.extend(ka,ea);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);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(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,f)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(E,mxRectangleShape);E.prototype.dx=20;E.prototype.dy=20;E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,c,d,b,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,f*g));g=Math.max(e,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,d+e);a.lineTo(c+b,d+e);a.end();a.stroke();a.begin();a.moveTo(c+g,d);a.lineTo(c+g,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",E);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=
-20;S.prototype.redrawPath=function(a,c,d,b,f){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint(c,d),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",S);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,d,b,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(b,0);a.lineTo(b,f);a.end();a.moveTo(0,f/2);a.lineTo(b,f/2);a.end()};mxCellRenderer.registerShape("crossbar",M);mxUtils.extend(N,mxActor);N.prototype.dx=20;N.prototype.dy=20;N.prototype.redrawPath=function(a,c,d,b,f){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint((b+c)/2,d),new mxPoint((b+c)/2,f),new mxPoint((b-c)/2,f),new mxPoint((b-c)/2,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",N);mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=
-function(a,c,d,b,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(f-e)/2;var e=d+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b-c,d),new mxPoint(b-c,0),new mxPoint(b,f/2),new mxPoint(b-c,f),new mxPoint(b-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
-T);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(a,c,d,b,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));d=(f-e)/2;var e=d+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(b-c,d),new mxPoint(b-c,0),new mxPoint(b,
-f/2),new mxPoint(b-c,f),new mxPoint(b-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",D);mxUtils.extend(Q,mxActor);Q.prototype.size=.1;Q.prototype.redrawPath=function(a,c,d,b,f){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,f/2,b,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Q);mxUtils.extend(V,
-mxActor);V.prototype.redrawPath=function(a,c,d,b,f){a.moveTo(0,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,d,b,f){a.moveTo(0,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,0,f);a.quadTo(b/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b/
-2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.8*c),new mxPoint(b,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,d,b,f){c=
-f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f-c),new mxPoint(b/2,f),new mxPoint(0,f-c)],this.isRounded,d,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
-a.moveTo(c+b/2,d+f);a.lineTo(c+b,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,d+f/2);a.lineTo(c+b,d+f/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,d);a.lineTo(c+b/2,d+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,
-c,d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,d+.145*f);a.lineTo(c+.855*b,d+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,d+.145*f);a.lineTo(c+.145*b,d+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,d,b,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,d+f/2);a.lineTo(c+b,d+f/2);
-a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,d,b,f){a.begin();a.moveTo(c,d);a.lineTo(c+b,d);a.lineTo(c+b/2,d+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,d+f);a.lineTo(c+b,d+f);a.lineTo(c+b/2,d+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ma);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,d,b,f){var e=d+f-5;a.begin();a.moveTo(c,d);a.lineTo(c,d+f);
-a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+b,e);a.moveTo(c+b,d);a.lineTo(c+b,d+f);a.moveTo(c+b,e);a.lineTo(c+b-10,e-5);a.moveTo(c+b,e);a.lineTo(c+b-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ta);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,d,b,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
-d,b,f),a.fill(),a.begin(),a.moveTo(c,d),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,d):a.moveTo(c+b,d),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,d+f):a.moveTo(c+b,d+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,d+f):a.moveTo(c,d+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,d-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,
-d,b,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,d),a.lineTo(c+b/2,d+f)):(a.moveTo(c,d+f/2),a.lineTo(c+b,d+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b,f/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,b-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
-ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(f,b);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;d=c+e;var g=(b-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,d);a.lineTo(e,d);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("cross",ca);mxUtils.extend(da,mxActor);da.prototype.size=
-.25;da.prototype.redrawPath=function(a,c,d,b,f){c=Math.min(b,f/2);d=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,f/2);a.lineTo(d,0);a.lineTo(b-c,0);a.quadTo(b,0,b,f/2);a.quadTo(b,f,b-c,f);a.lineTo(d,f);a.close();a.end()};mxCellRenderer.registerShape("display",da);mxUtils.extend(ia,mxConnector);ia.prototype.origPaintEdgeShape=ia.prototype.paintEdgeShape;ia.prototype.paintEdgeShape=function(a,c,d){for(var b=[],f=0;f<c.length;f++)b.push(mxUtils.clone(c[f]));
-var f=a.state.dashed,e=a.state.fixDash;ia.prototype.origPaintEdgeShape.apply(this,[a,b,d]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ia.prototype.origPaintEdgeShape.apply(this,[a,c,d])))};mxCellRenderer.registerShape("filledEdge",ia);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=
-this.format.getSelectionState(),d=a.apply(this,arguments);"umlFrame"==c.style.shape&&d.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return d}}();mxMarker.addMarker("dash",function(a,c,d,b,f,e,g,k,l,n){var t=f*(g+l+1),r=e*(g+l+1);return function(){a.begin();a.moveTo(b.x-t/2-r/2,b.y-r/2+t/2);a.lineTo(b.x+r/2-3*t/2,b.y-3*r/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,d,b,f,e,g,k,l,n){var t=f*(g+l+1),r=e*(g+l+1);return function(){a.begin();
-a.moveTo(b.x-t/2-r/2,b.y-r/2+t/2);a.lineTo(b.x+r/2-3*t/2,b.y-3*r/2-t/2);a.moveTo(b.x-t/2+r/2,b.y-r/2-t/2);a.lineTo(b.x-r/2-3*t/2,b.y-3*r/2+t/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,d,b,f,e,g,k,l,n){var t=b.clone(),r=wa.apply(this,arguments),y=f*(g+2*l),h=e*(g+2*l);return function(){r.apply(this,arguments);a.begin();a.moveTo(t.x-f*l,t.y-e*l);a.lineTo(t.x-2*y+f*l,t.y-2*h+e*l);a.moveTo(t.x-y-h+e*l,t.y-h+y-f*l);a.lineTo(t.x+h-y-e*l,t.y-h-y+f*l);a.stroke()}});
-mxMarker.addMarker("async",function(a,c,d,b,f,e,g,k,l,n){c=f*l*1.118;d=e*l*1.118;f*=g+l;e*=g+l;var t=b.clone();t.x-=c;t.y-=d;b.x+=1*-f-c;b.y+=1*-e-d;return function(){a.begin();a.moveTo(t.x,t.y);k?a.lineTo(t.x-f-e/2,t.y-e+f/2):a.lineTo(t.x+e/2-f,t.y-e-f/2);a.lineTo(t.x-f,t.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,g,k,l,n,t){e*=k+n;g*=k+n;var r=f.clone();return function(){c.begin();c.moveTo(r.x,r.y);l?c.lineTo(r.x-
-e-g/a,r.y-g+e/a):c.lineTo(r.x+g/a-e,r.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,b){return ua(a,["width"],c,function(c,d,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*g/2,e.y+f*c/4-d*g/2)},function(c,d,f,e,g,k){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ua=function(a,c,d,b,f){return O(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
-a.view.scale,k=d?f[0]:f[e],f=d?f[1]:f[e-1],e=f.x-k.x,l=f.y-k.y,n=Math.sqrt(e*e+l*l),k=b.call(this,n,e/n,l/n,k,f);return new mxPoint(k.x/g-c.x,k.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,k=g.length-1;c=a.view.translate;var l=a.view.scale,n=d?g[0]:g[k],g=d?g[1]:g[k-1],k=g.x-n.x,t=g.y-n.y,r=Math.sqrt(k*k+t*t);b.x=(b.x+c.x)*l;b.y=(b.y+c.y)*l;f.call(this,r,k/r,t/r,n,g,b,e)})},oa=function(a){return function(c){return[O(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+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(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,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,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(E,mxRectangleShape);E.prototype.dx=20;E.prototype.dy=20;E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));g=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+d,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",E);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=
+20;S.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};
+mxCellRenderer.registerShape("corner",S);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",M);mxUtils.extend(N,mxActor);N.prototype.dx=20;N.prototype.dy=20;N.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",N);mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=
+function(a,c,b,d,f){var e=f*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=(f-e)/2;var e=b+e,g=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,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
+T);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,
+f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",D);mxUtils.extend(Q,mxActor);Q.prototype.size=.1;Q.prototype.redrawPath=function(a,c,b,d,f){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,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Q);mxUtils.extend(V,
+mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",V);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/
+2,Math.min(f,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,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,c,b,d,f){c=
+f*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,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();
+a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,
+c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);
+a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ma);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);
+a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ta);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,
+b,d,f),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+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,
+b,d,f){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+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",
+ha);mxUtils.extend(ca,mxActor);ca.prototype.size=.2;ca.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var g=(d-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ca);mxUtils.extend(da,mxActor);da.prototype.size=
+.25;da.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",da);mxUtils.extend(ia,mxConnector);ia.prototype.origPaintEdgeShape=ia.prototype.paintEdgeShape;ia.prototype.paintEdgeShape=function(a,c,b){for(var d=[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));
+var f=a.state.dashed,e=a.state.fixDash;ia.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(f,e),ia.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ia);"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,f,e,g,h,n,m){var t=f*(g+n+1),r=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-t/2-r/2,d.y-r/2+t/2);a.lineTo(d.x+r/2-3*t/2,d.y-3*r/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,g,h,n,m){var t=f*(g+n+1),r=e*(g+n+1);return function(){a.begin();
+a.moveTo(d.x-t/2-r/2,d.y-r/2+t/2);a.lineTo(d.x+r/2-3*t/2,d.y-3*r/2-t/2);a.moveTo(d.x-t/2+r/2,d.y-r/2-t/2);a.lineTo(d.x-r/2-3*t/2,d.y-3*r/2+t/2);a.stroke()}});mxMarker.addMarker("circle",wa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,g,h,n,m){var t=d.clone(),r=wa.apply(this,arguments),y=f*(g+2*n),k=e*(g+2*n);return function(){r.apply(this,arguments);a.begin();a.moveTo(t.x-f*n,t.y-e*n);a.lineTo(t.x-2*y+f*n,t.y-2*k+e*n);a.moveTo(t.x-y-k+e*n,t.y-k+y-f*n);a.lineTo(t.x+k-y-e*n,t.y-k-y+f*n);a.stroke()}});
+mxMarker.addMarker("async",function(a,c,b,d,f,e,g,h,n,m){c=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var t=d.clone();t.x-=c;t.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(t.x,t.y);h?a.lineTo(t.x-f-e/2,t.y-e+f/2):a.lineTo(t.x+e/2-f,t.y-e-f/2);a.lineTo(t.x-f,t.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,d,b,f,e,g,h,n,m,t){e*=h+m;g*=h+m;var r=f.clone();return function(){c.begin();c.moveTo(r.x,r.y);n?c.lineTo(r.x-
+e-g/a,r.y-g+e/a):c.lineTo(r.x+g/a-e,r.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,d){return ua(a,["width"],c,function(c,b,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+d;return new mxPoint(e.x+b*c/4+f*g/2,e.y+f*c/4-b*g/2)},function(c,b,f,e,g,h){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*c)/a.view.scale-d})},ua=function(a,c,d,b,f){return O(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=
+a.view.scale,h=d?f[0]:f[e],f=d?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=b.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-c.x,h.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var n=a.view.scale,m=d?g[0]:g[h],g=d?g[1]:g[h-1],h=g.x-m.x,t=g.y-m.y,r=Math.sqrt(h*h+t*t);b.x=(b.x+c.x)*n;b.y=(b.y+c.y)*n;f.call(this,r,h/r,t/r,m,g,b,e)})},oa=function(a){return function(c){return[O(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.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 f=[O(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)&&f.push(ja(d));return f}},xa=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var g=[O(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,
"size",b?f: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 g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ja(e));return g}},Fa=function(a){return function(c){var b=[O(c,["size"],function(c){var b=Math.max(0,
Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.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(ja(c));return b}},va=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(a));return c}},ja=function(a,c){return O(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 f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=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)*f),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))))})},O=function(a,c,b,d,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=d;g.ignoreGrid=null!=f?f:!0;
-if(e){var k=g.positionChanged;g.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ca(a,!0,10),Ca(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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
-a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,k.x,k.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(l.getEvent())&&
-(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.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,f,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,k.x,k.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(l.getEvent())&&
-(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(l.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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,
-e.x+f,e.y-d,k.x,k.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(l.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,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,k,l){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-
-d,k.x,k.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(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=
+if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ca(a,!0,10),Ca(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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*
+a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.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*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
+(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.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,f,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.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*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&
+(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.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,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,
+e.x+f,e.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*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.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,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.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*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.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=[O(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(ja(a,b/2))}return c},label:va(),ext:va(),rectangle:va(),triangle:va(),rhombus:va(),umlLifeline:function(a){return[O(a,
["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",C.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[O(a,["width","height"],function(a){var c=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),b=Math.max(1.5*I.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,
-"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[O(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=
+"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[O(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",m.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(ja(a));return c},cross:function(a){return[O(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",ca.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[O(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.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=[O(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.prototype.size)));
+c.x)/b*2)))})]},note:function(a){return[O(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=[O(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.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(ja(a));return c},dataStorage:function(a){return[O(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.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=[O(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",v.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}),O(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.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}),O(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),
@@ -2560,22 +2562,22 @@ Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",N.prototype.d
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[O(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[O(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[O(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.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:xa(B.prototype.size,!0,null,!0,B.prototype.fixedSize),hexagon:xa(y.prototype.size,!0,.5,!0),curlyBracket:xa(k.prototype.size,!1),display:xa(da.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,q.prototype.size,!0),loopLimit:Da(.5,W.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=O;Graph.handleFactory=ya;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
+a.height-c.y)/a.height))})]},step:xa(A.prototype.size,!0,null,!0,A.prototype.fixedSize),hexagon:xa(y.prototype.size,!0,.5,!0),curlyBracket:xa(n.prototype.size,!1),display:xa(da.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,q.prototype.size,!0),loopLimit:Da(.5,W.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=O;Graph.handleFactory=ya;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=ya[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ya[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=ya[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),oa=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=
-d&&(d=e.transformControlPoint(a,d));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var l=za.x,n=za.y,t=Aa.x,r=Aa.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){a=function(a,c,b){a-=h.x;var d=c-h.y;c=(r*a-t*d)/(l*r-n*t);a=(n*a-l*d)/(n*t-l*r);y?(b&&(h=new mxPoint(h.x+l*c,h.y+n*c),f.push(h)),h=new mxPoint(h.x+t*a,h.y+r*a)):(b&&(h=new mxPoint(h.x+t*a,h.y+r*a),f.push(h)),h=new mxPoint(h.x+
-l*c,h.y+n*c));f.push(h)};var h=k;null==d&&(d=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.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,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};d.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];
+mxConstants.SHAPE_CONNECTOR);a=ya[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),oa=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=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=e.transformControlPoint(a,d));null==h&&null!=c&&(h=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=za.x,m=za.y,t=Aa.x,r=Aa.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,c,b){a-=k.x;var d=c-k.y;c=(r*a-t*d)/(n*r-m*t);a=(m*a-n*d)/(m*t-n*r);y?(b&&(k=new mxPoint(k.x+n*c,k.y+m*c),f.push(k)),k=new mxPoint(k.x+t*a,k.y+r*a)):(b&&(k=new mxPoint(k.x+t*a,k.y+r*a),f.push(k)),k=new mxPoint(k.x+
+n*c,k.y+m*c));f.push(k)};var k=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,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return La.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.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;t.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
+.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;
E.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=
mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;aa.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)];G.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)];F.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)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.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)];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(.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,
+0),!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(.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)];R.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),
@@ -2586,76 +2588,77 @@ mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.protot
new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.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)];C.prototype.constraints=null;V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];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)];X.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()}
-Actions.prototype.init=function(){function a(a){b.escape();var d=b.getDeletableCells(b.getSelectionCells());if(null!=d&&0<d.length){var c=b.model.getParents(d);b.removeCells(d,a);if(null!=c){a=[];for(d=0;d<c.length;d++)b.model.contains(c[d])&&(b.model.isVertex(c[d])||b.model.isEdge(c[d]))&&a.push(c[d]);b.setSelectionCells(a)}}}var d=this.editorUi,e=d.editor,b=e.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){b.openLink(d.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));d.showDialog((new OpenDialog(this)).container,
-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){d.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(d);d.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
-function(){d.showDialog((new PageSetupDialog(d)).container,320,220,!0,!0)}).isEnabled=h;this.addAction("print...",function(){d.showDialog((new PrintDialog(d)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
-function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(b)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();try{var d=mxClipboard.paste(b);if(null!=d){a=!0;for(var c=0;c<d.length&&
-a;c++)a=a&&b.model.isEdge(d[c]);var f=b.view.translate,e=b.view.scale,k=f.x,r=f.y,f=null;if(1==d.length&&a){var l=b.getCellGeometry(d[0]);null!=l&&(f=l.getTerminalPoint(!0))}f=null!=f?f:b.getBoundingBoxFromGeometry(d,a);if(null!=f){var n=Math.round(b.snap(b.popupMenuHandler.triggerX/e-k)),h=Math.round(b.snap(b.popupMenuHandler.triggerY/e-r));b.cellsMoved(d,n-f.x,h-f.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=b.getSelectionCell();b.isEnabled()&&null!=a&&b.getModel().isVertex(a)&&
-(a=b.getCellGeometry(a),null!=a&&(d.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shit+X");this.addAction("pasteSize",function(a){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=d.copiedSize){b.getModel().beginUpdate();try{var e=b.getSelectionCells();for(a=0;a<e.length;a++)if(b.getModel().isVertex(e[a])){var c=b.getCellGeometry(e[a]);null!=c&&(c=c.clone(),c.width=d.copiedSize.width,c.height=d.copiedSize.height,b.getModel().setGeometry(e[a],c))}}finally{b.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(){b.setSelectionCells(b.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){b.turnShapes(b.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",
-function(){b.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){b.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){b.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){b.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!b.isSelectionEmpty()){b.getModel().beginUpdate();try{var a=b.isCellMovable(b.getSelectionCell())?1:0;b.toggleCellStyles(mxConstants.STYLE_MOVABLE,
-a);b.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);b.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);b.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);b.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);b.toggleCellStyles("connectable",a)}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){b.home()},null,null,"Home");this.addAction("exitGroup",function(){b.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){b.enterGroup()},
-null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){b.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){b.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){b.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){b.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==b.getSelectionCount()?b.setCellStyles("container","1"):b.setSelectionCell(b.groupCells(null,
-0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==b.getSelectionCount()&&0==b.getModel().getChildCount(b.getSelectionCell())?b.setCellStyles("container","0"):b.setSelectionCells(b.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){b.removeCellsFromParent()});this.addAction("edit",function(){b.isEnabled()&&b.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=b.getSelectionCell()||b.getModel().getRoot();
-d.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=d.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var b=a.getSelectionCell(),c="";if(mxUtils.isNode(b.value)){var f=b.value.getAttribute("tooltip");null!=f&&(c=f)}c=new TextareaDialog(d,mxResources.get("editTooltip")+":",c,function(c){a.setTooltipForCell(b,c)});d.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=b.getLinkForCell(b.getSelectionCell());
-null!=a&&b.openLink(a)});this.addAction("editLink...",function(){var a=d.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var b=a.getSelectionCell(),c=a.getLinkForCell(b)||"";d.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(b,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.addAction("insertLink...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(a,d){a=mxUtils.trim(a);if(0<a.length){var c=
-null,f=b.getLinkTitle(a);null!=d&&0<d.length&&(c=d[0].iconUrl,f=d[0].name||d[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));var e=b.getFreeInsertPoint(),c=new mxCell(f,new mxGeometry(e.x,e.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;b.setLinkForCell(c,a);b.cellSizeUpdated(c,!0);b.getModel().beginUpdate();try{c=b.addCell(c),
-b.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{b.getModel().endUpdate()}b.setSelectionCell(c);b.scrollCellToVisible(b.getSelectionCell())}})}).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){var a=d.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),c=a.getParentByName(b,"A",a.cellEditor.textarea),f="";if(null==c&&null!=b&&null!=b.getElementsByTagName)for(var e=b.getElementsByTagName("a"),k=0;k<e.length&&null==c;k++)e[k].textContent==
-b.textContent&&(a.selectNode(e[k]),c=e[k]);null!=c&&"A"==c.nodeName&&(f=c.getAttribute("href")||"");var r=a.cellEditor.saveSelection();d.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(r);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var d=0;d<a.length;d++){var c=
-a[d];if(b.getModel().getChildCount(c))b.updateGroupBounds([c],20);else{var f=b.view.getState(c),e=b.getCellGeometry(c);b.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=e&&b.isWrapping(c)?(e=e.clone(),e.height=f.text.boundingBox.height/b.view.scale,b.getModel().setGeometry(c,e)):b.updateCellSize(c)}}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=b.getView().getState(b.getSelectionCell());if(null!=a){var e="1";b.stopEditing();
-b.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,c=b.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=c;c=mxUtils.extractTextWithWhitespace(f.childNodes);b.cellLabelChanged(a.cell,c)}else c=mxUtils.htmlEntities(b.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>")),b.cellLabelChanged(a.cell,b.sanitizeHtml(c));
-b.setCellStyles("html",e);d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),d="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",function(){var a="0",e=b.getView().getState(b.getSelectionCell());
-null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(d,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&b.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){b.zoomTo(1);d.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){b.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
-this.addAction("zoomOut",function(a){b.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){b.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,d=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/a.width/d,(b.container.clientHeight-10)/a.height/d))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=
-a.y*b.view.scale-1,b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-b.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();var a=b.pageFormat,d=b.pageScale;b.zoomTo(Math.floor(20*Math.min((b.container.clientWidth-10)/(2*a.width)/d,(b.container.clientHeight-10)/a.height/d))/20);mxUtils.hasScrollbars(b.container)&&(a=b.getPagePadding(),b.container.scrollTop=Math.min(a.y,
-(b.container.scrollHeight-b.container.clientHeight)/2),b.container.scrollLeft=Math.min(a.x,(b.container.scrollWidth-b.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){b.pageVisible||this.get("pageView").funct();b.zoomTo(Math.floor(20*(b.container.clientWidth-10)/b.pageFormat.width/b.pageScale)/20);if(mxUtils.hasScrollbars(b.container)){var a=b.getPagePadding();b.container.scrollLeft=Math.min(a.x*b.view.scale,(b.container.scrollWidth-
-b.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*b.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
-parseInt(100*b.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){b.setGridEnabled(!b.isGridEnabled());d.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return b.isGridEnabled()});m.setEnabled(!1);
-m=this.addAction("guides",function(){b.graphHandler.guidesEnabled=!b.graphHandler.guidesEnabled;d.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){b.tooltipHandler.setEnabled(!b.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=
-new ChangePageSetup(d);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!b.foldingEnabled;b.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.foldingEnabled});m.isEnabled=h;m=this.addAction("scrollbars",function(){d.setScrollbars(!d.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){d.setPageVisible(!b.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return b.pageVisible});
-m=this.addAction("connectionArrows",function(){b.connectionArrowsEnabled=!b.connectionArrowsEnabled;d.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return b.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){b.setConnectable(!b.connectionHandler.isEnabled());d.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return b.connectionHandler.isEnabled()});
-m=this.addAction("copyConnect",function(){b.connectionHandler.setCreateTarget(!b.connectionHandler.isCreateTarget());d.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);b.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(d.showDialog((new AboutDialog(d)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,d,c,f){return this.addAction(a,function(){if(null!=c&&b.cellEditor.isContentEditing())c();else{b.stopEditing(!1);b.getModel().beginUpdate();try{b.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
-d),(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&b.replaceElement(a)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?b.updateLabelElements(b.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&b.replaceElement(a)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.updateLabelElements(b.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&
-b.replaceElement(a)})}finally{b.getModel().endUpdate()}}},null,null,f)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){d.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
-this.addAction("strokeColor...",function(){d.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){d.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){d.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
-this.addAction("vertical",function(){d.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){d.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_DASHED,null),b.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});
-this.addAction("dashed",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_DASHED,"1"),b.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("dotted",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_DASHED,"1"),b.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
-"1 4"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("sharp",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),b.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});
-this.addAction("rounded",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),b.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!b.isSelectionEmpty()&&b.isEnabled()){b.getModel().beginUpdate();try{var a=b.getSelectionCells(),e=b.view.getState(a[0]),
-c=null!=e?e.style:b.getCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")?"0":"1";b.setCellStyles(mxConstants.STYLE_ROUNDED,f);b.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("curved",function(){b.getModel().beginUpdate();try{b.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),b.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=b.view.getState(b.getSelectionCell()),e="1";null!=a&&null!=b.getFoldingImage(a)&&(e="0");b.setCellStyles("collapsible",e);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",b.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var a=b.getSelectionCells();if(null!=a&&0<a.length){var d=b.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(a[0])||"",function(c){null!=c&&b.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){b.isEnabled()&&!b.isSelectionEmpty()&&d.setDefaultStyle(b.getSelectionCell())},null,null,Editor.ctrlKey+
-"+Shift+D");this.addAction("clearDefaultStyle",function(){b.isEnabled()&&d.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=b.getSelectionCell();if(null!=a&&b.getModel().isEdge(a)){var d=e.graph.selectionCellsHandler.getHandler(a);if(d instanceof mxEdgeHandler){for(var c=b.view.translate,f=b.view.scale,g=c.x,c=c.y,a=b.getModel().getParent(a),k=b.getCellGeometry(a);b.getModel().isVertex(a)&&null!=k;)g+=k.x,c+=k.y,a=b.getModel().getParent(a),k=
-b.getCellGeometry(a);g=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g));f=Math.round(b.snap(b.popupMenuHandler.triggerY/f-c));d.addPointAt(d.state,g,f)}}});this.addAction("removeWaypoint",function(){var a=d.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=b.getSelectionCells();if(null!=a){a=b.addAllEdges(a);b.getModel().beginUpdate();try{for(var d=0;d<a.length;d++){var c=a[d];if(b.getModel().isEdge(c)){var f=
-b.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,b.getModel().setGeometry(c,f))}}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){b.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
-function(){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=b.getView().getState(b.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=b.cellEditor.saveSelection();d.showImageDialog(a,c,function(a,c,d){if(b.cellEditor.isContentEditing())b.cellEditor.restoreSelection(f),b.insertImage(a,c,d);else{var e=b.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;b.getModel().beginUpdate();
-try{if(0==e.length){var k=b.getFreeInsertPoint(),g=e=[b.insertVertex(b.getDefaultParent(),null,"",k.x,k.y,c,d,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];b.fireEvent(new mxEventObject("cellsInserted","cells",g))}b.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var r=b.view.getState(e[0]),h=null!=r?r.style:b.getCellStyle(e[0]);"image"!=h[mxConstants.STYLE_SHAPE]&&"label"!=h[mxConstants.STYLE_SHAPE]?b.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-e):0==a.length&&b.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==b.getSelectionCount()&&null!=c&&null!=d){var y=e[0],t=b.getModel().getGeometry(y);null!=t&&(t=t.clone(),t.width=c,t.height=d,b.getModel().setGeometry(y,t))}}finally{b.getModel().endUpdate()}null!=g&&(b.setSelectionCells(g),b.scrollCellToVisible(g[0]))}}},b.cellEditor.isContentEditing(),!b.cellEditor.isContentEditing())}}).isEnabled=h;this.addAction("insertImage...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
-(b.clearSelection(),d.actions.get("image").funct())}).isEnabled=h;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers"))):
-this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));m=this.addAction("outline",
-mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
-null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,d,e,b,h){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,d,e,b,h))};Actions.prototype.put=function(a,d){return this.actions[a]=d};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,d,e,b,h){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(d);this.enabled=null!=e?e:!0;this.iconCls=b;this.shortcut=h;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,d){mxEventSource.call(this);this.ui=a;this.data=d||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,d,e,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,d,e){};DrawioFile.prototype.saveFile=function(a,d,e,b){};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.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,e){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,d,e){};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.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){var e=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
-this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);
-this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
-DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<span title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</span>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("span"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,d,e,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<d?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),
-mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=e&&e(null)}),a)};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.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,d){if(null!=a&&null!=d){var e=a.lastIndexOf("."),b=0<e?a.substring(e):"",e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return a==d};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,d,e,b){DrawioFile.call(this,a,d);this.title=e;this.mode=b?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,d,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};
-LocalFile.prototype.saveFile=function(a,d,e,b){this.title=a;this.updateFileData();d=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&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(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):m(d)};LocalFile.prototype.rename=function(a,d,e){this.title=a;this.descriptorChanged();null!=d&&d()};
-LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(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":
+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,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.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 f=d.view.translate,e=d.view.scale,n=f.x,r=f.y,f=null;if(1==b.length&&a){var h=d.getCellGeometry(b[0]);null!=h&&(f=h.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/e-n)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/e-r));d.cellsMoved(b,m-f.x,k-f.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 e=d.getSelectionCells();for(a=0;a<e.length;a++)if(d.getModel().isVertex(e[a])){var c=d.getCellGeometry(e[a]);null!=c&&(c=c.clone(),c.width=b.copiedSize.width,c.height=b.copiedSize.height,d.getModel().setGeometry(e[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,
+a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},
+null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,
+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 f=d.value.getAttribute("tooltip");null!=f&&(c=f)}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.addAction("insertLink...",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,f=d.getLinkTitle(a);null!=b&&0<b.length&&(c=b[0].iconUrl,f=b[0].name||b[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));var e=d.getFreeInsertPoint(),c=new mxCell(f,new mxGeometry(e.x,e.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),
+d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),c=a.getParentByName(d,"A",a.cellEditor.textarea),f="";if(null==c&&null!=d&&null!=d.getElementsByTagName)for(var e=d.getElementsByTagName("a"),n=0;n<e.length&&null==c;n++)e[n].textContent==
+d.textContent&&(a.selectNode(e[n]),c=e[n]);null!=c&&"A"==c.nodeName&&(f=c.getAttribute("href")||"");var r=a.cellEditor.saveSelection();b.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(r);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 f=d.view.getState(c),e=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=e&&d.isWrapping(c)?(e=e.clone(),e.height=f.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,e)):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 e="1";d.stopEditing();
+d.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,c=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=c;c=mxUtils.extractTextWithWhitespace(f.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",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"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",e=d.getView().getState(d.getSelectionCell());
+null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
+this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){d.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=
+a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,
+(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-
+d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
+parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);
+l=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=
+new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});
+l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
+l=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a=
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var 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"));l=mxUtils.bind(this,function(a,b,c,f){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,f)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
+this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
+this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
+this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
+"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
+this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.view.getState(a[0]),
+c=null!=e?e.style:d.getCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+
+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var c=d.view.translate,f=d.view.scale,g=c.x,c=c.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)g+=n.x,c+=n.y,a=d.getModel().getParent(a),n=
+d.getCellGeometry(a);g=Math.round(d.snap(d.popupMenuHandler.triggerX/f-g));f=Math.round(d.snap(d.popupMenuHandler.triggerY/f-c));b.addPointAt(b.state,g,f)}}});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 f=
+d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c,f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",
+function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,c,b);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;d.getModel().beginUpdate();
+try{if(0==e.length){var n=d.getFreeInsertPoint(),g=e=[d.insertVertex(d.getDefaultParent(),null,"",n.x,n.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var r=d.view.getState(e[0]),k=null!=r?r.style:d.getCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=c&&null!=b){var y=e[0],t=d.getModel().getGeometry(y);null!=t&&(t=t.clone(),t.width=c,t.height=b,d.getModel().setGeometry(y,t))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=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");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
+mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
+null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,d){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
+DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};
+DrawioFile.prototype.move=function(a,b,e){};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(){var a=this.getData();null!=a&&this.ui.setFileData(a);this.changeListener=mxUtils.bind(this,function(a,e){var b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",
+this.changeListener);this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",
+this.changeListener)};
+DrawioFile.prototype.addAllSavedStatus=function(){var a=this.ui.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile?this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+mxUtils.htmlEntities(mxResources.get("allChangesSaved"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null,
+0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()})))};
+DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||this.isModified()||this.addAllSavedStatus()}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus()};
+DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),a=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):
+null,null!=a&&0<a.length?mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()})):this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+"</div>"))};
+DrawioFile.prototype.autosave=function(a,b,e,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.autosaveThead==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();
+null!=e&&e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};
+DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};DrawioFile.prototype.destroy=function(){this.clearAutosave();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)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
+LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
+LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(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.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
@@ -2667,8 +2670,9 @@ dispName:"Source Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none
type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"loopStyle",dispName:"Loop Style",type:"bool",defVal:!0}];Editor.commonVertexProperties=[{type:"separator"},{name:"fillOpacity",dispName:"Fill Opacity",
type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",
type:"enum",defVal:"east",enumList:[{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Port Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"east",dispName:"East"},{val:"north",dispName:"North"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Port Const. Rot.",type:"bool",defVal:!1},{name:"snapToPoint",dispName:"Snap to Point",
-type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",
-type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",
+dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",
+dispName:"Movable",type:"bool",defVal:!0},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
Editor.shadowOptionEnabled=!0;Editor.config=null;Editor.configVersion=null;Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;
Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
@@ -2677,17 +2681,17 @@ a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarW
Editor.guid=function(){return Editor.s4()+Editor.s4()+"-"+Editor.s4()+"-"+Editor.s4()+"-"+Editor.s4()+"-"+Editor.s4()+Editor.s4()+Editor.s4()};Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=
b[0],d=b.getElementsByTagName("div");null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:
mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var f=new mxCodec(d.ownerDocument);f.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 d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=
+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(H){}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 f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);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 e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&
+"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&
null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:"https://math.draw.io/current/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,
showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{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 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 f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};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,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);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 l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.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 q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
"1"==urlParams.embed||this.editorUi.editor.chromeless?q.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,
@@ -2714,45 +2718,45 @@ stroke:"#008a00",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#1ba1e2",font:"#ffffff"
font:"#ffffff"},{fill:"#6d8764",stroke:"#6d8764",font:"#ffffff"},{fill:"#647687",stroke:"#647687",font:"#ffffff"},{fill:"#76608a",stroke:"#76608a",font:"#ffffff"},{fill:"#a0522d",stroke:"#a0522d",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 f in c){for(var e=!1,d=0;d<a.length;d++)if(a[d].name==f&&a[d].type==c[f].type){e=!0;break}e||delete c[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=
-!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(A){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(B){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
f.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],c,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==b.length&&0==e);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var g=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 g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){t.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],k=b.parentRow.nextSibling;k&&k.getAttribute("data-pName")==a;)g.push(k.getAttribute("data-pValue")),k=k.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>
-b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,c,t.getSelectionCells());f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var l=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var h=n.length;h<c;h++)n.push(l);n=n.join(",");t.setCellStyles(b.dependentProps[a],n,t.getSelectionCells());
-f.push(b.dependentProps[a]);e.push(n)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var f=document.createElement("div");f.style.width="32px";f.style.height=
-"4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,k){null!=c&&(c=c.split(","),h.push({name:a,
-values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var l=g,r=0;null!=l.nextSibling;)if(l.nextSibling.getAttribute("data-pName")==a)l=l.nextSibling,r++;else break;var t={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=n(a,"",t,0==r%2,k);d(a,f,t);l.parentNode.insertBefore(r,l.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(a,c,b,d,f,e,g){if(0<f){var k=Array(f);c=null!=c?c.split(","):[];for(var l=0;l<f;l++)k[l]=null!=c[l]?c[l]:null!=d?d:"";h.push({name:a,values:k,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function l(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function n(c,b,n,t,h){var v=n.dispName,w=n.type,y=document.createElement("tr");y.className="gePropRow"+
-(h?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";y.setAttribute("data-pName",c);y.setAttribute("data-pValue",b);t=!1;null!=n.index&&(y.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",t=!0);var x=document.createElement("td");x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(x.style.textAlign="right");y.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==w)x.appendChild(e(c,b,n));else if("bool"==w||"boolean"==
-w)x.appendChild(l(c,b,n));else if("enum"==w){var m=n.enumList;for(h=0;h<m.length;h++)if(v=m[h],v.val==b){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(r,function(){var e=document.createElement("select");f(x,e);for(var g=0;g<m.length;g++){var k=m[g],l=document.createElement("option");l.value=mxUtils.htmlEntities(k.val);l.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));e.appendChild(l)}e.value=
-b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);d(c,a,n)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==w?x.appendChild(g(c,b,n.subType,n.subDefVal,n.countProperty,y,h)):"staticArr"==w?x.appendChild(k(c,b,n.subType,n.subDefVal,n.size,y,h)):(x.innerHTML=b,mxEvent.addListener(x,"click",mxUtils.bind(r,function(){function e(){var a=g.value;null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==
-w?parseInt(a):a)+"");d(c,a,n)}var g=document.createElement("input");f(x,g,!0);g.value=b;g.className="gePropEditor";if("int"==w||"float"==w)g.type="number",g.step="int"==w?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max));a.appendChild(g);mxEvent.addListener(g,"change",e);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})})));n.isDeletable&&(h=mxUtils.button("-",mxUtils.bind(r,
-function(a){d(c,"",n,n.index);mxEvent.consume(a)})),h.style.height="16px",h.style.width="25px",h.style["float"]="right",h.className="geColorBtn",x.appendChild(h));y.appendChild(x);return y}var r=this,t=this.editorUi.editor.graph,h=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var w=document.createElement("tr");w.className="gePropHeader";var y=document.createElement("th");y.className="gePropHeaderCell";var m=
-document.createElement("img");m.src=Sidebar.prototype.expandedImage;y.appendChild(m);mxUtils.write(y,mxResources.get("property",null,"Property"));w.style.cursor="pointer";var p=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else m.src=Sidebar.prototype.expandedImage,
-b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;p()});w.appendChild(y);y=document.createElement("th");y.className="gePropHeaderCell";y.innerHTML=mxResources.get("value",null,"Value");w.appendChild(y);v.appendChild(w);var B=!1,z=!1,q;for(q in c){var w=c[q],u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)z=!z;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||
-c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,M=[],N=[],y=0;y<S.length;y++){var T=b.style[S[y]];N.push(c[S[y]].subDefVal);M.push(null!=T?T.split(","):[])}w.dependentPropsDefVal=N;w.dependentPropsVals=M}v.appendChild(n(q,u,w,B,z));B=!B}}for(y=0;y<h.length;y++)for(w=h[y],c=w.parentRow,b=0;b<w.values.length;b++)q=n(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},
-0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(v);p();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 f=d.getModel().getStyle(b[c]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,e[g]);var k=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,
-a.fill||mxUtils.getValue(k,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(k,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(k,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(k,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(k,
-mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(k,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(k,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(k,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(b[c],f)}}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"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),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,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(k);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.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){t.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],h=b.parentRow.nextSibling;h&&h.getAttribute("data-pName")==a;)g.push(h.getAttribute("data-pValue")),h=h.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>
+b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,c,t.getSelectionCells());f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],m=b.dependentPropsVals[a];if(m.length>c)m=m.slice(0,c);else for(var k=m.length;k<c;k++)m.push(n);m=m.join(",");t.setCellStyles(b.dependentProps[a],m,t.getSelectionCells());
+f.push(b.dependentProps[a]);e.push(m)}r.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var f=document.createElement("div");f.style.width="32px";f.style.height=
+"4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(r,function(e){this.editorUi.pickColor(c,function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,h){null!=c&&(c=c.split(","),k.push({name:a,
+values:c,type:b,defVal:f,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:h}));btn=mxUtils.button("+",mxUtils.bind(r,function(c){for(var n=g,r=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,r++;else break;var t={type:b,parentRow:g,index:r,isDeletable:!0,defVal:f,countProperty:e},r=m(a,"",t,0==r%2,h);d(a,f,t);n.parentNode.insertBefore(r,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function h(a,c,b,d,f,e,g){if(0<f){var h=Array(f);c=null!=c?c.split(","):[];for(var n=0;n<f;n++)h[n]=null!=c[n]?c[n]:null!=d?d:"";k.push({name:a,values:h,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function m(c,b,m,t,k){var v=m.dispName,w=m.type,y=document.createElement("tr");y.className="gePropRow"+
+(k?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";y.setAttribute("data-pName",c);y.setAttribute("data-pValue",b);t=!1;null!=m.index&&(y.setAttribute("data-index",m.index),v=(null!=v?v:"")+"["+m.index+"]",t=!0);var x=document.createElement("td");x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(x.style.textAlign="right");y.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==w)x.appendChild(e(c,b,m));else if("bool"==w||"boolean"==
+w)x.appendChild(n(c,b,m));else if("enum"==w){var l=m.enumList;for(k=0;k<l.length;k++)if(v=l[k],v.val==b){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(r,function(){var e=document.createElement("select");f(x,e);for(var g=0;g<l.length;g++){var h=l[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(h.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));e.appendChild(n)}e.value=
+b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);d(c,a,m)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==w?x.appendChild(g(c,b,m.subType,m.subDefVal,m.countProperty,y,k)):"staticArr"==w?x.appendChild(h(c,b,m.subType,m.subDefVal,m.size,y,k)):(x.innerHTML=b,mxEvent.addListener(x,"click",mxUtils.bind(r,function(){function e(){var a=g.value,a=0==a.length&&"string"!=w?0:a;m.allowAuto&&("auto"==a.trim().toLowerCase()?
+(a="auto",w="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=m.min&&a<m.min?a=m.min:null!=m.max&&a>m.max&&(a=m.max);a=mxUtils.htmlEntities(("int"==w?parseInt(a):a)+"");d(c,a,m)}var g=document.createElement("input");f(x,g,!0);g.value=b;g.className="gePropEditor";"int"!=w&&"float"!=w||m.allowAuto||(g.type="number",g.step="int"==w?"1":"any",null!=m.min&&(g.min=parseFloat(m.min)),null!=m.max&&(g.max=parseFloat(m.max)));a.appendChild(g);mxEvent.addListener(g,"change",e);mxEvent.addListener(g,"keypress",
+function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})})));m.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(r,function(a){d(c,"",m,m.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",x.appendChild(k));y.appendChild(x);return y}var r=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 w=document.createElement("tr");w.className="gePropHeader";var y=document.createElement("th");y.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;y.appendChild(l);mxUtils.write(y,mxResources.get("property",null,"Property"));w.style.cursor="pointer";var p=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(r.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-
+1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(aa){}}else l.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(w,"click",function(){r.editorUi.propertiesCollapsed=!r.editorUi.propertiesCollapsed;p()});w.appendChild(y);y=document.createElement("th");y.className="gePropHeaderCell";y.innerHTML=mxResources.get("value",null,"Value");w.appendChild(y);v.appendChild(w);var A=!1,z=!1,q;for(q in c){var w=
+c[q],u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):w.defVal;if("separator"==w.type)z=!z;else{if("staticArr"==w.type)w.size=parseInt(b.style[w.sizeProperty]||c[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var S=w.dependentProps,M=[],N=[],y=0;y<S.length;y++){var T=b.style[S[y]];N.push(c[S[y]].subDefVal);M.push(null!=T?T.split(","):[])}w.dependentPropsDefVal=N;w.dependentPropsVals=M}v.appendChild(m(q,u,w,A,z));A=!A}}for(y=0;y<k.length;y++)for(w=k[y],c=w.parentRow,b=0;b<w.values.length;b++)q=
+m(w.name,w.values[b],{type:w.type,parentRow:w.parentRow,isDeletable:w.isDeletable,index:b,defVal:w.defVal,countProperty:w.countProperty,size:w.size},0==b%2,w.flipBkg),c.parentNode.insertBefore(q,c.nextSibling),c=q;a.appendChild(v);p();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 f=d.getModel().getStyle(b[c]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
+e[g]);var h=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,null)),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,
+a.font||mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(h,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(h,mxConstants.STYLE_FONTCOLOR,
+null))));d.getModel().setStyle(b[c],f)}}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"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+
+g}f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),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,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);
+var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var h=document.createElement("div");h.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(h));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])}));b(g);b(h);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,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var k=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}k.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}n.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var 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("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}return d.apply(this,arguments)}};var r=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return r.apply(this,arguments)&&!mxClient.IS_SF};var l=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=l.apply(this,arguments);if(null==
-c){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&&(c=this.globalUrlVars[a])}return c};var n=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){n.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||
+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}return d.apply(this,arguments)}};var r=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return r.apply(this,arguments)&&!mxClient.IS_SF};var h=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=h.apply(this,arguments);if(null==
+c){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&&(c=this.globalUrlVars[a])}return c};var m=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){m.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 w=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){w.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 f=this.model.getCell(a[b]);null!=f&&c.push(f)}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 f=0;f<c.length;f++)if(this.model.isVertex(c[f])||this.model.isEdge(c[f])){var e=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),k=0;k<a.length&&g;k++)var l=mxUtils.trim(a[k]).toLowerCase(),
-g=g&&(0==l.length||0<=mxUtils.indexOf(e,l));else g=0==a.length;g&&d.push(c[f])}}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 f=0;f<
+d},d));else{var f=this.model.getCell(a[b]);null!=f&&c.push(f)}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 f=0;f<c.length;f++)if(this.model.isVertex(c[f])||this.model.isEdge(c[f])){var e=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",g=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),h=0;h<a.length&&g;h++)var n=mxUtils.trim(a[h]).toLowerCase(),
+g=g&&(0==n.length||0<=mxUtils.indexOf(e,n));else g=0==a.length;g&&d.push(c[f])}}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 f=0;f<
a.length;f++)this.highlightCell(a[f],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 f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,f,!1);null!=d&&(e.opacity=d);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},
1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=d.createElementNS?
d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);
@@ -2766,244 +2770,245 @@ mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mx
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];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.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 v=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,g,k,l,n){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){t.value=Math.max(1,
-Math.min(k,Math.max(parseInt(t.value),parseInt(v.value))));v.value=Math.max(1,Math.min(k,Math.min(parseInt(t.value),parseInt(v.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,k=0,l=ga.get(),n=1/c.pageScale,r=y.checked;if(r)var n=parseInt(Q.value),h=parseInt(V.value),n=Math.min(l.height*h/(e.height/c.view.scale),l.width*n/(e.width/c.view.scale));else n=parseInt(p.value)/(100*c.pageScale),isNaN(n)&&(d=1/c.pageScale,p.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*
-d);l.height=Math.ceil(l.height*d);n*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*l.width,k-=e.y*l.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,n,l,0,g,k,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var w=b.writeHead;b.writeHead=function(c){w.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 v=b.renderPage;b.renderPage=
-function(a,c,b,d,f,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var k=v.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}b.open(null,null,f,!0)}else{l=c.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";b.backgroundColor=l;b.autoOrigin=r;b.appendGraph(c,n,g,k,f,!0)}return b}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,
-W.value="100 %");var d=.75*d,e=v.value,g=t.value,k=!r.checked,n=null;k&&(k=e==l&&g==l);if(!k&&null!=a.pages&&a.pages.length){var h=0,k=a.pages.length-1;r.checked||(h=parseInt(e)-1,k=parseInt(g)-1);for(var w=h;w<=k;w++){var m=a.pages[w],e=m==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,h=!1,x=null,B=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(g=m.viewState.pageVisible,h=m.viewState.mathEnabled,x=m.viewState.background,
-B=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(h="0"!=m.mapping.diagramMap.get("mathEnabled"),x=m.mapping.diagramMap.get("background"),B=m.mapping.diagramMap.get("backgroundImage"),B=null!=B&&0<B.length?JSON.parse(B):null);e.background=x;e.backgroundImage=null!=B?new mxImage(B.src,B.width,B.height):null;e.pageVisible=g;e.mathEnabled=h;var q=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?w+1:q.apply(this,arguments)};document.body.appendChild(e.container);
-a.updatePageRoot(m);e.model.setRoot(m.root)}n=b(e,n,w!=k);e!=f&&e.container.parentNode.removeChild(e.container)}}else n=b(f);n.mathEnabled&&(k=n.wnd.document,k.writeln('<script type="text/x-mathjax-config">'),k.writeln("MathJax.Hub.Config({"),k.writeln("showMathMenu: false,"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),k.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),k.writeln('"HTML-CSS": {'),
-k.writeln("imageFont: null"),k.writeln("},"),k.writeln("TeX: {"),k.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),k.writeln("},"),k.writeln("tex2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("},"),k.writeln("asciimath2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("}"),k.writeln("});"),c&&(k.writeln("MathJax.Hub.Queue(function () {"),k.writeln("window.print();"),k.writeln("});")),k.writeln("\x3c/script>"),k.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));
-n.closeDocument();!n.mathEnabled&&c&&PrintDialog.printPreview(n)}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var k=1,l=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";
-r.setAttribute("value","all");r.setAttribute("type","radio");r.setAttribute("name","pages-printdialog");n.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var h=r.cloneNode(!0);r.setAttribute("checked","checked");h.setAttribute("value","range");n.appendChild(h);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
-v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";n.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var t=v.cloneNode(!0);n.appendChild(t);mxEvent.addListener(v,"focus",function(){h.checked=!0});mxEvent.addListener(t,"focus",function(){h.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(t,"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
-a.pages[g]){l=g+1;v.value=l;t.value=l;break}v.setAttribute("max",k);t.setAttribute("max",k);1<k&&e.appendChild(n);var w=document.createElement("div");w.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");w.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));w.appendChild(g);var p=document.createElement("input");p.style.cssText=
-"margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";w.appendChild(p);mxEvent.addListener(p,"focus",function(){m.checked=!0});e.appendChild(w);var n=n.cloneNode(!1),y=m.cloneNode(!0);y.setAttribute("value","fit");m.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(y);n.appendChild(g);w=document.createElement("table");w.style.display="inline-block";var B=document.createElement("tbody"),
+[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 v=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,g,h,n,m){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){w.value=Math.max(1,
+Math.min(h,Math.max(parseInt(w.value),parseInt(v.value))));v.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(v.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),g=0,h=0,n=ga.get(),m=1/c.pageScale,r=y.checked;if(r)var m=parseInt(Q.value),k=parseInt(V.value),m=Math.min(n.height*k/(e.height/c.view.scale),n.width*m/(e.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(d=1/c.pageScale,p.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*
+d);n.height=Math.ceil(n.height*d);m*=d;!r&&c.pageVisible?(e=c.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,n,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var t=b.writeHead;b.writeHead=function(c){t.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 v=b.renderPage;b.renderPage=
+function(a,c,b,d,f,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var h=v.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=r;b.appendGraph(c,m,g,h,f,!0)}return b}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,
+W.value="100 %");var d=.75*d,e=v.value,g=w.value,h=!r.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var k=0,h=a.pages.length-1;r.checked||(k=parseInt(e)-1,h=parseInt(g)-1);for(var t=k;t<=h;t++){var l=a.pages[t],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,x=null,A=null;null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(g=l.viewState.pageVisible,k=l.viewState.mathEnabled,x=l.viewState.background,
+A=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(k="0"!=l.mapping.diagramMap.get("mathEnabled"),x=l.mapping.diagramMap.get("background"),A=l.mapping.diagramMap.get("backgroundImage"),A=null!=A&&0<A.length?JSON.parse(A):null);e.background=x;e.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;e.pageVisible=g;e.mathEnabled=k;var q=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:q.apply(this,arguments)};document.body.appendChild(e.container);
+a.updatePageRoot(l);e.model.setRoot(l.root)}m=b(e,m,t!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=b(f);m.mathEnabled&&(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln("showMathMenu: false,"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln('"HTML-CSS": {'),
+h.writeln("imageFont: null"),h.writeln("},"),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),c&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));
+m.closeDocument();!m.mathEnabled&&c&&PrintDialog.printPreview(m)}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var h=1,n=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";
+r.setAttribute("value","all");r.setAttribute("type","radio");r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var k=r.cloneNode(!0);r.setAttribute("checked","checked");k.setAttribute("value","range");m.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
+v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";m.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var w=v.cloneNode(!0);m.appendChild(w);mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(w,"focus",function(){k.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
+a.pages[g]){n=g+1;v.value=n;w.value=n;break}v.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(m);var t=document.createElement("div");t.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");t.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));t.appendChild(g);var p=document.createElement("input");p.style.cssText=
+"margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";t.appendChild(p);mxEvent.addListener(p,"focus",function(){l.checked=!0});e.appendChild(t);var m=m.cloneNode(!1),y=l.cloneNode(!0);y.setAttribute("value","fit");l.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(y);m.appendChild(g);t=document.createElement("table");t.style.display="inline-block";var A=document.createElement("tbody"),
q=document.createElement("tr"),u=q.cloneNode(!0),E=document.createElement("td"),S=E.cloneNode(!0),M=E.cloneNode(!0),N=E.cloneNode(!0),T=E.cloneNode(!0),D=E.cloneNode(!0);E.style.textAlign="right";N.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var Q=document.createElement("input");Q.style.cssText="margin:0 8px 0 8px;";Q.setAttribute("value","1");Q.setAttribute("min","1");Q.setAttribute("type","number");Q.style.width="40px";S.appendChild(Q);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));M.appendChild(g);mxUtils.write(N,mxResources.get("fitToBy"));var V=Q.cloneNode(!0);T.appendChild(V);mxEvent.addListener(Q,"focus",function(){y.checked=!0});mxEvent.addListener(V,"focus",function(){y.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));D.appendChild(g);q.appendChild(E);q.appendChild(S);q.appendChild(M);u.appendChild(N);u.appendChild(T);u.appendChild(D);B.appendChild(q);B.appendChild(u);w.appendChild(B);
-n.appendChild(w);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ga=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);
-var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";n.appendChild(W);e.appendChild(n);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(w=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-w.className="geBtn",g.appendChild(w));PrintDialog.previewEnabled&&(w=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),w.className="geBtn",g.appendChild(w));w=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});w.className="geBtn gePrimaryBtn";g.appendChild(w);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var B=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)):(B.apply(this,arguments),null!=this.mathEnabled&&
+mxResources.get("fitToSheetsAcross"));M.appendChild(g);mxUtils.write(N,mxResources.get("fitToBy"));var V=Q.cloneNode(!0);T.appendChild(V);mxEvent.addListener(Q,"focus",function(){y.checked=!0});mxEvent.addListener(V,"focus",function(){y.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));D.appendChild(g);q.appendChild(E);q.appendChild(S);q.appendChild(M);u.appendChild(N);u.appendChild(T);u.appendChild(D);A.appendChild(q);A.appendChild(u);t.appendChild(A);
+m.appendChild(t);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ga=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
+var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";m.appendChild(W);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+t.className="geBtn",g.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className="geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var A=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)):(A.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,d,e,b,h,m,p,q,u,c,f){u=null!=u?u:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=d){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k,d);g.appendChild(k)}d=document.createElement("div");d.style.padding="6px";d.innerHTML=e;g.appendChild(d);e=document.createElement("div");
-e.style.marginTop="16px";e.style.textAlign="center";null!=m&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),d.className="geBtn",e.appendChild(d),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(b,function(){u&&a.hideDialog();null!=h&&h()});r.className="geBtn";e.appendChild(r);null!=p&&(b=mxUtils.button(p,function(){u&&a.hideDialog();null!=q&&q()}),b.className="geBtn gePrimaryBtn",
-e.appendChild(b));this.init=function(){r.focus()};g.appendChild(e);this.container=g};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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";
+var ErrorDialog=function(a,b,e,d,k,l,p,q,u,c,f){u=null!=u?u:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="16px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";mxUtils.write(n,b);g.appendChild(n)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=e;g.appendChild(b);e=document.createElement("div");
+e.style.marginTop="16px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var r=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});r.className="geBtn";e.appendChild(r);null!=p&&(d=mxUtils.button(p,function(){u&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",
+e.appendChild(d));this.init=function(){r.focus()};g.appendChild(e);this.container=g};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;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.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(r){}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(l){}};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(r){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(r){}})();
+null!=a&&6<a.length}catch(h){}};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(r){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(r){}})();
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}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight=
"10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",d.appendChild(g),c.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,
b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.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=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.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(k){}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 e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var r=mxUtils.parseXml(c),l=this.editor.extractGraphModel(r.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=
-l?mxUtils.getXml(l):""}catch(n){}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))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();
-try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(d[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,l,0==e?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,r,l,n,h,v,m){b=null!=
-b?b:this.editor.graph;r=null!=r?r:!1;v=null!=v?v:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var k=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(k);if(b.decompress(g)!=k)return k;k=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(k,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(k)}m?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),g.removeAttribute("version"),
-g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!l&&!r&&(n||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(l||!r&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,h,v,f);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){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=this.pages[f].mapping;
-this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),e.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,r,l,n,h,v){r=null!=r?r:!0;n=null!=n?n:this.getXmlFileData(r,null!=l?l:!1);v=null!=v?v:this.getCurrentFile();l=this.editor.graph;
-if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=v&&/(\.svg)$/i.test(v.getTitle()))){l=this.createTemporaryGraph(l.getStylesheet());var c=l.getGlobalVariable,f=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(f.root)}a=this.createFileData(n,l,v,window.location.href,a,b,d,e,r,h);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);return a};
-EditorUi.prototype.getHtml=function(a,b,d,e,r,l){l=null!=l?l:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==r&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",l);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=r&&(r=r.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.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(n){}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 e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var r=mxUtils.parseXml(c),h=this.editor.extractGraphModel(r.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=
+h?mxUtils.getXml(h):""}catch(m){}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))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();
+try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var h=this.updatePageRoot(new DiagramPage(d[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
+this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,r,h,m,k,v,l){b=null!=
+b?b:this.editor.graph;r=null!=r?r:!1;v=null!=v?v:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}l?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(h||!r&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=
+App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,v,f);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++){var f=
+this.pages[d].mapping;if(this.currentPage!=this.pages[d]&&null!=f&&f.needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel);f.writeRealtimeToNode(e);mxUtils.setTextContent(this.pages[d].node,this.editor.graph.compressNode(e));f.needsUpdate=!1}c.appendChild(this.pages[d].node)}return c};EditorUi.prototype.getFileData=function(a,b,d,e,r,h,m,k,v){r=null!=r?r:!0;m=null!=m?m:this.getXmlFileData(r,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 c=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(m,h,v,window.location.href,a,b,d,e,r,k);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=
+function(a,b,d,e,r,h){h=null!=h?h:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==r&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize",
+"0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=r&&(r=r.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==r?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=r?'<meta http-equiv="refresh" content="0;URL=\''+r+"'\"/>\n":"")+"</head>\n<body"+(null==r&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==r?'<script type="text/javascript" src="'+f+'">\x3c/script>':
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+r+'" 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,e,r){null!=r&&(r=r.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==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==r?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=r?'<meta http-equiv="refresh" content="0;URL=\''+r+"'\"/>\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==r?'<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="'+r+'" 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;var c=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);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,e,r,l,n){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!r),
+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,e,r,h,m){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!r),
f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,r));this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=
-this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var f=this.createDownloadRequest(c,a,e,b,n);this.editor.graph.pageVisible=d;return f}catch(x){this.handleError(x)}}));else{var k=null,h=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==a){var m=this.editor.graph.background;if(n||m==
-mxConstants.NONE)m=null;var p=this.editor.graph.getSvg(m,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();h('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",k=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();h(a)}),e)}}catch(G){this.handleError(G)}};
+this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(c,a,e,b,m);this.editor.graph.pageVisible=d;return f}catch(x){this.handleError(x)}}));else{var n=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var l=this.editor.graph.background;if(m||l==
+mxConstants.NONE)l=null;var p=this.editor.graph.getSvg(l,null,null,null,null,e);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 f=c+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(G){this.handleError(G)}};
EditorUi.prototype.createDownloadRequest=function(a,b,d,e,r){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&r&&(g=mxConstants.NONE);
return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&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,f=mxUtils.bind(this,function(d){var f=null!=a.data?a.data:"";null!=d&&0<d.length&&(0<f.length&&(f+="\n"),f+=d);d=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,
-null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,k=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()),l()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(k,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();k()}));l();k()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
+null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,h=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(g);g=window.setTimeout(h,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();h()}));m();h()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){editorUi.alert(a.tooltip)});return c}var b=null;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,
-null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var n=e.getCell(a.getAttribute("id"));if(null!=n){try{var h=a.getAttribute("value");if(null!=h){var v=mxUtils.parseXml(h).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))e.setValue(n,v);else for(var m=v.attributes,p=0;p<m.length;p++)d.setAttributeForCell(n,m[p].nodeName,0<m[p].nodeValue.length?m[p].nodeValue:null)}}catch(x){null!=
-window.console&&console.log("Error in value for "+n.id+": "+x)}try{var t=a.getAttribute("style");null!=t&&d.model.setStyle(n,t)}catch(x){null!=window.console&&console.log("Error in style for "+n.id+": "+x)}try{var q=a.getAttribute("icon");if(null!=q){var u=0<q.length?JSON.parse(q):null;null!=u&&u.append||d.removeCellOverlays(n);null!=u&&d.addCellOverlay(n,c(u))}}catch(x){null!=window.console&&console.log("Error in icon for "+n.id+": "+x)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),
-A=d.getCellGeometry(n);if(null!=A){A=A.clone();for(key in G){var J=parseFloat(G[key]);"dx"==key?A.x+=J:"dy"==key?A.y+=J:"dw"==key?A.width+=J:"dh"==key?A.height+=J:A[key]=parseFloat(G[key])}d.model.setGeometry(n,A)}}}catch(x){null!=window.console&&console.log("Error in icon for "+n.id+": "+x)}}}else if("model"==a.nodeName){for(var K=a.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(a.firstChild)).decode(K,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
-(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);
-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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});
-if(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(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,r);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!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(l){}this.handleError(r,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?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};
-EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,l,n){};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 f=null,e=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 g=0;g<b.length;g++)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[g]);d=null!=d&&0<d.length?d:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);
-var v=h.parentNode.previousSibling;d=v.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&v.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");v.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 t=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.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!=t?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=
-this.editor.graph,u=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=p.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",m.insertBefore(u,m.firstChild),v.style.paddingRight=18*m.childNodes.length+
-"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),v.style.paddingRight=18*m.childNodes.length+"px")})):null==t&&(t=p.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),m.insertBefore(t,m.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||
-(v.style.paddingRight=18*m.childNodes.length+"px",t.parentNode.removeChild(t),t=null)});mxEvent.consume(c)})),v.style.paddingRight=18*m.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var k=q.getCellGeometry(a[g]);null!=k&&k.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
-b.y-=q.view.translate.y;J(c,b)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),
-null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(h.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
-null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=f?f.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!=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,g,k,l,n,r,t,v){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,l,n),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,l,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var m=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var k=JSON.parse(mxUtils.getTextContent(g.documentElement));e(k,h);b=b.concat(k);A(a);
-this.spinner.stop();m=!0}catch(Q){}else if("mxfile"==g.documentElement.nodeName)try{for(var l=g.documentElement.getElementsByTagName("diagram"),g=0;g<l.length;g++){var k=mxUtils.getTextContent(l[g]),n=this.stringToCells(this.editor.graph.decompress(k)),r=this.editor.graph.getBoundingBoxFromGeometry(n);J(n,new mxRectangle(0,0,r.width,r.height),a)}m=!0}catch(Q){null!=window.console&&console.log("error in drop handler:",Q)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=r&&(/(\.v(dx|sdx?))($|\?)/i.test(r)||/(\.vs(x|sx?))($|\?)/i.test(r))?this.importVisio(v,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));m.insertBefore(p,m.firstChild);mxEvent.addListener(p,"click",G);mxEvent.addListener(h,
-"dblclick",function(a){mxEvent.getSource(a)==h&&G(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,"click",K);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)})),m.insertBefore(d,m.firstChild))}v.appendChild(m);v.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
+null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=e.getCell(a.getAttribute("id"));if(null!=m){try{var k=a.getAttribute("value");if(null!=k){var v=mxUtils.parseXml(k).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))e.setValue(m,v);else for(var l=v.attributes,p=0;p<l.length;p++)d.setAttributeForCell(m,l[p].nodeName,0<l[p].nodeValue.length?l[p].nodeValue:null)}}catch(x){null!=
+window.console&&console.log("Error in value for "+m.id+": "+x)}try{var t=a.getAttribute("style");null!=t&&d.model.setStyle(m,t)}catch(x){null!=window.console&&console.log("Error in style for "+m.id+": "+x)}try{var q=a.getAttribute("icon");if(null!=q){var u=0<q.length?JSON.parse(q):null;null!=u&&u.append||d.removeCellOverlays(m);null!=u&&d.addCellOverlay(m,c(u))}}catch(x){null!=window.console&&console.log("Error in icon for "+m.id+": "+x)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),
+B=d.getCellGeometry(m);if(null!=B){B=B.clone();for(key in G){var J=parseFloat(G[key]);"dx"==key?B.x+=J:"dy"==key?B.y+=J:"dw"==key?B.width+=J:"dh"==key?B.height+=J:B[key]=parseFloat(G[key])}d.model.setGeometry(m,B)}}}catch(x){null!=window.console&&console.log("Error in icon for "+m.id+": "+x)}}}else if("model"==a.nodeName){for(var K=a.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(a.firstChild)).decode(K,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.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{e.endUpdate()}null!=h&&this.chromelessResize&&this.chromelessResize(!0,h)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
+d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),m=e.getMonth()+1,k=e.getDate(),v=e.getHours(),l=e.getMinutes(),e=e.getSeconds(),c=c+("-"+(f+"-"+m+"-"+k+"-"+v+"-"+l+"-"+e));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?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()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(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(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,r);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!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):
+"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,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?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,r,h,m){};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 f=null,e=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 g=0;g<b.length;g++)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[g]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var v=k.parentNode.previousSibling;d=v.getAttribute("title");null!=
+d&&0<d.length&&".scratchpad"!=a.title&&v.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");v.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 t=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.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!=t?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var q=this.editor.graph,u=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
+k,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=p.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",l.insertBefore(u,l.firstChild),v.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=u&&null!=
+u.parentNode&&(u.parentNode.removeChild(u),v.style.paddingRight=18*l.childNodes.length+"px")})):null==t&&(t=p.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),l.insertBefore(t,l.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||(v.style.paddingRight=18*l.childNodes.length+"px",t.parentNode.removeChild(t),
+t=null)});mxEvent.consume(c)})),v.style.paddingRight=18*l.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);
+B(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;b.y-=q.view.translate.y;J(c,b)}mxEvent.consume(a)});
+k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.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",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility=
+"visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.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,g,h,m,n,r,t,v){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,n),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var l=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);B(a);this.spinner.stop();
+l=!0}catch(Q){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(n);J(n,new mxRectangle(0,0,r.width,r.height),a)}l=!0}catch(Q){null!=window.console&&console.log("error in drop handler:",Q)}}l||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&
+null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=r&&(/(\.v(dx|sdx?))($|\?)/i.test(r)||/(\.vs(x|sx?))($|\?)/i.test(r))?this.importVisio(v,function(a){w(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":
+"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(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"));l.insertBefore(p,l.firstChild);mxEvent.addListener(p,"click",G);mxEvent.addListener(k,
+"dblclick",function(a){mxEvent.getSource(a)==k&&G(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));l.insertBefore(d,l.firstChild);mxEvent.addListener(d,"click",K);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)})),l.insertBefore(d,l.firstChild))}v.appendChild(l);v.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(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};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=
760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});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.defaultGraphBackground=null,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,e,h){a=new ImageDialog(this,a,b,d,e,h);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,e,h){a=new LibraryDialog(this,a,b,d,e,h);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,e,k){a=new ImageDialog(this,a,b,d,e,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,e,k){a=new LibraryDialog(this,a,b,d,e,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.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");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){var c=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 e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
-else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),a+=' <a href="https://drive.google.com/open?id='+h+'" 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,e,d,g)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,h,l,n,m,v,p,q,t){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,h,l,n,t,m,v);this.showDialog(a.container,p||340,q||150,!0,!1);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,e,h){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,h)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" 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,e,d,g)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,k,h,m,l,v,p,q,t){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,k,h,m,t,l,v);this.showDialog(a.container,p||340,q||150,!0,!1);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,e,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,k)).container,340,90,!0,!1)};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,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.doSaveLocalFile=function(a,b,d,e,h){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
+EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,k){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);
-try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,h).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,h,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=h?"&format="+h:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
-b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),n=0;n<f;++n){for(var h=1024*n,v=Math.min(h+1024,d),m=Array(v-h),p=0;h<v;++p,++h)m[p]=c[h].charCodeAt(0);e[n]=new Uint8Array(m)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,h,l,n){l=null!=l?l:!1;n=null!=n?n:"vsdx"!=h&&(!mxClient.IS_IOS||!navigator.standalone);h=this.getServiceCount(l);b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||
+try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(v){}}else this.createEchoRequest(a,b,d,e,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,k,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
+b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),m=0;m<f;++m){for(var k=1024*m,v=Math.min(k+1024,d),l=Array(v-k),p=0;k<v;++p,++k)l[p]=c[k].charCodeAt(0);e[m]=new Uint8Array(l)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);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 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,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(t){this.handleError(t)}}))}catch(y){this.handleError(y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
-mxResources.get("download"),!1,l,n,null,1<h,4<h&&(!l||6>h)?3:4,a,d,e);this.showDialog(b.container,420,h==(mxClient.IS_IOS?0:1)?160:4<h?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 d=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),
+mxResources.get("download"),!1,h,m,null,1<k,4<k&&(!h||6>k)?3:4,a,d,e);this.showDialog(b.container,420,k==(mxClient.IS_IOS?0:1)?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 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"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,
-d,e,h){this.isLocalFileSave()?this.saveLocalFile(d,a,e,h,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,h,b,c)}),d,h,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,h,l,n){n=null!=n?n:!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 f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==
-App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,l,!0,c,d)}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,l,!0,c,d)}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,n,null,1<c,4<c?3:4,e,l,h);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,h,l){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,
-b,d,e,h,l,n,m,v,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 f=this.editor.graph.getSvg(c,a,n,m,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",k=mxUtils.bind(this,function(a){this.spinner.stop();h&&a.setAttribute("content",this.getFileData(!0,
+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,e,k){this.isLocalFileSave()?this.saveLocalFile(d,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,k,b,c)}),d,k,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,k,h,m){m=null!=m?m:!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 f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==
+App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,c,d)}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,c,d)}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,m,null,1<c,4<c?3:4,e,h,k);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,k,h){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,
+b,d,e,k,h,m,l,v,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 f=this.editor.graph.getSvg(c,a,m,l,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,
null,null,null,d,v));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(g,"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,f,!1,mxUtils.bind(this,function(){l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,k,this.thumbImageCache)):k(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,h,l){l=null!=l?l:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",
-"checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");l&&(a.appendChild(c),d=document.createElement("span"),mxUtils.write(d,b),a.appendChild(d),h||mxUtils.br(a),mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(a))})));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft=
+"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,k,h){h=null!=h?h:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",
+"checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),d=document.createElement("span"),mxUtils.write(d,b),a.appendChild(d),k||mxUtils.br(a),mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(a))})));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft=
"24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+
"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));
-mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){n.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}
+mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){m.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}
mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value",
-"self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",n=null,n=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();n.style.padding=mxClient.IS_FF?
-"4px 2px 4px 2px":"4px";n.style.marginLeft="4px";n.style.height="22px";n.style.width="22px";n.style.position="relative";n.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";n.className="geColorBtn";a.appendChild(n);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,h,l,n,m){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=
-b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=h&&0<h.length&&f.push("edit="+encodeURIComponent(h)),l&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&f.push("page="+a));a=!0;null!=n?d="#U"+encodeURIComponent(n):(c=this.getCurrentFile(),m||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&&f.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<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,h,l,n,m,v,p,q){this.getBasenames();var c={};""!=h&&h!=mxConstants.NONE&&(c.highlight=h);"auto"!==e&&(c.target=e);
-v||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];n&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(v&&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,!n);b='<div class="mxgraph" style="'+(l?"max-width:100%;":
+"self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();m.style.padding=mxClient.IS_FF?
+"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,k,h,m,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=
+b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&f.push("page="+a));a=!0;null!=m?d="#U"+encodeURIComponent(m):(c=this.getCurrentFile(),l||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&&f.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<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,k,h,m,l,v,p,q){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==e&&(c.target=e);
+v||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];m&&(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);l&&d.push("layers");0<d.length&&(v&&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,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(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,e){var c=document.createElement("div");
c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name",
-"type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var h=document.createElement("span");mxUtils.write(h,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(h);mxUtils.br(g);g.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("publicDiagramUrl"));g.appendChild(h);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(h=document.createElement("a"),h.style.paddingLeft="12px",h.style.color="gray",h.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(h,mxResources.get("share")),g.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),t=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
-q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var u=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(c,mxResources.get("allPages"),g,!g),A=this.addCheckbox(c,mxResources.get("layers"),!0),J=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,J),x=K.getEditInput();x.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?x.removeAttribute("disabled"):
-x.setAttribute("disabled","disabled");x.checked&&J.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,t.checked,q.value,p.getTarget(),p.getColor(),u.checked,G.checked,A.checked,J.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,h,l){var c=document.createElement("div");c.style.whiteSpace=
-"nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",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 r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));k.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";k.appendChild(r);c.appendChild(k);r=document.createElement("a");r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));
-k.appendChild(r);mxEvent.addListener(r,"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,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),
-m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var A=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,A),K=J.getEditInput(),x=this.addCheckbox(c,mxResources.get("layers"),!0);x.style.marginLeft=K.style.marginLeft;x.style.marginBottom="16px";x.style.marginTop="8px";mxEvent.addListener(A,"change",function(){A.checked?(x.removeAttribute("disabled"),K.removeAttribute("disabled")):(x.setAttribute("disabled","disabled"),K.setAttribute("disabled",
-"disabled"));K.checked&&A.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){h(q.getTarget(),q.getColor(),null==u?!0:u.checked,A.checked,J.getLink(),x.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
-document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0),f=this.editor.graph,h=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=h&&(h.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1,null!=h?h.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,h,l,n,m){n=null!=n?n:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=
-this.editor.graph,g="jpeg"==m?196:300,k=document.createElement("h3");mxUtils.write(k,a);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(k);mxUtils.write(c,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";c.appendChild(r);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 w=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=m),q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.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");l&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(q,"change",function(){q.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),x=document.createElement("input");x.style.marginTop=
-"16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||x.setAttribute("disabled","disabled");b&&(c.appendChild(x),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var C=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=m),I=null!=this.pages&&1<this.pages.length,R=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=m);R.style.marginLeft="24px";R.style.marginBottom="16px";I||(R.style.display=
-"none");mxEvent.addListener(C,"change",function(){C.checked&&I?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")});n&&I||R.setAttribute("disabled","disabled");var P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="8px";P.style.marginRight="10px";P.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");
-mxUtils.write(a,mxResources.get("openInNewWindow"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));P.appendChild(a);"svg"==m&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(P),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;h(r.value,w.checked,!q.checked,K.checked,C.checked,x.checked,p.value,u.checked,
-!R.checked,P.value)}),null,d,e);this.showDialog(d.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,h){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-c.appendChild(g)}var k=this.addCheckbox(c,mxResources.get("fit"),!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,t),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(c,mxResources.get("layers"),u,!u);A.style.marginLeft=q.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
-(u&&A.removeAttribute("disabled"),q.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&t.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(k.checked,r.checked,m.checked,t.checked,p.getLink(),A.checked)}),null,mxResources.get("embed"),h);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(a,b,d,e,h,l,n,m){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
-a&&(g+="max-width:100%;");var k="";d&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+c+'"'+k+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),
-f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var k=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));k.send(mxUtils.bind(this,function(){200<=k.getStatus()&&299>=k.getStatus()?c("data:image/png;base64,"+k.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
-b,d,e,h,l,n){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var k=f[g].getAttribute("href");null!=k&&"#"==k.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var r=" ",m="";e&&(r="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"+
-(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){n('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=m?' style="'+m+'"':"")+r+"/>")}))}else m="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),m+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),m+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=m&&c.setAttribute("style",m),n(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+
+"type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(n);mxUtils.br(g);g.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));g.appendChild(n);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),g.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),t=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";
+q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var u=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(c,mxResources.get("allPages"),g,!g),B=this.addCheckbox(c,mxResources.get("layers"),!0),J=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,J),x=K.getEditInput();x.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?x.removeAttribute("disabled"):
+x.setAttribute("disabled","disabled");x.checked&&J.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,t.checked,q.value,p.getTarget(),p.getColor(),u.checked,G.checked,B.checked,J.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,h){var c=document.createElement("div");c.style.whiteSpace=
+"nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",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 r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));n.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";n.appendChild(r);c.appendChild(n);r=document.createElement("a");r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));
+n.appendChild(r);mxEvent.addListener(r,"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,l=null;if(null!=d||null!=e)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")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.width="50px",l.style.marginLeft="6px",l.style.marginBottom="10px",l.value=e+"px",c.appendChild(l),mxUtils.br(c);var p=this.addLinkSection(c,h);d=null!=this.pages&&1<this.pages.length;var q=null;
+if(null==g||g.constructor!=window.DriveFile||b)q=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var u=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,u),K=J.getEditInput(),x=this.addCheckbox(c,mxResources.get("layers"),!0);x.style.marginLeft=K.style.marginLeft;x.style.marginBottom="16px";x.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(x.removeAttribute("disabled"),K.removeAttribute("disabled")):(x.setAttribute("disabled","disabled"),K.setAttribute("disabled",
+"disabled"));K.checked&&u.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(p.getTarget(),p.getColor(),null==q?!0:q.checked,u.checked,J.getLink(),x.checked,null!=t?t.value:null,null!=l?l.value:null)}),null,mxResources.get("create"),f);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)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
+!0),f=this.editor.graph,n=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1,null!=n?n.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,k,h,m,l){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=
+this.editor.graph,g="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";c.appendChild(r);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 w=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=l),q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.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");h&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(q,"change",function(){q.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),x=document.createElement("input");x.style.marginTop=
+"16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||x.setAttribute("disabled","disabled");b&&(c.appendChild(x),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var C=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=l),I=null!=this.pages&&1<this.pages.length,R=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=l);R.style.marginLeft="24px";R.style.marginBottom="16px";I||(R.style.display=
+"none");mxEvent.addListener(C,"change",function(){C.checked&&I?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")});m&&I||R.setAttribute("disabled","disabled");var P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="8px";P.style.marginRight="10px";P.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");
+mxUtils.write(a,mxResources.get("openInNewWindow"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));P.appendChild(a);"svg"==l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(P),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=r.value;k(r.value,w.checked,!q.checked,K.checked,C.checked,x.checked,p.value,u.checked,
+!R.checked,P.value)}),null,d,e);this.showDialog(d.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+c.appendChild(g)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),r=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,t),q=p.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),B=this.addCheckbox(c,mxResources.get("layers"),u,!u);B.style.marginLeft=q.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
+(u&&B.removeAttribute("disabled"),q.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&t.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,t.checked,p.getLink(),B.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(a,b,d,e,k,h,m,l){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
+a&&(g+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),
+f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
+b,d,e,k,h,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var r=" ",l="";e&&(r="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":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=l?' style="'+l+'"':"")+r+"/>")}))}else l="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),l+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),l+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=l&&c.setAttribute("style",l),m(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,e){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(){e()}))}),0)):e()};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],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.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(l){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,e=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),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(B){null!=
-b&&b(B)}}),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,e,h,l,n){n=b.background;n==mxConstants.NONE&&(n=null);b=b.getSvg(n,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,h,l,n,m,p){p=null!=p?p:"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,h?this.getFileData(!0,null,null,null,d,m):null,p)}catch(t){"Invalid image"==t.message?this.downloadFile(p):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,n)}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,e={},l=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var k=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,k))]);f.push('"'+b[g].substring(k))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var h=1;h<b.length;h++){var m=b[h].indexOf(")"),p=null,q=b[h].indexOf("format(",m);0<q&&(p=c(b[h].substring(q+7,b[h].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==
-e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
-a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;l()}),mxUtils.bind(this,function(a){d--;l()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[h].substring(0,m)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,h,l,n,m,p,q,y,t,u,H){l=null!=l?l:!0;t=null!=t?t:this.editor.graph;u=null!=u?u:0;var c=p?null:t.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
-(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(c,null,null,H,null,null!=n?n:!0),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(m*g)+2*u;k=Math.ceil(m*k)+2*u;f.setAttribute("width",g);f.setAttribute("height",k);var n=f.getContext("2d");null!=
-c&&(n.beginPath(),n.rect(0,0,g,k),n.fillStyle=c,n.fill());n.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,u/m,u/m);a(f)},0):(n.drawImage(e,u/m,u/m),a(f))}catch(P){null!=h&&h(P)}});e.onerror=function(a){null!=h&&h(a)};try{q&&this.editor.graph.addSvgShadow(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(t,
-d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(x){null!=h&&h(x)}}),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 e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||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,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var k=a.getElementsByTagName(d),h=0;h<k.length;h++)mxUtils.bind(this,function(d){var k=e.convert(d.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var h=f[k];null==h?(c++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,d.setAttribute(g,
-e));c--;0==c&&b(a)})):d.setAttribute(g,h)}else null!=k&&d.setAttribute(g,k)})(k[h])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,h,l){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);h=null!=h?h:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}l=null!=l?l:"data:image/png;base64,";e=l+this.base64Encode(e)}b(e)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){h&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=
+this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,e=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),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
+f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(A){null!=
+b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,k,h,m,l,p){p=null!=p?p:"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,l):null,p)}catch(t){"Invalid image"==t.message?this.downloadFile(p):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,h,m)}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,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],g=1;g<b.length;g++){var h=b[g].indexOf(")");f.push('url("');f.push(e[c(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var m=1;m<b.length;m++){var k=b[m].indexOf(")"),l=null,p=b[m].indexOf("format(",k);0<p&&(l=c(b[m].substring(p+7,b[m].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==
+e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.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){e[a]=c;d--;h()}),mxUtils.bind(this,function(a){d--;h()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[m].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,h,m,l,p,q,y,t,u,H){h=null!=h?h:!0;t=null!=t?t:this.editor.graph;u=null!=u?u:0;var c=p?null:t.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&
+(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(c,null,null,H,null,null!=m?m:!0),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*u;m=Math.ceil(l*m)+2*u;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");null!=
+c&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=c,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,u/l,u/l);a(f)},0):(n.drawImage(e,u/l,u/l),a(f))}catch(P){null!=k&&k(P)}});e.onerror=function(a){null!=k&&k(a)};try{q&&this.editor.graph.addSvgShadow(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(t,
+d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(x){null!=k&&k(x)}}),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 e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||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,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d),k=0;k<h.length;k++)mxUtils.bind(this,function(d){var h=e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var k=f[h];null==k?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,
+e));c--;0==c&&b(a)})):d.setAttribute(g,k)}else null!=h&&d.setAttribute(g,h)})(h[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,h){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}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:f})})});f()}catch(v){null!=d&&d(v)}};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"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(n){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
-function(a,b,d,e,h){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(a=0;a<m.length;a++){m[a].removeAttribute("id");var r=this.updatePageRoot(new DiagramPage(m[a])),
-p=this.pages.length;null==r.getName()&&r.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,r,r,p))}}finally{f.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(c=f.importGraphModel(k,b,d,e))}}catch(z){throw h||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}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,e){e=null!=
-e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,e);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=e,this.doImportVisio(f.response,b,d)}catch(w){d(w)}else d({})});
-f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||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(f){this.handleError(f)}});"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(r){d(r)}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,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,e,h,l,n){l=null!=l?l:!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){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()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,
-19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,l,!0),0<g.length)return g}catch(y){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,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/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),
-null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,l))}),mxUtils.bind(this,function(a){this.handleError(a)}));
-else{c=this.editor.graph;h=null;c.getModel().beginUpdate();try{h=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[h])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),h.value=a,c.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)&&
-c.setLinkForCell(h,h.value),h.geometry.width+=c.gridSize,h.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[h]}}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){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"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(m){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
+function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var l=n.getElementsByTagName("diagram");if(1==l.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){l[a].removeAttribute("id");var r=this.updatePageRoot(new DiagramPage(l[a])),
+t=this.pages.length;null==r.getName()&&(r.setName(mxResources.get("pageWithNumber",[t+1])),r.needsUpdate=!0);f.model.execute(new ChangePage(this,r,r,t))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}}catch(z){throw k||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}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,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,e);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=e,this.doImportVisio(f.response,b,
+d)}catch(w){d(w)}else d({})});f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||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(f){this.handleError(f)}});"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(r){d(r)}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,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(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 f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,
+d,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,h,!0),0<g.length)return g}catch(y){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,
+null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,h);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,h))}),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;"+(e?"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 e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,h,l,n,m,p,q,u){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,n)):c=this.importXml(a,d,e,q);null!=m&&m(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&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,h,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,q);null!=m&&m(a)})):null!=p&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(c=!0,this.importVisio(p,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,n)?(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?g(a.responseText):null!=m&&m(null))}),n)):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,n;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);
-c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}n=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(n&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,h,l,n,m,p,q,u,t){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var k=u||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,
-6)&&a[r].size>k){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,k=g.gridSize;h=null!=h?h:mxUtils.bind(this,function(a,b,d,e,f,g,k,h,l){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,e,f,g,k,h,l,c,t)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,r=p,v=[],w=mxUtils.bind(this,function(a,
-c){v[a]=c;if(0==--r){this.spinner.stop();if(null!=m)m(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}l(b)}}),y=0;y<p;y++)mxUtils.bind(this,function(c){var l=a[c],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==n||n(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,p=m.indexOf(","),r=decodeURIComponent(escape(atob(m.substring(p+1)))),
-v=mxUtils.parseXml(r),r=v.getElementsByTagName("svg");if(0<r.length){var r=r[0],x=t?null:r.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(m.substring(0,p+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],n=parseFloat(f.getAttribute("width")),
-r=parseFloat(f.getAttribute("height")),t=f.getAttribute("viewBox");if(null==t||0==t.length)f.setAttribute("viewBox","0 0 "+n+" "+r);else if(isNaN(n)||isNaN(r)){var q=t.split(" ");3<q.length&&(n=parseFloat(q[2]),r=parseFloat(q[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,r)),w=h(m,l.type,b+c*k,d+c*k,Math.max(1,Math.round(n*x)),Math.max(1,Math.round(r*x)),l.name);if(isNaN(n)||isNaN(r)){var u=new Image;u.onload=mxUtils.bind(this,function(){n=
-Math.max(1,u.width);r=Math.max(1,u.height);w[0].geometry.width=n;w[0].geometry.height=r;f.setAttribute("viewBox","0 0 "+n+" "+r);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[w[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(fa){}return null})):w(c,mxUtils.bind(this,function(){return h(x,"text/xml",b+c*k,d+c*k,0,0,l.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{r=
-!1;if("image/png"==l.type){var I=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=I&&0<I.length){var y=new Image;y.src=a.target.result;w(c,mxUtils.bind(this,function(){return h(I,"text/xml",b+c*k,d+c*k,y.width,y.height,l.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
-this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,m){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var p=f&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(e/n,e/m)):1;return h(g,l.type,b+c*k,d+c*k,Math.round(n*p),Math.round(m*p),l.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result,
-l.type,b+c*k,d+c*k,240,160,l.name,function(a){w(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?h(null,l.type,b+c*k,d+c*k,240,160,l.name,function(a){w(c,function(){return a})},l):"image"==l.type.substring(0,5)?m.readAsDataURL(l):m.readAsText(l)})(y)});g?this.confirmImageResize(function(a){f=a;v()},p):v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
+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 e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,k,h,m,l,p,q,u){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,q);null!=l&&l(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&&(f=this.importXml(b,d,e,q),p=!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,q);null!=l&&l(a)})):null!=p&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(p,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(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?g(a.responseText):null!=l&&l(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==l||l(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,k;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);
+c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,k,h,m,l,p,q,u,t){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=u||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,
+6)&&a[r].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,h,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,d,e,f,g,h,k,m,c,t)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,r=p,v=[],w=mxUtils.bind(this,function(a,
+c){v[a]=c;if(0==--r){this.spinner.stop();if(null!=l)l(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}h(b)}}),y=0;y<p;y++)mxUtils.bind(this,function(c){var h=a[c],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,p=l.indexOf(","),r=decodeURIComponent(escape(atob(l.substring(p+1)))),
+v=mxUtils.parseXml(r),r=v.getElementsByTagName("svg");if(0<r.length){var r=r[0],x=t?null:r.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(l.substring(0,p+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),
+t=parseFloat(f.getAttribute("height")),r=f.getAttribute("viewBox");if(null==r||0==r.length)f.setAttribute("viewBox","0 0 "+m+" "+t);else if(isNaN(m)||isNaN(t)){var q=r.split(" ");3<q.length&&(m=parseFloat(q[2]),t=parseFloat(q[3]))}l=this.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,t)),w=k(l,h.type,b+c*n,d+c*n,Math.max(1,Math.round(m*x)),Math.max(1,Math.round(t*x)),h.name);if(isNaN(m)||isNaN(t)){var u=new Image;u.onload=mxUtils.bind(this,function(){m=
+Math.max(1,u.width);t=Math.max(1,u.height);w[0].geometry.width=m;w[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+m+" "+t);l=this.createSvgDataUri(mxUtils.getXml(f));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[w[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(fa){}return null})):w(c,mxUtils.bind(this,function(){return k(x,"text/xml",b+c*n,d+c*n,0,0,h.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{r=
+!1;if("image/png"==h.type){var I=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=I&&0<I.length){var y=new Image;y.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(I,"text/xml",b+c*n,d+c*n,y.width,y.height,h.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
+this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,l){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var t=f&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+c*n,d+c*n,Math.round(m*t),Math.round(l*t),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,
+h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?k(null,h.type,b+c*n,d+c*n,240,160,h.name,function(a){w(c,function(){return a})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(y)});g?this.confirmImageResize(function(a){f=a;v()},p):v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(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):e(!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 e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.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,e,h,l){h=null!=h?h:this.maxImageSize;var c=Math.max(1,a.width),
-f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/h,f/h);if(1<g){var k=Math.round(c/g),m=Math.round(f/g),p=document.createElement("canvas");p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var r=p.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=k;q.height=m;var u=q.toDataURL();r!==u&&(b=r,c=k,f=m)}}}catch(A){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var b=e,h=0;8>h;h++)b=1==(b&1)?3988292384^b>>>1:b>>>
-1,EditorUi.prototype.crcTable[e]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;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 c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,h){function c(a,c){var b=k;k+=c;return a.substring(b,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(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(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);h=a.substring(0,k);do{var m=f(a);if("IDAT"==c(a,4)){h=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):
-"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);h+=g(d.length)+b+d+g(e^4294967295);h+=a.substring(k-8,a.length);break}h+=a.substring(k-8,k-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,b,e){a=d.substring(a+
+340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!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 e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.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,e,k,h){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),
+f=Math.max(1,a.height);if(e&&this.isResampleImage(b,h))try{var g=Math.max(c/k,f/k);if(1<g){var n=Math.round(c/g),l=Math.round(f/g),t=document.createElement("canvas");t.width=n;t.height=l;t.getContext("2d").drawImage(a,0,0,n,l);var p=t.toDataURL();if(p.length<b.length){var r=document.createElement("canvas");r.width=n;r.height=l;var q=r.toDataURL();p!==q&&(b=p,c=n,f=l)}}}catch(B){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>
+1,EditorUi.prototype.crcTable[e]=d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;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 c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,c){var b=n;n+=c;return a.substring(b,n)}function f(a){a=c(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(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 n=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,n);do{var l=f(a);if("IDAT"==c(a,4)){k=a.substring(0,n-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):
+"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);k+=g(d.length)+b+d+g(e^4294967295);k+=a.substring(n-8,a.length);break}k+=a.substring(n-8,n-4+l);c(a,l);c(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,b,e){a=d.substring(a+
8,a+8+e);"zTXt"==b?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(r){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};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 m=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(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(x){a.handleError(x)}return b};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 e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");
-return e.apply(this,arguments)};var h=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=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!=e&&e(a,c)};h.call(this,a,c,d)};m.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 l=b.getGlobalVariable;b.getGlobalVariable=function(c){return"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:l.apply(this,arguments)};var n=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||
-!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))n.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||
+new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var l=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(x){a.handleError(x)}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 e=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 e.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=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!=e&&e(a,c)};k.call(this,a,c,d)};l.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 h=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:h.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||
+!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),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 q=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_IE||
-b.container.addEventListener("paste",mxUtils.bind(this,function(a){var c=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var b=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<b.types.length;e++)if("text/"===b.types[e].substring(0,5)){d=!0;break}if(!d){var f=b.items;for(index in f){var g=f[index];if("file"===g.kind){if(c.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,b,d,e,f,g){c.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.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);
+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,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.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);
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),q())}));mxEvent.addListener(u,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u,!0),q())}));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 t=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==u?!0:t.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 c=this.editor.graph,b=c.cellEditor.text2,d=null;null!=b&&(mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
-mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,b,d,e,f,g){c.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=
-0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));c.insertImage(decodeURIComponent(b),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
+function(a){return mxEvent.getSource(a)==u?!0:t.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,e,f,g){b.insertImage(a,f,g)},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 e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):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){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 z=document.createElement("div");z.style.position="absolute";z.style.top="125px";z.style.left="220px";z.style.width="30px";z.style.height="1000px";z.style.background="whiteSmoke";document.body.appendChild(z);var H=document.createElement("div");H.style.position="absolute";H.style.top="95px";H.style.left="220px";H.style.width="30px";H.style.height="30px";H.style.background="whiteSmoke";document.body.appendChild(H);this.vRuler=new mxRuler(this.editor.graph,
z,!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,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;
-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 A=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
-A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=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!=A&&(A.parentNode.removeChild(A),A=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=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,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var l=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,m=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,n))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;m()},mxEvent.isControlDown(a)):m()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),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 G=this.isSelectionAllowed;
+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,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=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,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");
+null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,l=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;l()},mxEvent.isControlDown(a)):l()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),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,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=
function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();
@@ -3011,19 +3016,19 @@ this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]
function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);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())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,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,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var h=e.lastIndexOf("%3E");0<=h&&h<e.length-3&&(e=e.substring(0,h+3))}catch(v){}try{var c=b.getElementsByTagName("span"),
-m=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(m)&&(f=!0,e=m)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),
+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,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var c=b.getElementsByTagName("span"),
+l=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(f=!0,e=l)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,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 c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&
!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=b,d=d.getElementsByTagName("img"),
0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-
-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=c+"px";h.style.left=b+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=
+(null==this.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)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-
+3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=
+function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,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){var d=
c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".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,e))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,
-c.target.result,a.name))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});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(),
+c.target.result,a.name))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});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(),
e=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))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,e,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,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}))))};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,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),
@@ -3034,38 +3039,38 @@ this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&wind
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,e=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(f){if(f.source==(window.opener||window.parent)){var g=f.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(R){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(I){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
-h=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==g.action){var k=h(g.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",
-result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
-try{h.init()}catch(I){n.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();h=1==g.enableRecent;k=1==g.enableSearch;h=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,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;n.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,k?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(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==
-g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("textContent"==g.action){this.editor.graph.setEnabled(!1);var l=this.editor.graph,h="";if(null!=this.pages)for(k=0;k<this.pages.length;k++){var m=l;this.currentPage!=this.pages[k]&&(m=this.createTemporaryGraph(l.getStylesheet()),m.model.setRoot(this.pages[k].root));h+=this.pages[k].getName()+" "+m.getIndexableText()+" "}else h=l.getIndexableText();this.editor.graph.setEnabled(!0);
-n.postMessage(JSON.stringify({event:"textContent",data:h,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==
-g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);n.postMessage(JSON.stringify(b),"*")}),u=
+h=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==g.action){var m=h(g.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));
+try{h.init()}catch(I){k.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();h=1==g.enableRecent;m=1==g.enableSearch;h=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,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"==
+g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("textContent"==g.action){this.editor.graph.setEnabled(!1);var l=this.editor.graph,h="";if(null!=this.pages)for(m=0;m<this.pages.length;m++){var n=l;this.currentPage!=this.pages[m]&&(n=this.createTemporaryGraph(l.getStylesheet()),n.model.setRoot(this.pages[m].root));h+=this.pages[m].getName()+" "+n.getIndexableText()+" "}else h=l.getIndexableText();this.editor.graph.setEnabled(!0);
+k.postMessage(JSON.stringify({event:"textContent",data:h,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var p=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==
+g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),u=
mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var l=this.createTemporaryGraph(l.getStylesheet()),w=l.getGlobalVariable,x=this.pages[0];l.getGlobalVariable=function(a){return"page"==a?x.getName():"pagenumber"==a?1:w.apply(this,
arguments)};document.body.appendChild(l.container);l.model.setRoot(x.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,l)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).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!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);p=this.createLoadMessage("export");if("html2"==g.format||"html"==g.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=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=g.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(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.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(h),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}h="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));p.data=this.createSvgDataUri(h)}n.postMessage(JSON.stringify(p),"*")}return}if("load"==g.action)d=1==g.autosave,
-this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,g.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(k),this.embedFilenameSpan=k),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var C=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=
+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"==g.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"==g.action)d=1==g.autosave,
+this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.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),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}var C=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(X){this.handleError(X)}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())});e=h();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=h();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,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!=g&&"function"===typeof g.substring&&
+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!=g&&"function"===typeof g.substring&&
"data:application/vnd.visio;base64,"==g.substring(0,34)?(h="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){C(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),h)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
-299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&C(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){C(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=h(g),C(g,f))}}));var n=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&C(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){C(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=h(g),C(g,f))}}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="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 e={},f=null,h=null,m=null,p=null,q="",u="auto",t="auto",z=null,H=null,G=40,A=40,J=100,K=0,x=this.editor.graph;x.getGraphBounds();for(var C=
+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 e={},f=null,k=null,l=null,p=null,q="",u="auto",t="auto",z=null,H=null,G=40,B=40,J=100,K=0,x=this.editor.graph;x.getGraphBounds();for(var C=
function(){null!=b?b(aa):(x.setSelectionCells(aa),x.scrollCellToVisible(x.getSelectionCell()))},I=x.getFreeInsertPoint(),R=I.x,P=I.y,I=P,X=null,U="auto",p=null,F=[],ea=null,ka=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 L=mxUtils.trim(a.substring(1,ba)),E=mxUtils.trim(a.substring(ba+1));"label"==L?X=x.sanitizeHtml(E):
-"style"==L?f=E:"parentstyle"==L?h=E:"identity"==L&&0<E.length&&"-"!=E?m=E:"parent"==L&&0<E.length&&"-"!=E?p=E:"namespace"==L&&0<E.length&&"-"!=E?q=E:"width"==L?u=E:"height"==L?t=E:"left"==L&&0<E.length?z=E:"top"==L&&0<E.length?H=E:"ignore"==L?ka=E.split(","):"connect"==L?F.push(JSON.parse(E)):"link"==L?ea=E:"padding"==L?K=parseFloat(E):"edgespacing"==L?G=parseFloat(E):"nodespacing"==L?A=parseFloat(E):"levelspacing"==L?J=parseFloat(E):"layout"==L&&(U=E)}}}var S=this.editor.csvToArray(c[Y]),L=ba=null;
-if(null!=m||null!=p)for(var M=0;M<S.length;M++)m==S[M]&&(ba=M),p==S[M]&&(L=M);null==X&&(X="%"+S[0]+"%");if(null!=F)for(var N=0;N<F.length;N++)null==e[F[N].to]&&(e[F[N].to]={});x.model.beginUpdate();try{for(M=Y+1;M<c.length;M++){var T=this.editor.csvToArray(c[M]);if(T.length==S.length){var D=null,Q=null!=ba?q+T[ba]:null;null!=Q&&(D=x.model.getCell(Q));null==D&&(D=new mxCell(X,new mxGeometry(R,I,0,0),f||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=Q);for(var V=0;V<T.length;V++)x.setAttributeForCell(D,
+"style"==L?f=E:"parentstyle"==L?k=E:"identity"==L&&0<E.length&&"-"!=E?l=E:"parent"==L&&0<E.length&&"-"!=E?p=E:"namespace"==L&&0<E.length&&"-"!=E?q=E:"width"==L?u=E:"height"==L?t=E:"left"==L&&0<E.length?z=E:"top"==L&&0<E.length?H=E:"ignore"==L?ka=E.split(","):"connect"==L?F.push(JSON.parse(E)):"link"==L?ea=E:"padding"==L?K=parseFloat(E):"edgespacing"==L?G=parseFloat(E):"nodespacing"==L?B=parseFloat(E):"levelspacing"==L?J=parseFloat(E):"layout"==L&&(U=E)}}}var S=this.editor.csvToArray(c[Y]),L=ba=null;
+if(null!=l||null!=p)for(var M=0;M<S.length;M++)l==S[M]&&(ba=M),p==S[M]&&(L=M);null==X&&(X="%"+S[0]+"%");if(null!=F)for(var N=0;N<F.length;N++)null==e[F[N].to]&&(e[F[N].to]={});x.model.beginUpdate();try{for(M=Y+1;M<c.length;M++){var T=this.editor.csvToArray(c[M]);if(T.length==S.length){var D=null,Q=null!=ba?q+T[ba]:null;null!=Q&&(D=x.model.getCell(Q));null==D&&(D=new mxCell(X,new mxGeometry(R,I,0,0),f||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=Q);for(var V=0;V<T.length;V++)x.setAttributeForCell(D,
S[V],T[V]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D,D.style);for(N=0;N<F.length;N++)e[F[N].to][D.getAttribute(F[N].to)]=D;null!=ea&&"link"!=ea&&(x.setLinkForCell(D,D.getAttribute(ea)),x.setAttributeForCell(D,ea,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var ga=this.editor.graph.getPreferredSizeForCell(D);D.vertex&&(null!=z&&null!=D.getAttribute(z)&&(D.geometry.x=R+parseFloat(D.getAttribute(z))),null!=H&&null!=D.getAttribute(H)&&(D.geometry.y=
-P+parseFloat(D.getAttribute(H))),"@"==u.charAt(0)&&null!=D.getAttribute(u.substring(1))?D.geometry.width=parseFloat(D.getAttribute(u.substring(1))):D.geometry.width="auto"==u?ga.width+K:parseFloat(u),"@"==t.charAt(0)&&null!=D.getAttribute(t.substring(1))?D.geometry.height=parseFloat(D.getAttribute(t.substring(1))):D.geometry.height="auto"==t?ga.height+K:parseFloat(t),I+=D.geometry.height+A);p=null!=L?x.model.getCell(q+T[L]):null;null!=p?(p.style=x.replacePlaceholders(p,h),x.addCell(D,p)):d.push(x.addCell(D))}}for(var W=
+P+parseFloat(D.getAttribute(H))),"@"==u.charAt(0)&&null!=D.getAttribute(u.substring(1))?D.geometry.width=parseFloat(D.getAttribute(u.substring(1))):D.geometry.width="auto"==u?ga.width+K:parseFloat(u),"@"==t.charAt(0)&&null!=D.getAttribute(t.substring(1))?D.geometry.height=parseFloat(D.getAttribute(t.substring(1))):D.geometry.height="auto"==t?ga.height+K:parseFloat(t),I+=D.geometry.height+B);p=null!=L?x.model.getCell(q+T[L]):null;null!=p?(p.style=x.replacePlaceholders(p,k),x.addCell(D,p)):d.push(x.addCell(D))}}for(var W=
d.slice(),aa=d.slice(),N=0;N<F.length;N++)for(var Z=F[N],M=0;M<d.length;M++){var D=d[M],pa=D.getAttribute(Z.from);if(null!=pa){x.setAttributeForCell(D,Z.from,null);for(var ra=pa.split(","),V=0;V<ra.length;V++){var fa=e[Z.to][ra[V]];null!=fa&&(X=Z.label,null!=Z.fromlabel&&(X=(D.getAttribute(Z.fromlabel)||"")+(X||"")),null!=Z.tolabel&&(X=(X||"")+(fa.getAttribute(Z.tolabel)||"")),aa.push(x.insertEdge(null,null,X||"",Z.invert?fa:D,Z.invert?D:fa,Z.style||x.createCurrentEdgeStyle())),mxUtils.remove(Z.invert?
D:fa,W))}}}if(null!=ka)for(M=0;M<d.length;M++)for(D=d[M],V=0;V<ka.length;V++)x.setAttributeForCell(D,mxUtils.trim(ka[V]),null);var ma=new mxParallelEdgeLayout(x);ma.spacing=G;var ta=function(){ma.execute(x.getDefaultParent());for(var a=0;a<d.length;a++){var b=x.getCellGeometry(d[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==u&&(b.width=Math.round(x.snap(b.width)));"auto"==t&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==U){var la=new mxCircleLayout(x);la.resetEdges=
-!1;var sa=la.isVertexIgnored;la.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){la.execute(x.getDefaultParent());ta()},!0,C);C=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&aa.length==2*d.length-1&&1==W.length){x.view.validate();var ha=new mxCompactTreeLayout(x,"horizontaltree"==U);ha.levelDistance=A;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(x.getDefaultParent(),0<W.length?W[0]:null)},
-!0,C);C=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==W.length){x.view.validate();var ca=new mxHierarchicalLayout(x,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=A;ca.parallelEdgeSpacing=G;ca.interRankCellSpacing=J;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(x.getDefaultParent(),aa);x.moveCells(aa,R,P)},!0,C);C=null}else if("organic"==U||"auto"==U&&aa.length>d.length){x.view.validate();var da=new mxFastOrganicLayout(x);
-da.forceConstant=3*A;da.resetEdges=!1;var ia=da.isVertexIgnored;da.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ma=new mxParallelEdgeLayout(x);ma.spacing=G;this.executeLayout(function(){da.execute(x.getDefaultParent());ta()},!0,C);C=null}this.hideDialog()}finally{x.model.endUpdate()}null!=C&&C()}}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=
+!1;var sa=la.isVertexIgnored;la.isVertexIgnored=function(a){return sa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){la.execute(x.getDefaultParent());ta()},!0,C);C=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&aa.length==2*d.length-1&&1==W.length){x.view.validate();var ha=new mxCompactTreeLayout(x,"horizontaltree"==U);ha.levelDistance=B;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(x.getDefaultParent(),0<W.length?W[0]:null)},
+!0,C);C=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==W.length){x.view.validate();var ca=new mxHierarchicalLayout(x,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=B;ca.parallelEdgeSpacing=G;ca.interRankCellSpacing=J;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(x.getDefaultParent(),aa);x.moveCells(aa,R,P)},!0,C);C=null}else if("organic"==U||"auto"==U&&aa.length>d.length){x.view.validate();var da=new mxFastOrganicLayout(x);
+da.forceConstant=3*B;da.resetEdges=!1;var ia=da.isVertexIgnored;da.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ma=new mxParallelEdgeLayout(x);ma.spacing=G;this.executeLayout(function(){da.execute(x.getDefaultParent());ta()},!0,C);C=null}this.hideDialog()}finally{x.model.endUpdate()}null!=C&&C()}}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 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 e=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*
@@ -3076,122 +3081,122 @@ c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null=
var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));
if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==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 e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+
-'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.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(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();
+"";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 e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+
+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.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!=k&&(this.offlineStatus.innerHTML=
+b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"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 q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);
this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=
d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){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,e,h,l){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,h,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),k=Math.floor(g.width*h/c.view.scale),m=Math.floor(g.height*
-h/c.view.scale);f.length<=MAX_REQUEST_SIZE&&k*m<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!=e?e:"none")+"&w="+k+"&h="+m+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&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,d,e){this.ui=a;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,d,e){this.ui=a;this.oldIndex=d;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(a,d){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,d=this.ui.editor,e=d.graph,b=d.graph.compress(e.zapGremlins(mxUtils.getXml(d.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);
-e.setViewState(a.viewState);d.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,d,e,b){SelectPage.call(this,a,e);this.relatedPage=d;this.index=b;this.previousIndex=null}mxUtils.extend(ChangePage,SelectPage);
+null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,h){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),p=Math.floor(g.height*
+k/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<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!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);
+e.setViewState(a.viewState);b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(a,b,e,d){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
-EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var d=0;d<this.pages.length;d++)if(this.pages[d]==this.currentPage){a=d;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var d=0;d<this.pages.length;d++)if(this.pages[d].getId()==a)return this.pages[d];return null};
-EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,d=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(a.view,arguments)});var e=null,b=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
+EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){a=b;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
+EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;this.tabContainer.style.height=
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&
-this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,d){for(var e=d.getProperty("edit").changes,h=0;h<e.length;h++)if(e[h]instanceof SelectPage||e[h]instanceof RenamePage||e[h]instanceof MovePage||e[h]instanceof mxRootChange){b();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),h=parseFloat(a.getAttribute("pageHeight")),m=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!=d?"0"!=d:this.defaultPageVisible,background:null!=m&&0<m.length?m:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(b)||isNaN(h)?this.pageFormat:new mxRectangle(0,0,b,b),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,d){d.setAttribute("grid",null==a||a.gridEnabled?"1":"0");d.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize);d.setAttribute("guides",null==a||a.guidesEnabled?"1":"0");d.setAttribute("tooltips",null==a||a.tooltips?"1":"0");d.setAttribute("connect",null==a||a.connect?"1":"0");d.setAttribute("arrows",null==a||a.arrows?"1":"0");d.setAttribute("fold",null==a||a.foldingEnabled?"1":"0");d.setAttribute("page",null==a&&this.defaultPageVisible||
-null!=a&&a.pageVisible?"1":"0");d.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var e=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=e&&(d.setAttribute("pageWidth",e.width),d.setAttribute("pageHeight",e.height));d.setAttribute("background",null!=a&&null!=a.background?a.background:this.defaultGraphBackground);null!=a&&null!=a.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));d.setAttribute("math",null!=a&&a.mathEnabled?
-"1":"0");d.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0")};
+this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),l=a.getAttribute("background"),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!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,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){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("fold",null==a||a.foldingEnabled?"1":"0");b.setAttribute("page",null==a&&this.defaultPageVisible||
+null!=a&&a.pageVisible?"1":"0");b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);var e=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",
+null!=a&&a.shadowVisible?"1":"0")};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
a.pageFormat,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.view.scale=null!=a.scale?a.scale:1,null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):
(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.background=this.defaultGraphBackground,this.backgroundImage=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 d=this.editor.extractGraphModel(a.node);if(null!=d){a.graphModelNode=d;a.viewState=this.editor.graph.createViewState(d);var e=new mxCodec(d.ownerDocument);a.root=e.decode(d).root}else a.root=this.editor.graph.model.createRoot()}return a};
-EditorUi.prototype.selectPage=function(a,d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();e.add(b);e.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))};
-EditorUi.prototype.selectNextPage=function(a){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),a?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,d){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();d=null!=d?d:this.pages.length;var e=new ChangePage(this,a,a,d);this.editor.graph.model.execute(e)}return a};
-EditorUi.prototype.createPage=function(a){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(a[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=a[e]);return e};
-EditorUi.prototype.removePage=function(a){var d=this.editor.graph;if(d.isEnabled()){d.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;e=this.pages[b]}else e=this.insertPage(),d.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));d.model.execute(new ChangePage(this,a,e))}finally{d.model.endUpdate()}}return a};
-EditorUi.prototype.duplicatePage=function(a,d){var e=this.editor.graph,b=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=e.cloneCells([e.model.root])[0],b.viewState=e.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollTop=null,b.viewState.currentRoot=null,b.viewState.defaultParent=null,b.setName(d),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
-EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};EditorUi.prototype.movePage=function(a,d){this.editor.graph.model.execute(new MovePage(this,a,d))};
+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 b=this.editor.extractGraphModel(a.node);if(null!=b){a.graphModelNode=b;a.viewState=this.editor.graph.createViewState(b);var e=new mxCodec(b.ownerDocument);a.root=e.decode(b).root}else a.root=this.editor.graph.model.createRoot()}return a};
+EditorUi.prototype.selectPage=function(a,b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var d=new SelectPage(this,a);d.execute();e.add(d);e.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))};
+EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};
+EditorUi.prototype.createPage=function(a){var b=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));b.setName(null!=a?a:this.createPageName());return b};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e};
+EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled()){b.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var d=mxUtils.indexOf(this.pages,a);d==this.pages.length-1?d--:d++;e=this.pages[d]}else e=this.insertPage(),b.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));b.model.execute(new ChangePage(this,a,e))}finally{b.model.endUpdate()}}return a};
+EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,d=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),d=a.node.cloneNode(!1),d.removeAttribute("id"),d=new DiagramPage(d),d.root=e.cloneCells([e.model.root])[0],d.viewState=e.getViewState(),d.viewState.scale=1,d.viewState.scrollLeft=null,d.viewState.scrollTop=null,d.viewState.currentRoot=null,d.viewState.defaultParent=null,d.setName(b),d=this.insertPage(d,mxUtils.indexOf(this.pages,a)+1));return d};
+EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.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,d=document.createElement("div");d.style.position="relative";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="12px";d.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),h=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(b,e){this.pages[b]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),h=b):mxEvent.consume(c)}));mxEvent.addListener(e,
-"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=h&&b!=h&&this.movePage(h,b);a.stopPropagation();a.preventDefault()}));d.appendChild(e)})(m,this.createTabForPage(this.pages[m],b,this.pages[m]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d);
-b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(d.clientWidth>this.tabContainer.clientWidth-e){null!=b&&(b.style.position="absolute",b.style.right="0px",d.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 q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<d.scrollLeft?100:50);mxUtils.setOpacity(q,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
-0<d.scrollLeft?100:50);mxUtils.setOpacity(q,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<d.scrollLeft?100:50);mxUtils.setOpacity(q,d.scrollLeft<d.scrollWidth-d.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 d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="8px 4px 8px 4px";d.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";d.style.borderBottomStyle="solid";d.style.backgroundColor=this.tabContainer.style.backgroundColor;
-d.style.cursor="move";d.style.color="gray";a&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(d.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return d};
-EditorUi.prototype.createControlTab=function(a,d){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
-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 d=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,
+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 e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#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)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=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-e){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 q=this.createControlTab(4,
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);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(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,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 e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
+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 d=0;d<this.pages.length;d++)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)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),h=mxEvent.getClientY(a);d.popup(b,h,null,a);this.setCurrentMenu(d);
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b);
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,d,e){e=this.createTab(e);var b=a.getName();e.setAttribute("title",b);mxUtils.write(e,b);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(a,e);42<d&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var e=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,h=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;h=a==this.currentPage;e.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&h||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!b){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 q=mxEvent.getClientX(m),u=mxEvent.getClientY(m);p.popup(q,u,null,m);this.setCurrentMenu(p,d)}mxEvent.consume(m)}}))};
-EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(e,b){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);e.addSeparator(b);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){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,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){a=b.previous;b.previous=b.name;b.name=a;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),d="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,h){h.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(h.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&h.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(d,
-a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,h));return h};a.beforeDecode=function(a,b,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(b.getAttribute("relatedPage"));if(null==d.relatedPage){var e=b.ownerDocument.createElement("diagram");e.setAttribute("id",b.getAttribute("relatedPage"));e.setAttribute("name",b.getAttribute("name"));d.relatedPage=new DiagramPage(e);e=b.getAttribute("viewState");null!=e&&(d.relatedPage.viewState=JSON.parse(e),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);e=b.firstChild;if(null!=e)for(d.relatedPage.root=a.decodeCell(e,!1),d=e.nextSibling,e.parentNode.removeChild(e),e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var h=e.getAttribute("id");null==a.lookup(h)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};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 d=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,e,q,u){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var h=this.view.getState(e[g]),m=null!=h?h.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(e[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=d.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return n.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),l.view.getState(a),b="tree"==(null!=
-b?b.style:l.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function q(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.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;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(c[0],!0),!0);var f=q(a),g=d.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=l.view.getState(a),k=l.view.scale;if(null!=h){var n=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=l.getOutgoingEdges(l.model.getTerminal(c[0],!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH,t=g=c=0;t<m.length;t++){var r=l.model.getTerminal(m[t],!1);if(f==q(r)){var x=l.view.getState(r);r!=a&&null!=x&&(p&&b!=x.getCenterX()<h.getCenterX()||!p&&b!=x.getCenterY()<h.getCenterY())&&mxUtils.intersects(n,x)&&(c=10+Math.max(c,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/k),g=10+Math.max(g,(Math.min(n.y+n.height,x.y+x.height)-Math.max(n.y,x.y))/k))}}p?g=0:c=0;for(t=0;t<m.length;t++)if(r=l.model.getTerminal(m[t],!1),f==q(r)&&(x=l.view.getState(r),r!=a&&null!=
-x&&(p&&b!=x.getCenterX()<h.getCenterX()||!p&&b!=x.getCenterY()<h.getCenterY()))){var u=[];l.traverse(x.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});l.moveCells(u,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function c(a){l.model.beginUpdate();try{var b=q(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=
-e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);l.moveCells(g,h,k);return l.addCells(d,e)}finally{l.model.endUpdate()}}function f(a){l.model.beginUpdate();try{var b=l.model.getParent(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],
-a]);l.model.setTerminal(c[0],a,!0);var d=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var h=l.model.getTerminal(d[g],!1);null!=h&&f.push(h)}var k=l.view.getBounds(f),n=q(a),m=l.view.translate,p=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(k.x+k.width)/p-m.x-e.x+10,c[1].geometry.y+=a.geometry.height-e.y+40):n==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=
-null==k?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(k.x+k.width)/p-m.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height-e.y+40):(c[1].geometry.x=n==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width-e.x+40):c[1].geometry.x+(a.geometry.width-e.x+40),c[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(k.y+k.height)/p-m.y+-e.y+10);return l.addCells(c,b)}finally{l.model.endUpdate()}}function g(a,b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function k(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():
-c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(l.model.getTerminal(c[0],!0),d,a),c=l.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&&l.setSelectionCell(d[c].cell)))))}var r=this,l=r.editor.graph,n=l.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
-mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){w.apply(this,arguments);if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(l.getSelectionCell())&&(a.addSeparator(),0<l.getIncomingEdges(c).length&&
-this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&
-(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=
-l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+D");var v=l.removeCells;l.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 e=[],f=0;f<a.length;f++){var g=a[f];n.isEdge(g)&&d(g)&&(e.push(g),g=n.getTerminal(g,!1));b(g)?(l.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=l.getIncomingEdges(a[f]),
-a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var B=l.duplicateCells;l.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=B.call(this,a,c);if(h.length==
-a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=l.getIncomingEdges(h[e]),g=l.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var n=this.cloneCells([g[0]])[0];this.addEdge(n,l.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var y=l.moveCells;l.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var n=f,m=this.view.getState(f),p=null!=m?m.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding",
-"0")){for(var q=0;q<a.length;q++)if(b(a[q])||l.model.isEdge(a[q])&&null==l.model.getTerminal(a[q],!0)){f=l.model.getParent(a[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var t=l.getIncomingEdges(a[0]);if(0<t.length){var r=l.view.getState(l.model.getTerminal(t[0],!0));if(null!=r){var u=l.view.getState(n);null!=u&&(c=(u.getCenterX()-r.getCenterX())/l.view.scale,d=(u.getCenterY()-r.getCenterY())/l.view.scale)}}}}k=y.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(q=0;q<
-k.length;q++)if(this.model.isEdge(k[q]))b(n)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[q],!0))&&this.model.setTerminal(k[q],n,!0);else if(b(a[q])&&(t=l.getIncomingEdges(a[q]),0<t.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==l.getIncomingEdges(k[q]).length){m=n;if(null==m||m==l.model.getParent(a[q]))m=l.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,l.getDefaultParent(),m,k[q])}}finally{this.model.endUpdate()}return k};
-if(null!=r.sidebar){var t=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=t.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=l.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),
-83:r.actions.get("selectSiblings")},H=r.onKeyDown;r.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&&b(l.getSelectionCell())&&1==l.getSelectionCount()){var d=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(l.getSelectionCell()):f(l.getSelectionCell()):13==a.which&&(d=u(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&l.model.isEdge(d[0])?l.setSelectionCell(l.model.getTerminal(d[0],!1)):l.setSelectionCell(d[d.length-
-1]),null!=r.hoverIcons&&r.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(k(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(k(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(k(l.getSelectionCell(),mxConstants.DIRECTION_EAST),
-mxEvent.consume(a)):40==a.keyCode&&(k(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error",R)}mxEvent.isConsumed(a)||H.apply(this,arguments)};var G=l.connectVertex;l.connectVertex=function(a,d,e,g,h,k){var n=l.getIncomingEdges(a);return b(a)&&0<n.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):
-G.call(this,a,d,e,g,h,k)};l.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&l.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 A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.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=
+EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName();e.setAttribute("title",d);mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var 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 q=mxEvent.getClientX(l),u=mxEvent.getClientY(l);p.popup(q,u,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.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,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,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,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
+a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){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,e,q,u){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(e[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return m.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=
+b?b.style:h.getCellStyle(a)).containerType);return b}function e(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.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;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
+10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),m=h.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=h.getOutgoingEdges(h.model.getTerminal(d[0],!0));if(null!=p){for(var n=f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<p.length;t++){var r=h.model.getTerminal(p[t],!1);if(f==q(r)){var x=h.view.getState(r);r!=a&&null!=x&&(n&&b!=x.getCenterX()<k.getCenterX()||!n&&b!=x.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,x)&&(d=10+Math.max(d,(Math.min(l.x+l.width,x.x+x.width)-Math.max(l.x,x.x))/m),g=10+Math.max(g,(Math.min(l.y+l.height,x.y+x.height)-Math.max(l.y,x.y))/m))}}n?g=0:d=0;for(t=0;t<p.length;t++)if(r=h.model.getTerminal(p[t],!1),f==q(r)&&(x=h.view.getState(r),r!=a&&null!=
+x&&(n&&b!=x.getCenterX()<k.getCenterX()||!n&&b!=x.getCenterY()<k.getCenterY()))){var u=[];h.traverse(x.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});h.moveCells(u,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function c(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=
+e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b=h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],
+a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=q(a),p=h.view.translate,n=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/n-p.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function g(a,b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():
+c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(h.model.getTerminal(c[0],!0),d,a),c=h.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&&h.setSelectionCell(d[c].cell)))))}var r=this,h=r.editor.graph,m=h.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){w.apply(this,arguments);if(1==h.getSelectionCount()){c=h.getSelectionCell();var e=h.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(h.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(h.getSelectionCell())&&(a.addSeparator(),0<h.getIncomingEdges(c).length&&
+this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&
+(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=
+h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+D");var v=h.removeCells;h.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 e=[],f=0;f<a.length;f++){var g=a[f];m.isEdge(g)&&d(g)&&(e.push(g),g=m.getTerminal(g,!1));b(g)?(h.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),
+a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var A=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=A.call(this,a,c);if(k.length==
+a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var y=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,p=this.view.getState(f),n=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding",
+"0")){for(var t=0;t<a.length;t++)if(b(a[t])||h.model.isEdge(a[t])&&null==h.model.getTerminal(a[t],!0)){f=h.model.getParent(a[t]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var q=h.getIncomingEdges(a[0]);if(0<q.length){var r=h.view.getState(h.model.getTerminal(q[0],!0));if(null!=r){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-r.getCenterX())/h.view.scale,d=(u.getCenterY()-r.getCenterY())/h.view.scale)}}}}m=y.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(t=0;t<
+m.length;t++)if(this.model.isEdge(m[t]))b(l)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[t],!0))&&this.model.setTerminal(m[t],l,!0);else if(b(a[t])&&(q=h.getIncomingEdges(a[t]),0<q.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==h.getIncomingEdges(m[t]).length){p=l;if(null==p||p==h.model.getParent(a[t]))p=h.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,h.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};
+if(null!=r.sidebar){var t=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=t.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),
+83:r.actions.get("selectSiblings")},H=r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var d=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(d=u(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&h.model.isEdge(d[0])?h.setSelectionCell(h.model.getTerminal(d[0],!1)):h.setSelectionCell(d[d.length-
+1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_EAST),
+mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error",R)}mxEvent.isConsumed(a)||H.apply(this,arguments)};var G=h.connectVertex;h.connectVertex=function(a,d,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):
+G.call(this,a,d,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.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 J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.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 K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",function(){var a=
+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.editorUi.editor.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 e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var h=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;");h.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);h.insertEdge(m,!1);var l=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;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);l.insertEdge(n,!1);a.insert(c);a.insert(g);a.insert(m);a.insert(n);a.insert(b);a.insert(d);a.insert(e);a.insert(h);a.insert(l);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],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!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 l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=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;");h.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);h.insertEdge(m,!1);a.insert(c);a.insert(g);a.insert(l);a.insert(m);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(h);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 b=new mxCell("Organization",
-new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");c.geometry.relative=!0;c.edge=!0;
-b.insertEdge(c,!0);e.insertEdge(c,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(c);a.insert(g);a.insert(b);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],
-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;");d.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;");
+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",
+new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");c.geometry.relative=!0;c.edge=!0;
+d.insertEdge(c,!0);e.insertEdge(c,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;d.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(c);a.insert(g);a.insert(d);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],
+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 d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],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(550,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 d(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 f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.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;";
+0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],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(550,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 b(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 f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.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;";
g.className="geTitle";b.appendChild(g);return g}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";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=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 f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);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";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);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 e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}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; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }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-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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); }a.geMenuItem:active { opacity: 0.4; }.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; }";
-document.getElementsByTagName("head")[0].appendChild(b)}catch(n){}var h=function(a,b,c,d,e,f,g){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";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }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-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }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); }a.geMenuItem:active { opacity: 0.4; }.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; }";
+document.getElementsByTagName("head")[0].appendChild(d)}catch(m){}var k=function(a,b,c,d,e,f,g){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";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};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 m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="30px");m.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 q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="30px");l.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 q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.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;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);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="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
@@ -3203,100 +3208,100 @@ mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResou
null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),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 g=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);g.apply(this,arguments)};var k=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){k.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 r=Menus.prototype.init;Menus.prototype.init=function(){r.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("insertText").label=mxResources.get("text");
-b.actions.get("insertText").label=mxResources.get("text");b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("insertRectangle").label=mxResources.get("rectangle");b.actions.get("insertEllipse").label=mxResources.get("ellipse");b.actions.get("insertRhombus").label=mxResources.get("rhombus");b.actions.get("insertImage").label=mxResources.get("image")+"...";b.actions.get("insertLink").label=mxResources.get("link")+"...";b.actions.get("createShape").label=mxResources.get("shape")+
-"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importFile",new Action("File...",function(){c.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&b.importFiles(a.files,null,null,b.maxImageSize)});a.click()}));b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){c.popupMenuHandler.hideMenu();
-b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){d(b)}));b.actions.put("toggleFormat",
-new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,
-"new open - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,["new"],c),b.menus.addSubmenu("openFrom",a,c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile&&(b.menus.addMenuItems(a,["-","share"],c),null!=d.realtime&&b.menus.addMenuItems(a,["chatWindowTitle"],
-c),a.addSeparator(c));b.menus.addMenuItems(a,"- outline layers - find tags".split(" "),c);mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):b.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,c){f.apply(this,arguments);a.addSeparator(c);b.menus.addSubmenu("openRecent",a,c)}}this.put("save",new Menu(mxUtils.bind(this,
-function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||b.menus.addMenuItems(a,["-","revisionHistory"],c);b.menus.addMenuItems(a,["-","autosave"],
-c)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){g.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&b.menus.addSubmenu("theme",a,c);null!=h&&b.menus.addSubmenu("language",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips"],
-c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&(a.addSeparator(c),b.menus.addMenuItem(a,"plugins",c))})));this.put("insertAdvanced",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);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c);a.addSeparator(c);b.menus.addSubmenu("insertLayout",a,c);b.menus.addSubmenu("insertAdvanced",a,c)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-l=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);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<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[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 l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=g.menus.get(a),f=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),m);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";
+null);g.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){n.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 r=Menus.prototype.init;Menus.prototype.init=function(){r.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("insertText").label=mxResources.get("text");
+c.actions.get("insertText").label=mxResources.get("text");c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("insertRectangle").label=mxResources.get("rectangle");c.actions.get("insertEllipse").label=mxResources.get("ellipse");c.actions.get("insertRhombus").label=mxResources.get("rhombus");c.actions.get("insertImage").label=mxResources.get("image")+"...";c.actions.get("insertLink").label=mxResources.get("link")+"...";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 - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime?c.menus.addMenuItems(a,["chatWindowTitle"],
+b):c.menus.addMenuItems(a,["-","refresh"],b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags".split(" "),b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,
+b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):(c.menus.addMenuItems(a,["save","saveAs","-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],
+b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b)})));var h=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,
+["scrollbars","tooltips"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&(a.addSeparator(b),c.menus.addMenuItem(a,"plugins",b))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));
+mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=
+c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var h=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=g.menus.get(a),f=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),n);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.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,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="",mxUtils.setOpacity(f,d||40)):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 b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?k.insertBefore(h,g.statusContainer):k.appendChild(h);null!=f?(h.style.backgroundImage=
+"right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";null!=g.statusContainer?l.insertBefore(h,g.statusContainer):l.appendChild(h);null!=f?(h.style.backgroundImage=
"url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=
""):(h.setAttribute("disabled","disabled"),mxUtils.setOpacity(h,null!=f?10:20),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function c(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",
-b.appendChild(a[c]));null!=g.statusContainer?k.insertBefore(b,g.statusContainer):k.appendChild(b);return b}function d(){for(var d=k.firstChild;null!=d;){var f=d.nextSibling;"geMenuItem"!=d.className&&"geItem"!=d.className||d.parentNode.removeChild(d);d=f}m=k.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(d=900>e)||a("diagram");c([d?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
+b.appendChild(a[c]));null!=g.statusContainer?l.insertBefore(b,g.statusContainer):l.appendChild(b);return b}function d(){for(var d=l.firstChild;null!=d;){var f=d.nextSibling;"geMenuItem"!=d.className&&"geItem"!=d.className||d.parentNode.removeChild(d);d=f}n=l.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(d=900>e)||a("diagram");c([d?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
null,mxResources.get("shapes"),g.actions.get("image"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",g.actions.get("image"),
d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)]);f=a("insert",!0,d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);c([f,b(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)]);if(411<=e&&(f=g.actions.get("undo"),d=g.actions.get("redo"),f=b("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),d=b("",d.funct,
-null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),c([f,d]),480<=e)){var d=g.actions.get("zoomIn"),f=g.actions.get("zoomOut"),l=g.actions.get("resetView");
-c([b("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),c([f,d]),480<=e)){var d=g.actions.get("zoomIn"),f=g.actions.get("zoomOut"),h=g.actions.get("resetView");
+c([b("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.translate.x,c=k.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-k.view.scale)&&b==k.view.translate.x&&c==k.view.translate.y&&g.actions.get(k.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",h,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=e?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=e?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null])}d=g.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&540<=e?(f=p.addMenu("",d.funct),f.setAttribute("title",mxResources.get("language")),f.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),k.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}l.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,h=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var k=document.createElement("div");k.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,p=new Menubar(g,k);g.statusContainer=
+f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.top="11px",f.style.right="14px",mxUtils.setOpacity(f,30),l.appendChild(f),g.buttonContainer.style.right="40px"):g.buttonContainer.style.right="14px"}h.apply(this,arguments);var f=document.createElement("div");f.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+f.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(f);var g=this,k=g.editor.graph;g.toolbar=this.createToolbar(g.createDiv("geToolbar"));g.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(g,l);g.statusContainer=
g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var q=g.descriptorChanged;g.descriptorChanged=function(){q.apply(this,arguments);var a=g.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);k.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else k.removeAttribute("title")};g.setStatusText(g.editor.getStatus());k.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";k.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=
+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")};g.setStatusText(g.editor.getStatus());l.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";l.appendChild(g.buttonContainer);g.menubarContainer=g.buttonContainer;g.tabContainer=
document.createElement("div");g.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 f=g.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";var u=g.menus.get("viewZoom");if(null!=
u){this.tabContainer.style.right="70px";var C=p.addMenu("100%",u.funct);C.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");C.style.whiteSpace="nowrap";C.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";C.style.backgroundPosition="right 6px center";C.style.backgroundRepeat="no-repeat";C.style.backgroundColor="#ffffff";C.style.paddingRight="10px";C.style.display="block";C.style.position="absolute";C.style.textDecoration="none";C.style.textDecoration="none";C.style.right=
"0px";C.style.bottom="0px";C.style.overflow="hidden";C.style.visibility="hidden";C.style.textAlign="center";C.style.color="#000";C.style.fontSize="12px";C.style.color="#707070";C.style.width="59px";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(g.tabContainer.style.height)-1+"px";C.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";r.appendChild(C);u=mxUtils.bind(this,function(){C.innerHTML=Math.round(100*g.editor.graph.view.scale)+
-"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(g.tabContainer);r.appendChild(k);r.appendChild(g.diagramContainer);f.appendChild(r);g.updateTabContainer();
+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);g.editor.addListener("resetGraphView",u);g.editor.addListener("pageSelected",u);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(g.tabContainer);r.appendChild(l);r.appendChild(g.diagramContainer);f.appendChild(r);g.updateTabContainer();
d();mxEvent.addListener(window,"resize",function(){d();null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.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\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\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\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.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\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+\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\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\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,d,e){this.init(a,d,e)};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;
+(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\nchatJoined={1} has joined\nchatLeft={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\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\nfileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?\noverwrite=Overwrite\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+\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\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\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,e){this.init(a,b,e)};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;
-GraphViewer.prototype.init=function(a,d,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=
-0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),
-null!=a)){var b=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var b=this;this.graph.getImageFromBundles=function(a){return b.getImageUrl(a)};
-mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==d.nodeName){var e=d.getElementsByTagName("diagram");if(0<e.length){var h=this.graph.getGlobalVariable,b=this;this.graph.getGlobalVariable=function(a){var c=e[b.currentPage];return"page"==a?c.getAttribute("name")||"Page-"+(b.currentPage+1):"pagenumber"==a?b.currentPage+1:h.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
+GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=
+0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
+null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};
+mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:k.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};var f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged",
-f);f();urlParams.page=b.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
-this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};b=this;this.graph.customLinkClicked=function(a){var c=!0;if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");
-b.selectPageById(a.substring(d+1))||(c=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);return c};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var h=this.getObservableParent(a),
-m=new e(mxUtils.bind(this,function(d){0<a.offsetWidth&&(m.disconnect(),b())}));m.observe(h,{attributes:!0})}else b()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
+f);f();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};
+this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){var b=!0;if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");
+d.selectPageById(a.substring(c+1))||(b=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);return b};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),
+l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),d())}));l.observe(k,{attributes:!0})}else d()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,d=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var b=mxUtils.bind(this,function(){if(!e){e=!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"}e=!1}}),h=null,m=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==h||m||(m=!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},h=c,window.setTimeout(function(){m=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",b),this.graph.addListener("size",
-b)):new ResizeSensor(this.graph.container,b));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,d.width+2*this.graph.border),this.updateContainerHeight(a,d.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=h=null,b=mxUtils.bind(this,function(){window.clearTimeout(p);m||(p=window.setTimeout(mxUtils.bind(this,
-this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",b):new ResizeSensor(this.graph.container,b))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",b);var q=mxUtils.bind(this,function(){var b=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||d.width+2*this.graph.border>a.offsetWidth||d.height+2*this.graph.border>this.graphConfig["max-height"])){var c=
-null;null!=this.graphConfig["max-height"]&&(c=this.graphConfig["max-height"]/(d.height+2*this.graph.border));this.fitGraph(c)}else this.graph.view.setTranslate(Math.floor((this.graph.border-d.x)/this.graph.view.scale),Math.floor((this.graph.border-d.y)/this.graph.view.scale)),h=a.offsetWidth;a.style.minWidth=b});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){d=this.graph.getGraphBounds();h=null;q()}};
-GraphViewer.prototype.updateContainerWidth=function(a,d){a.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(a,d){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=d+"px"};
-GraphViewer.prototype.showLayers=function(a,d){var e=this.graphConfig.layers;if(null!=e||null!=d)if(e=null!=e?e.split(" "):null,null!=d||0<e.length){var b=null!=d?d.getModel():null,h=a.getModel();h.beginUpdate();try{for(var m=h.getChildCount(h.root),p=0;p<m;p++)h.setVisible(h.getChildAt(h.root,p),null!=d?b.isVisible(b.getChildAt(b.root,p)):!1);if(null==b)for(p=0;p<e.length;p++)h.setVisible(h.getChildAt(h.root,parseInt(e[p])),!0)}finally{h.endUpdate()}}};
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!e){e=!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"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!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(){l=!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 p=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);l||(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 q=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(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};
+GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),p=0;p<l;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<e.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(e[p])),!0)}finally{k.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.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(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var d=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?d.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(d.style.marginTop=this.toolbarHeight+"px");var e=d.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var b=null,h=null,m=mxUtils.bind(this,function(a){null!=b&&(window.clearTimeout(b),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);b=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
-0);b=null;h=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";h=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=b&&(window.clearTimeout(b),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
+0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,u=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,k=null,r=0;r<c.length;r++){var l=c[r];if("pages"==l){k=d.ownerDocument.createElement("div");
-k.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(k,70);var n=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");n.style.borderRightStyle="none";n.style.paddingLeft="0px";n.style.paddingRight="0px";e.appendChild(k);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");w.style.paddingLeft="0px";w.style.paddingRight="0px";l=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";n.style.display=k.style.display;w.style.display=k.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)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"==l){if(this.layersEnabled){var v=this.graph.getModel(),B=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
-g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=B.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
-"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){B.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});B.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l],
-null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(c=d.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),e.appendChild(c));this.minToolbarWidth=34*f;var y=d.style.border,c=mxUtils.bind(this,function(){var a=d.getBoundingClientRect(),b=mxUtils.getScrollOrigin(document.body),b="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-b.x,top:-b.y},a={left:a.left-b.left,top:a.top-b.top,bottom:a.bottom-b.top,right:a.right-b.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,d.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==y&&(d.style.border="1px solid #d0d0d0");document.body.appendChild(e);var c=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
-g=null),d.style.border=y)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==d||a==e||a==g)return;a=a.parentNode}c()});mxEvent.addListener(document,"mouseleave",function(a){c()})});mxEvent.addListener(d,"mouseenter",c)};
-GraphViewer.prototype.addClickHandler=function(a,d){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,b){if(null==b){var h=mxEvent.getSource(e);"a"==h.nodeName.toLowerCase()&&(b=h.getAttribute("href"))}null!=d?null==b||a.isExternalProtocol(b)||a.isBlankLink(b)||window.setTimeout(function(){d.destroy()},0):null!=b&&null==d&&a.isCustomLink(b)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&a.customLinkClicked(b)&&mxEvent.consume(e)}),
-mxUtils.bind(this,function(a){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(a,d,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<u&&Math.abs(this.scrollTop-q.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,g=null,n=null,r=0;r<c.length;r++){var h=c[r];if("pages"==h){n=b.ownerDocument.createElement("div");
+n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var m=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");m.style.borderRightStyle="none";m.style.paddingLeft="0px";m.style.paddingRight="0px";e.appendChild(n);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");w.style.paddingLeft="0px";w.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";m.style.display=n.style.display;w.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)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"==h){if(this.layersEnabled){var v=this.graph.getModel(),A=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=A.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
+"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){A.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});A.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
+null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);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),e.appendChild(c));this.minToolbarWidth=34*f;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};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==y&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
+g=null),b.style.border=y)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==g)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",c)};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&a.customLinkClicked(d)&&mxEvent.consume(e)}),
+mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev=
"1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),d=document.createElement("div");mxClient.IS_QUIRKS?(d.style.position="absolute",d.style.left=a.x+"px",d.style.top=a.y+"px",d.style.width=document.body.offsetWidth+"px",d.style.height=document.body.offsetHeight+"px"):d.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";d.style.zIndex=this.lightboxZIndex;d.style.backgroundColor="#000000";mxUtils.setOpacity(d,70);document.body.appendChild(d);
-var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){b.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 b=new EditorUi(new Editor(!0),document.createElement("div"),!0);b.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";b.refresh=
-function(){};var h=mxUtils.bind(this,function(a){27==a.keyCode&&b.destroy()}),m=b.destroy;b.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",h);document.body.removeChild(d);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=b.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",h)):(d.style.display="none",e.style.display="none");var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=b.createTemporaryGraph;b.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(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,b);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);b.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");b.chromelessToolbar.style.bottom=
-"60px";b.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(b.chromelessToolbar);b.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",b.chromelessToolbar.style.display="block",b.chromelessToolbar.style.position="absolute",
-b.chromelessToolbar.style.bottom="",b.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");b.lightboxFit();b.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(d,"click",function(){b.destroy()})}),0);return b};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var d=document.getElementsByClassName(a);a=[];for(var e=0;e<d.length;e++)a.push(d[e]);return a}for(var b=document.getElementsByTagName("*"),d=[],e=0;e<b.length;e++){var h=b[e].className;null!=h&&0<h.length&&(h=h.split(" "),0<=mxUtils.indexOf(h,a)&&d.push(b[e]))}return d};
-GraphViewer.createViewerForElement=function(a,d){var e=a.getAttribute("data-mxgraph");if(null!=e){var b=JSON.parse(e),h=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,b);null!=d&&d(e)};null!=b.url?GraphViewer.getUrl(b.url,function(a){h(a)}):h(b.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(d){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,d,e){if(null!=GraphViewer.cachedUrls[a])d(GraphViewer.cachedUrls[a]);else{var b=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;b.open("GET",a);b.onload=function(){d(null!=b.getText?b.getText():b.responseText)};b.onerror=e;b.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},d=function(e,b){function h(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
-new h,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"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var k=!1,p=function(){b.resizedAttached&&(k&&(b.resizedAttached.call(),k=!1),a(p))};a(p);var q,t,u,H,G=function(){if((u=b.offsetWidth)!=q||(H=b.offsetHeight)!=t)k=!0,q=u,t=H;g()},A=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};A(d,"scroll",G);A(f,"scroll",G)}var q=function(){GraphViewer.resizeSensorEnabled&&b()},u=Object.prototype.toString.call(e),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var u=0,f=e.length;u<f;u++)p(e[u],q);else p(e,q);this.detach=function(){if(c)for(var a=0,b=e.length;a<b;a++)d.detach(e[a]);else d.detach(e)}};
-d.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=d})();
+GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
+var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){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()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",k)):(b.style.display="none",e.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(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.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&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.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(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(e){throw a.innerHTML=e.message,e;}})};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
+GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function 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"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,u,H,G=function(){if((u=b.offsetWidth)!=q||(H=b.offsetHeight)!=t)n=!0,q=u,t=H;g()},B=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};B(d,"scroll",G);B(f,"scroll",G)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(e),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var u=0,f=e.length;u<f;u++)p(e[u],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}};
+b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txt
index c872a2a7..14f98149 100644
--- a/src/main/webapp/resources/dia.txt
+++ b/src/main/webapp/resources/dia.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt
index 7994042b..01a8ea05 100644
--- a/src/main/webapp/resources/dia_am.txt
+++ b/src/main/webapp/resources/dia_am.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txt
index faade9cb..aeb45b3f 100644
--- a/src/main/webapp/resources/dia_ar.txt
+++ b/src/main/webapp/resources/dia_ar.txt
@@ -90,6 +90,7 @@ chatLeft=‫غادر {1}‬
chatWindowTitle=‫دردشة‬
chooseAnOption=‫اختر خيارا‬
chromeApp=‫تطبيق Chrome‬
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=‫تصدير ك‬
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=‫إضافات‬
facebook=Facebook
failedToSaveTryReconnect=‫لم يتم الحفظ، محاولة إعادة الاتصال.‬
@@ -252,7 +254,7 @@ feedback=‫تعليق‬
feedbackSent=‫تم إرسال التعليق بنجاح.‬
floorplans=Floorplans
file=‫ملف‬
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=‫اسم الملف‬
fileExists=‫الملف موجود مسبقا‬
diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txt
index add7639b..4e2efbe7 100644
--- a/src/main/webapp/resources/dia_bg.txt
+++ b/src/main/webapp/resources/dia_bg.txt
@@ -90,6 +90,7 @@ chatLeft={1} напусна
chatWindowTitle=Чат
chooseAnOption=Изберете опция
chromeApp=Chrome приложение
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Компресиран
commitMessage=Съобщение при подаване
csv=CSV
@@ -244,6 +245,7 @@ exporting=Експортиране
exportAs=Експортиране като
exportOptionsDisabled=Опцията за експортиране е деактивирана
exportOptionsDisabledDetails=Собственикът е деактивирал опциите за изтегляне, принтиране и копиране за хората, които коментират и разглеждат този файл.
+externalChanges=External Changes
extras=Екстри
facebook=Facebook
failedToSaveTryReconnect=Неуспешно запазване, опит за повторно свързване
diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt
index ce97cdce..dc8a00bf 100644
--- a/src/main/webapp/resources/dia_bn.txt
+++ b/src/main/webapp/resources/dia_bn.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txt
index 085f73e4..a7048bc1 100644
--- a/src/main/webapp/resources/dia_bs.txt
+++ b/src/main/webapp/resources/dia_bs.txt
@@ -90,6 +90,7 @@ chatLeft={1} je otišao
chatWindowTitle=Razgovor
chooseAnOption=Izaberite opciju
chromeApp=Chrome Aplikacija
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Kompresovano
commitMessage=Posveti poruku
csv=CSV
@@ -244,6 +245,7 @@ exporting=Izvozi
exportAs=Izvezi kao
exportOptionsDisabled=Opcije izvoza onemogućene
exportOptionsDisabledDetails=Vlasnik je za ovaj fajl komentatorima i posjetiocima onemogućio preuzimanje, printanje i kopiranje.
+externalChanges=External Changes
extras=Dodaci
facebook=Facebook
failedToSaveTryReconnect=Spašavanje nije uspjelo, pokušaj ponovnog povezivanja
diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt
index 8b4dadf4..9997d872 100644
--- a/src/main/webapp/resources/dia_ca.txt
+++ b/src/main/webapp/resources/dia_ca.txt
@@ -90,6 +90,7 @@ chatLeft={1} ha sortit
chatWindowTitle=Xat
chooseAnOption=Escolliu una opció
chromeApp=Aplicació Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Comprimit
commitMessage=Missatge de Commit
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportant
exportAs=Exporta com a
exportOptionsDisabled=Opcions d'exportació inactives
exportOptionsDisabledDetails=El propietari ha desactivat les opcions per a descarregar, imprimir o copiar aquest fitxer per las que només tenen permís per visualitzar i comentar.
+externalChanges=External Changes
extras=Extres
facebook=Facebook
failedToSaveTryReconnect=Error en desar, intentant reconnectar
diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txt
index 6ef168c7..12b89717 100644
--- a/src/main/webapp/resources/dia_cs.txt
+++ b/src/main/webapp/resources/dia_cs.txt
@@ -90,6 +90,7 @@ chatLeft={1} se odhlásil
chatWindowTitle=Chat
chooseAnOption=Vyberte možnost
chromeApp=Aplikace Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Komprimováno
commitMessage=Zpráva ke commitu
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportuji
exportAs=Exportovat jako
exportOptionsDisabled=Možnost exportu je vypnutá
exportOptionsDisabledDetails=Vlastník pro komentující a diváky vypnul možnost stažení, tisku nebo kopírování.
+externalChanges=External Changes
extras=Extra
facebook=Facebook
failedToSaveTryReconnect=Uložení se nezdařilo, zkouším se znovu připojit
diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txt
index 8e192f92..fb441554 100644
--- a/src/main/webapp/resources/dia_da.txt
+++ b/src/main/webapp/resources/dia_da.txt
@@ -90,6 +90,7 @@ chatLeft={1} har forladt chatten
chatWindowTitle=Chat
chooseAnOption=Vælg en mulighed
chromeApp=Chrome app
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Komprimeret
commitMessage=Commit Besked
csv=CSV
@@ -244,6 +245,7 @@ exporting=Eksporterer
exportAs=Eksporterer som
exportOptionsDisabled=Eksportmuligheder deaktiveret
exportOptionsDisabledDetails=Ejeren har deaktiveret muligheder for at downloade, printe eller kopiere for kommentører og seere på denne fil.
+externalChanges=External Changes
extras=Ekstra
facebook=Facebook
failedToSaveTryReconnect=Kunne ikke gemme, forsøger at genoprette forbindelsen
diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt
index 2c875f78..06d807d1 100644
--- a/src/main/webapp/resources/dia_de.txt
+++ b/src/main/webapp/resources/dia_de.txt
@@ -90,6 +90,7 @@ chatLeft={1} hat den Chat verlassen
chatWindowTitle=Chat
chooseAnOption=Wählen Sie eine Option
chromeApp=Chrome app
+collaborativeEditingNotice=Wichtige Mitteilung für gemeinesames Bearbeiten
compressed=Komprimiert
commitMessage=Commit-Nachricht
csv=CSV
@@ -244,6 +245,7 @@ exporting=Wird exportiert
exportAs=Exportieren als
exportOptionsDisabled=Exportoptionen deaktiviert
exportOptionsDisabledDetails=Der Nutzer hat die Optionen zum Herunterladen, Drucken und Kopieren dieser Datei für Nutzer mit Kommentier- und Lesezugriff deaktiviert.
+externalChanges=Externe Änderungen
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Speichern fehlgeschlagen. Verbindungswiederherstellung
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback erfolgreich versendet.
floorplans=Grundriss
file=Datei
-fileChangedOverwrite=Datei wurde geändert. Änderungen überschreiben?
+fileChangedOverwrite=Die Datei wurde geändert. Möchten Sie die Datei speichern und die Änderungen überschreiben?
overwrite=Überschreiben
filename=Dateiname
fileExists=Datei existiert bereits
diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txt
index e9069d6a..73ac7796 100644
--- a/src/main/webapp/resources/dia_el.txt
+++ b/src/main/webapp/resources/dia_el.txt
@@ -90,6 +90,7 @@ chatLeft={1} έχει εξέρθει
chatWindowTitle=Chat
chooseAnOption=Διαλέξτε μια επιλογή
chromeApp=Εφαρμογή Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Συμπιεσμένο
commitMessage=Υποβολή μυνήματος
csv=CSV
@@ -244,6 +245,7 @@ exporting=Γίνετε εξαγωγή
exportAs=Εξαγωγή ως
exportOptionsDisabled=Οι επιλογές εξαγωγής έχουν απενεργοποιηθεί
exportOptionsDisabledDetails=Ο ιδιοκτήτης έχει απενεργοποιήσει τις επιλογές λήψης, εκτύπωσης ή αντιγραφής του αρχείου για τους σχολιαστές και τους θεατές.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Αποτυχία αποθήκευσης, γίνεται προσπάθεια επανασύνδεσης
diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt
index 138b700d..3963dedb 100644
--- a/src/main/webapp/resources/dia_eo.txt
+++ b/src/main/webapp/resources/dia_eo.txt
@@ -1,14 +1,14 @@
# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*
# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE
aboutDrawio=Pri draw.io
-accessDenied=Access Denied
-action=Action
-actualSize=Actual Size
+accessDenied=Aliro rifuzita
+action=Ago
+actualSize=Vera grandeco
add=Aldoni
-addedFile=Added {1}
+addedFile={1} aldonita
addImages=Aldoni bildojn
addImageUrl=Add Image URL
-addLayer=Add Layer
+addLayer=Aldoni tavolon
addProperty=Aldoni econ
address=Adreso
addToExistingDrawing=Add to Existing Drawing
@@ -24,7 +24,7 @@ allSpaces=All Spaces
allTags=All Tags
anchor=Anchor
android=Android
-angle=Angle
+angle=Angulo
arc=Arc
areYouSure=Ĉu vi certas?
ensureDataSaved=Please ensure your data is saved before closing.
@@ -81,15 +81,16 @@ center=Center
cannotLoad=Load attempts failed. Please try again later.
cannotLogin=Log in attempts failed. Please try again later.
cannotOpenFile=Cannot open file
-change=Change
+change=Ŝanĝi
changeOrientation=Change Orientation
-changeUser=Change user
+changeUser=Ŝanĝi uzanton
changesNotSaved=Changes have not been saved
chatJoined={1} has joined
chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=Dosiero
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Dosiernomo
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txt
index 864be42b..dd9aee88 100644
--- a/src/main/webapp/resources/dia_es.txt
+++ b/src/main/webapp/resources/dia_es.txt
@@ -90,6 +90,7 @@ chatLeft={1} se ha ido
chatWindowTitle=Chat
chooseAnOption=Elegir una opción
chromeApp=Aplicación Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Comprimido
commitMessage=Confirmar mensaje
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportando
exportAs=Exportar como
exportOptionsDisabled=Las opciones para exportar están deshabilitadas
exportOptionsDisabledDetails=El propietario ha deshabilitado las opciones de descargar, imprimir o copiar para los comentadores u observadores de este archivo.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Falló al guardar, intentando reconectar
diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txt
index fda8512b..9adb4b75 100644
--- a/src/main/webapp/resources/dia_et.txt
+++ b/src/main/webapp/resources/dia_et.txt
@@ -90,6 +90,7 @@ chatLeft={1} lahkus
chatWindowTitle=Chat
chooseAnOption=Tee valik
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Pakitud
commitMessage=Kinnita sõnum
csv=CSV
@@ -244,6 +245,7 @@ exporting=Eksport
exportAs=Ekspordi nimega
exportOptionsDisabled=Ekspordi valikud keelatud
exportOptionsDisabledDetails=Faili omanik on keelanud võimaluse kommenteerijatel ja vaatajatel sisu alla laadida, printida või kopeerida.
+externalChanges=External Changes
extras=Lisad
facebook=Facebook
failedToSaveTryReconnect=Salvestamine ebaõnnestunud, proov ühendust luua
diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txt
index 648be893..41895364 100644
--- a/src/main/webapp/resources/dia_fa.txt
+++ b/src/main/webapp/resources/dia_fa.txt
@@ -90,6 +90,7 @@ chatLeft=‫{1} خارج شده است.‬
chatWindowTitle=‫چت‬
chooseAnOption=‫یک گزینه را انتخاب نمایید‬
chromeApp=‫اپلیکیشن کروم‬
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=‫فشرده‬
commitMessage=‫تایید پیام‬
csv=CSV
@@ -244,6 +245,7 @@ exporting=‫در حال فرستادن‬
exportAs=‫فرستادن به عنوان‬
exportOptionsDisabled=‫گزینه های فرستادن غیرفعال گشته اند‬
exportOptionsDisabledDetails=‫دارنده امکان دانلود، چاپ و کپی برای نظردهندگان و بینندگان این فایل را غیرفعال کرده است.‬
+externalChanges=External Changes
extras=‫موارد اضافی‬
facebook=‫فیسبوک‬
failedToSaveTryReconnect=‫عدم ذخیره سازی، سعی در اتصال مجدد‬
diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txt
index 387dff7c..12eee5b4 100644
--- a/src/main/webapp/resources/dia_fi.txt
+++ b/src/main/webapp/resources/dia_fi.txt
@@ -90,6 +90,7 @@ chatLeft={1} lähti pois keskustelusta
chatWindowTitle=Chat
chooseAnOption=Valitse vaihtoehto
chromeApp=Chrome-sovellus
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Pakattu
commitMessage=Lähetä viesti
csv=CSV
@@ -244,6 +245,7 @@ exporting=Viedään
exportAs=Vie nimellä
exportOptionsDisabled=Vientivalinnat pois käytöstä
exportOptionsDisabledDetails=Omistaja on poistanut valinnat lataamiseen, tulostamiseen tai kopioimiseen kommentoijille ja katsojille tässä tiedostossa.
+externalChanges=External Changes
extras=Extrat
facebook=Facebook
failedToSaveTryReconnect=Tallentaminen epäonnistui, yritetään yhdistää uudelleen
diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txt
index de81d17c..29192eb7 100644
--- a/src/main/webapp/resources/dia_fil.txt
+++ b/src/main/webapp/resources/dia_fil.txt
@@ -90,6 +90,7 @@ chatLeft={1} ay umalis
chatWindowTitle=Pag-uusap
chooseAnOption=Magtakda ng Pagpipilian
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Siniksik
commitMessage=Maglagak ng mensahe
csv=CSV
@@ -244,6 +245,7 @@ exporting=Iniluluwas
exportAs=Iluwas bilang
exportOptionsDisabled=Ang mga pagpipilian sa pagluwas ay di pinagana
exportOptionsDisabledDetails=Di pinagana ng may-ari ang mga pagpipilian para mag download, iprinta, o kumopya para sa mga nagkukumento o tumitingin ng file na ito.
+externalChanges=External Changes
extras=Mga dagdag
facebook=Facebook
failedToSaveTryReconnect=Bigong mag-save, sinusubukang kumonektang muli.
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index 40511309..a550a216 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -90,6 +90,7 @@ chatLeft={1} a quitté le chat
chatWindowTitle=Chat
chooseAnOption=Choisir une option
chromeApp=Application Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressé
commitMessage=Message commit
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportation
exportAs=Exporter en tant que
exportOptionsDisabled=Possibilités d'export désactivées
exportOptionsDisabledDetails=Le propriétaire a désactivé les possibilités de téléchargement, d'impression ou de copie pour les commentateurs et observateurs sur ce fichier.
+externalChanges=External Changes
extras=Suppléments
facebook=Facebook
failedToSaveTryReconnect=La sauvegarde a échoué, tentative de reconnexion
diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt
index c7d14c90..03d06978 100644
--- a/src/main/webapp/resources/dia_gu.txt
+++ b/src/main/webapp/resources/dia_gu.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txt
index 5d721349..b39e108e 100644
--- a/src/main/webapp/resources/dia_he.txt
+++ b/src/main/webapp/resources/dia_he.txt
@@ -90,6 +90,7 @@ chatLeft=‫{1} עזב‬
chatWindowTitle=‫צ'אט‬
chooseAnOption=‫בחר אפשרות‬
chromeApp=‫אפליקציית כרום‬
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=‫דחוס‬
commitMessage=‫הודעת commit‬
csv=CSV
@@ -244,6 +245,7 @@ exporting=‫ייצוא‬
exportAs=‫ייצא בתור‬
exportOptionsDisabled=‫האפשרות לייצא הושבתה‬
exportOptionsDisabledDetails=‫האחראי הגביל את האפשרות להוריד, להדפיס או להעתיק עבור מגיבים וצופים בקובץ זה.‬
+externalChanges=External Changes
extras=‫תוספות‬
facebook=‫פייסבוק‬
failedToSaveTryReconnect=‫השמירה נכשלה, מנסה להתחבר מחדש‬
diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt
index dca1562e..4a509c73 100644
--- a/src/main/webapp/resources/dia_hi.txt
+++ b/src/main/webapp/resources/dia_hi.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt
index 925ae556..b05affb1 100644
--- a/src/main/webapp/resources/dia_hr.txt
+++ b/src/main/webapp/resources/dia_hr.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txt
index dface124..7d8930d5 100644
--- a/src/main/webapp/resources/dia_hu.txt
+++ b/src/main/webapp/resources/dia_hu.txt
@@ -90,6 +90,7 @@ chatLeft={1} távozott
chatWindowTitle=Cseveg
chooseAnOption=Válasszon opciót
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Tömörített
commitMessage=Üzenetet küld
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportálás folyamatban
exportAs=Exportálás másként
exportOptionsDisabled=Exportálási opciók letiltva
exportOptionsDisabledDetails=A tulajdonos letiltotta a letöltési, nyomtatási vagy másolási opciókat a kommentelőknek és nézőknek ezen a fájlon.
+externalChanges=External Changes
extras=Extrák
facebook=Facebook
failedToSaveTryReconnect=Sikertelen mentés, próbáljon újrakapcsolódni
diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txt
index ed4ee0ee..f8ecd516 100644
--- a/src/main/webapp/resources/dia_i18n.txt
+++ b/src/main/webapp/resources/dia_i18n.txt
@@ -90,6 +90,7 @@ chatLeft=chatLeft
chatWindowTitle=chatWindowTitle
chooseAnOption=chooseAnOption
chromeApp=chromeApp
+collaborativeEditingNotice=collaborativeEditingNotice
compressed=compressed
commitMessage=commitMessage
csv=csv
@@ -244,6 +245,7 @@ exporting=exporting
exportAs=exportAs
exportOptionsDisabled=exportOptionsDisabled
exportOptionsDisabledDetails=exportOptionsDisabledDetails
+externalChanges=externalChanges
extras=extras
facebook=facebook
failedToSaveTryReconnect=failedToSaveTryReconnect
diff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txt
index ae2f7041..800b18c9 100644
--- a/src/main/webapp/resources/dia_id.txt
+++ b/src/main/webapp/resources/dia_id.txt
@@ -90,6 +90,7 @@ chatLeft={1} keluar
chatWindowTitle=Obrolan
chooseAnOption=Pilih salah satu opsi
chromeApp=Aplikasi Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Mampat
commitMessage=Kirim Pesan
csv=CSV
@@ -244,6 +245,7 @@ exporting=Mengekspor
exportAs=Ekspor sebagai
exportOptionsDisabled=Pilihan ekspor nonaktif
exportOptionsDisabledDetails=Pemilik telah menonaktifkan opsi unduh, cetak, atau salin untuk pengomentar dan pembaca berkas ini.
+externalChanges=External Changes
extras=Ekstra
facebook=Facebook
failedToSaveTryReconnect=Gagal menyimpan, mencoba menghubungkan kembali
diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txt
index 09593fb3..591ff71d 100644
--- a/src/main/webapp/resources/dia_it.txt
+++ b/src/main/webapp/resources/dia_it.txt
@@ -90,6 +90,7 @@ chatLeft={1} è uscito
chatWindowTitle=Chat
chooseAnOption=Scegli un'opzione
chromeApp=App Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compresso
commitMessage=Invia il messaggio
csv=CSV
@@ -244,6 +245,7 @@ exporting=Esportando
exportAs=Esporta come
exportOptionsDisabled=Opzioni di esporto disabilitate
exportOptionsDisabledDetails=Il proprietario ha disabilitato le opzioni di download, stampa e copia per i commentatori ed i lettori del file.
+externalChanges=External Changes
extras=Altro
facebook=Facebook
failedToSaveTryReconnect=Impossibile salvare, riconnessione in corso
diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txt
index 96791c33..bde9c487 100644
--- a/src/main/webapp/resources/dia_ja.txt
+++ b/src/main/webapp/resources/dia_ja.txt
@@ -90,6 +90,7 @@ chatLeft={1} がチャットを去りました。
chatWindowTitle=チャット
chooseAnOption=オプションを選んでください
chromeApp=Chrome アプリ
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=圧縮
commitMessage=メッセージを省略する
csv=CSV
@@ -244,6 +245,7 @@ exporting=エクスポート中
exportAs=形式を指定してエクスポート
exportOptionsDisabled=エクスポートは使えません
exportOptionsDisabledDetails=所有者は、視聴者や編集者がダウンロード、印刷、コピーをすることを認めていません。
+externalChanges=External Changes
extras=拡張
facebook=フェイスブック
failedToSaveTryReconnect=保存に失敗しました。再接続中です。
diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt
index 42bb37da..089631e4 100644
--- a/src/main/webapp/resources/dia_kn.txt
+++ b/src/main/webapp/resources/dia_kn.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txt
index 0c176743..62b4f010 100644
--- a/src/main/webapp/resources/dia_ko.txt
+++ b/src/main/webapp/resources/dia_ko.txt
@@ -90,6 +90,7 @@ chatLeft={1}님이 대화에서 나갔습니다
chatWindowTitle=대화창
chooseAnOption=옵션 선택
chromeApp=크롬 앱
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=압축
commitMessage=메세지 전송
csv=CSV
@@ -244,6 +245,7 @@ exporting=내보내는 중
exportAs=다른 파일 형식으로 내보내기
exportOptionsDisabled=내보내기 옵션 사용불가
exportOptionsDisabledDetails=소유자가 확인자 및 주석자들의 다운로드, 인쇄, 복사를 허용하지 않습니다.
+externalChanges=External Changes
extras=추가 도구
facebook=페이스북
failedToSaveTryReconnect=저장 실패, 재연결중
diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt
index c7756fd4..44eba042 100644
--- a/src/main/webapp/resources/dia_lt.txt
+++ b/src/main/webapp/resources/dia_lt.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txt
index 084f33fe..9e7afcd7 100644
--- a/src/main/webapp/resources/dia_lv.txt
+++ b/src/main/webapp/resources/dia_lv.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt
index 4a374883..fbc922a7 100644
--- a/src/main/webapp/resources/dia_ml.txt
+++ b/src/main/webapp/resources/dia_ml.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt
index 873fe2b5..556cfcc1 100644
--- a/src/main/webapp/resources/dia_mr.txt
+++ b/src/main/webapp/resources/dia_mr.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txt
index 7daa0da0..1f228b48 100644
--- a/src/main/webapp/resources/dia_ms.txt
+++ b/src/main/webapp/resources/dia_ms.txt
@@ -90,6 +90,7 @@ chatLeft={1} telah beredar
chatWindowTitle=Sembang
chooseAnOption=Pilih satu opsyen
chromeApp=Aplikasi Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Mampat
commitMessage=Hantar Mesej
csv=CSV
@@ -244,6 +245,7 @@ exporting=Mengeksport
exportAs=Eksport sebagai
exportOptionsDisabled=Pilihan eksport dilumpuhkan
exportOptionsDisabledDetails=Pemilik telah melumpuhkan pilihan untuk memuat turun, mencetak atau menyalin untuk pengulas dan penonton pada fail ini.
+externalChanges=External Changes
extras=Tambahan
facebook=Facebook
failedToSaveTryReconnect=Gagal untuk menyimpan, cuba untuk menyambung semula
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index ad50d674..6fb286ed 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -2,7 +2,7 @@
# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE
aboutDrawio=Over draw.io
accessDenied=Toegang geweigerd
-action=Action
+action=Actie
actualSize=Ware grootte
add=Toevoegen
addedFile={1} toegevoegd
@@ -90,6 +90,7 @@ chatLeft={1} is vertrokken
chatWindowTitle=Chat
chooseAnOption=Kies een optie
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Gecomprimeerd
commitMessage=Bericht vastleggen
csv=CSV
@@ -128,7 +129,7 @@ copy=Kopiëren
copyConnect=Kopiëren bij verbinding
copyOf=Kopie van {1}
copyOfDrawing=Kopie van tekening
-copySize=Copy Size
+copySize=Afmetingen kopiëren
copyStyle=Stijl kopiëren
create=Aanmaken
createNewDiagram=Nieuw diagram aanmaken
@@ -174,7 +175,7 @@ doubleClickOrientation=Dubbelklik om oriëntatie te wijzigen
doubleClickTooltip=Dubbelklik om tekst in te voegen
doubleClickChangeProperty=Dubbelklik om eigenschapsnaam te wijzigen
download=Downloaden
-downloadDesktop=Download draw.io Desktop
+downloadDesktop=draw.io Bureaublad-app downloaden
downloadAs=Downloaden als
clickHereToSave=Klik hier om op te slaan.
draftDiscarded=Concept genegeerd
@@ -244,6 +245,7 @@ exporting=Exporteren
exportAs=Exporteren als
exportOptionsDisabled=Exportopties uitgeschakeld
exportOptionsDisabledDetails=De eigenaar heeft opties voor het downloaden, afdrukken of kopiëren uitgeschakeld voor commentatoren en bekijkers van dit bestand.
+externalChanges=External Changes
extras=Extra's
facebook=Facebook
failedToSaveTryReconnect=Opslaan mislukt, opnieuw verbinden maken
@@ -513,7 +515,7 @@ paperSize=Papiergrootte
pattern=Patroon
paste=Plakken
pasteHere=Hier plakken
-pasteSize=Paste Size
+pasteSize=Afmetingen plakken
pasteStyle=Stijl plakken
perimeter=Begrenzing
permissionAnyone=Iedereen kan bewerken
@@ -553,7 +555,7 @@ realtimeTimeout=Het lijkt alsof u enkele wijzigingen hebt aangebracht terwijl u
redo=Opnieuw
refresh=Herladen
regularExpression=Reguliere expressie
-relative=Relative
+relative=Relatief
relativeUrlNotAllowed=Relatieve URL niet toegestaan
rememberMe=Onthoud mij
rememberThisSetting=Deze instelling onthouden
@@ -697,7 +699,7 @@ updatingPreview=Voorbeeld wordt bijgewerkt. Even wachten...
updatingSelection=Selectie wordt bijgewerkt. Even wachten...
upload=Uploaden
url=URL
-useOffline=Use Offline
+useOffline=Offline gebruiken
useRootFolder=Hoofdmap gebruiken?
userManual=Gebruikershandleiding
vertical=Verticaal
diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txt
index a5dda99f..8a1f81d9 100644
--- a/src/main/webapp/resources/dia_no.txt
+++ b/src/main/webapp/resources/dia_no.txt
@@ -90,6 +90,7 @@ chatLeft={1} har dratt
chatWindowTitle=Chat
chooseAnOption=Velg et alternativ
chromeApp=Chrome-app
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Komprimert
commitMessage=Forpliktende Melding
csv=CSV
@@ -244,6 +245,7 @@ exporting=Eksporterer
exportAs=Eksporter som
exportOptionsDisabled=Eksport alternativer deaktivert
exportOptionsDisabledDetails=Eieren har deaktivert nedlastning, print og kopieringsalternativer for kommentatorer og seere for denne filen.
+externalChanges=External Changes
extras=Ekstra
facebook=Facebook
failedToSaveTryReconnect=Feil under lagring, prøver å koble til på nytt
diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txt
index 0fac5cc7..3f29c1e1 100644
--- a/src/main/webapp/resources/dia_pl.txt
+++ b/src/main/webapp/resources/dia_pl.txt
@@ -90,6 +90,7 @@ chatLeft={1} opuścił
chatWindowTitle=Chat
chooseAnOption=Wybierz opcję
chromeApp=Aplikacja Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Skompresowany
commitMessage=commit Wiadomość
csv=CSV
@@ -244,6 +245,7 @@ exporting=Eksportowanie
exportAs=Eksportuj jako
exportOptionsDisabled=Opcja eksporu została zablokowana
exportOptionsDisabledDetails=Właściciel zablokował możliwość pobierania, drukowania i kopiowania dla przeglądających i komentujących.
+externalChanges=External Changes
extras=Dodatki
facebook=Facebook
failedToSaveTryReconnect=Błąd zapisu, próbuję połączyć ponownie
diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txt
index addb7865..75efa0d0 100644
--- a/src/main/webapp/resources/dia_pt-br.txt
+++ b/src/main/webapp/resources/dia_pt-br.txt
@@ -90,6 +90,7 @@ chatLeft={1} saiu
chatWindowTitle=Bate-papo
chooseAnOption=Escolha uma opção
chromeApp=Aplicativo Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Comprimido
commitMessage=Cometer mensagem
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportando
exportAs=Exportar como
exportOptionsDisabled=Exportar opções desabilitadas
exportOptionsDisabledDetails=O proprietário desabilitou as opções de download, impressão ou cópia para comentadores e visualizadores neste arquivo.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Falha ao salvar, tentando reconetar
diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txt
index 7c2132e1..2312d9f2 100644
--- a/src/main/webapp/resources/dia_pt.txt
+++ b/src/main/webapp/resources/dia_pt.txt
@@ -90,6 +90,7 @@ chatLeft={1} saiu
chatWindowTitle=Conversa
chooseAnOption=Escolha uma opção
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compactado
commitMessage=Mensagem da alteração
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportando
exportAs=Exportar como
exportOptionsDisabled=Exportar opções desactivadas
exportOptionsDisabledDetails=O proprietário desactivou as opções de descarga, impressão ou cópia para comentadores e visuaizados neste ficheiro.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Falha ao salvar, tentando reconetar
diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txt
index 2103d0c8..5d2c15cd 100644
--- a/src/main/webapp/resources/dia_ro.txt
+++ b/src/main/webapp/resources/dia_ro.txt
@@ -90,6 +90,7 @@ chatLeft={1} a plecat
chatWindowTitle=Chat
chooseAnOption=Alege o opţiune
chromeApp=Aplicaţie Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Comprimat
commitMessage=Comite un mesaj
csv=CSV
@@ -244,6 +245,7 @@ exporting=Se exportează
exportAs=Exportează ca
exportOptionsDisabled=Opțiunile de export au fost dezactivate
exportOptionsDisabledDetails=Deținătorul a dezactivat posibilitațile de download, imprimare sau copiere pentru comentatorii și vizualizatorii acestei pagini.
+externalChanges=External Changes
extras=Extra
facebook=Facebook
failedToSaveTryReconnect=Salvare eșuată, se încearcă reconectarea
diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt
index 04ee2c91..27d6bb61 100644
--- a/src/main/webapp/resources/dia_ru.txt
+++ b/src/main/webapp/resources/dia_ru.txt
@@ -90,6 +90,7 @@ chatLeft={1} вышел
chatWindowTitle=Чат
chooseAnOption=Выберите вариант
chromeApp=Приложение Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Сжато
commitMessage=Сообщение при коммите
csv=CSV
@@ -244,6 +245,7 @@ exporting=Экспорт
exportAs=Экспортировать как
exportOptionsDisabled=Возможности экспорта отключены
exportOptionsDisabledDetails=Владелец файла отключил возможности сохранения, печати или копирования данных при просмотре и комментировании этого файла.
+externalChanges=External Changes
extras=Дополнительно
facebook=Facebook
failedToSaveTryReconnect=Ошибка при сохранении, выполняется повторное подключение
diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt
index a98fde3c..1682969d 100644
--- a/src/main/webapp/resources/dia_sk.txt
+++ b/src/main/webapp/resources/dia_sk.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt
index 7b4f62e1..9b043589 100644
--- a/src/main/webapp/resources/dia_sl.txt
+++ b/src/main/webapp/resources/dia_sl.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txt
index 883a6072..9f5c4ae1 100644
--- a/src/main/webapp/resources/dia_sr.txt
+++ b/src/main/webapp/resources/dia_sr.txt
@@ -90,6 +90,7 @@ chatLeft={1} je otišao
chatWindowTitle=Razgovor
chooseAnOption=Izaberite opciju
chromeApp=Chrome Aplikacija
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Komprimovan
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Izvoz
exportAs=Izvezi kao
exportOptionsDisabled=Mogućnost izvoza je onemogućena
exportOptionsDisabledDetails=Vlasnik je onesposobio mogućnost preuzimanja, štampanja i kopiranja za komentatore i posmatrače ovog dokumenta.
+externalChanges=External Changes
extras=Dodaci
facebook=Facebook
failedToSaveTryReconnect=Neuspelo snimanje, pokušaj rekonekcije
diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txt
index fbee7173..47438b86 100644
--- a/src/main/webapp/resources/dia_sv.txt
+++ b/src/main/webapp/resources/dia_sv.txt
@@ -90,6 +90,7 @@ chatLeft={1} har lämnat
chatWindowTitle=Chatt
chooseAnOption=Välj ett alternativ
chromeApp=Chrome app
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Komprimerad
commitMessage=Skicka meddelande
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exportering
exportAs=Exportera som
exportOptionsDisabled=Exporteringsval inaktiverade
exportOptionsDisabledDetails=Ägaren har inaktiverat nerladdning, skriv ut eller kopiera för kommenterare och åskådare för denna fil.
+externalChanges=External Changes
extras=Extrafunktioner
facebook=Facebook
failedToSaveTryReconnect=Kunde inte spara, försöker återansluta
diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt
index 8a094b37..ab8c367d 100644
--- a/src/main/webapp/resources/dia_sw.txt
+++ b/src/main/webapp/resources/dia_sw.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txt
index 8c47a391..770b3d97 100644
--- a/src/main/webapp/resources/dia_ta.txt
+++ b/src/main/webapp/resources/dia_ta.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt
index 02259b7c..8bafe26c 100644
--- a/src/main/webapp/resources/dia_te.txt
+++ b/src/main/webapp/resources/dia_te.txt
@@ -90,6 +90,7 @@ chatLeft={1} has left
chatWindowTitle=Chat
chooseAnOption=Choose an option
chromeApp=Chrome App
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Compressed
commitMessage=Commit Message
csv=CSV
@@ -244,6 +245,7 @@ exporting=Exporting
exportAs=Export as
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
+externalChanges=External Changes
extras=Extras
facebook=Facebook
failedToSaveTryReconnect=Failed to save, trying to reconnect
@@ -252,7 +254,7 @@ feedback=Feedback
feedbackSent=Feedback successfully sent.
floorplans=Floorplans
file=File
-fileChangedOverwrite=File was changed. Overwrite changes?
+fileChangedOverwrite=The file has been modified. Do you want to save the file and overwrite those changes?
overwrite=Overwrite
filename=Filename
fileExists=File already exists
diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txt
index ff8bd865..e50b32e0 100644
--- a/src/main/webapp/resources/dia_th.txt
+++ b/src/main/webapp/resources/dia_th.txt
@@ -90,6 +90,7 @@ chatLeft={1} ได้ออกจากระบบ
chatWindowTitle=แชท
chooseAnOption=เลือกหนึ่งตัวเลือก
chromeApp=โครมแอพลิเคชั่น
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=บีบอัดแล้ว
commitMessage=ข้อความสัญญา
csv=CSV
@@ -244,6 +245,7 @@ exporting=การส่่งออก
exportAs=ส่งออกเป็น
exportOptionsDisabled=ตัวเลือกการส่งออกถูกปิดใช้งาน
exportOptionsDisabledDetails=เจ้าของได้ปิดการใช้งานดาวน์โหลด พิมพ์หรือสำเนาสำหรับผู้แสดงความเห็นและผู้ชมไฟล์นี้
+externalChanges=External Changes
extras=เอ็กซ์ตร้า
facebook=Facebook
failedToSaveTryReconnect=การบันทึกล้มเหลว กำลังพยายามเชื่อมต่อใหม่
diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txt
index 40b27479..e286510e 100644
--- a/src/main/webapp/resources/dia_tr.txt
+++ b/src/main/webapp/resources/dia_tr.txt
@@ -90,6 +90,7 @@ chatLeft={1} sohbeti terk etti
chatWindowTitle=Sohbet
chooseAnOption=Bir seçenek seçin
chromeApp=Chrome Uygulaması
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Sıkıştırılmış
commitMessage=Mesaj oluştur
csv=CSV
@@ -244,6 +245,7 @@ exporting=Dışa aktarma
exportAs=Farklı dışa aktar
exportOptionsDisabled=Dışa aktarma seçenekleri devre dışı
exportOptionsDisabledDetails=Yetkili, indirme, basım veya yorumlayıcılar için kopyalama seçeneklerini devre dışı bıraktı.
+externalChanges=External Changes
extras=Ekstralar
facebook=Facebook
failedToSaveTryReconnect=Kaydetme başarısız, tekrar bağlanmayı deniyor
diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt
index a492a04a..73e31cbd 100644
--- a/src/main/webapp/resources/dia_uk.txt
+++ b/src/main/webapp/resources/dia_uk.txt
@@ -90,6 +90,7 @@ chatLeft={1} вийшов
chatWindowTitle=Чат
chooseAnOption=Оберіть варіант
chromeApp=Додаток Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Стисло
commitMessage=Повідомлення при коміті
csv=CSV
@@ -244,6 +245,7 @@ exporting=Експортуємо
exportAs=Експортувати як
exportOptionsDisabled=Можливості експорту відключено
exportOptionsDisabledDetails=Власник відключив можливості скачування, друку та копіювання цього файлу для коментаторів та глядачів.
+externalChanges=External Changes
extras=Додатково
facebook=Facebook
failedToSaveTryReconnect=Не вдалося зберегти, спроба повторного підключення
diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txt
index eddc529c..e2486cd6 100644
--- a/src/main/webapp/resources/dia_vi.txt
+++ b/src/main/webapp/resources/dia_vi.txt
@@ -90,6 +90,7 @@ chatLeft={1} đã thoát
chatWindowTitle=Chat
chooseAnOption=Chọn một tùy chọn
chromeApp=Ứng dụng Chrome
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Đã nén
commitMessage=Nội dung thay đổi
csv=CSV
@@ -244,6 +245,7 @@ exporting=Đang xuất tập tin
exportAs=Xuất tập tin dưới dạng
exportOptionsDisabled=Lựa chọn xuất tập tin bị vô hiệu hóa
exportOptionsDisabledDetails=Người sở hữu đã vô hiệu hóa quyền tải xuống, in hoặc sao chép đối với người bình luận hoặc người xem tập tin này.
+externalChanges=External Changes
extras=Bổ sung
facebook=Facebook
failedToSaveTryReconnect=Lưu thất bại, đang thử kết nối lại
diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txt
index bcd050be..c6fa0c5d 100644
--- a/src/main/webapp/resources/dia_zh-tw.txt
+++ b/src/main/webapp/resources/dia_zh-tw.txt
@@ -90,6 +90,7 @@ chatLeft={1}已離開
chatWindowTitle=交談
chooseAnOption=請選擇一項
chromeApp=Chrome應用
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=已壓縮
commitMessage=提交訊息
csv=CSV
@@ -244,6 +245,7 @@ exporting=匯出中
exportAs=匯出為
exportOptionsDisabled=已禁用匯出
exportOptionsDisabledDetails=所有者已禁止評論者和瀏覽者下載,列印或複制此檔案。
+externalChanges=External Changes
extras=其他
facebook=Facebook
failedToSaveTryReconnect=存檔失敗,正嘗試重新連線
diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt
index cc4915c0..4061c1b3 100644
--- a/src/main/webapp/resources/dia_zh.txt
+++ b/src/main/webapp/resources/dia_zh.txt
@@ -90,6 +90,7 @@ chatLeft={1}已离开
chatWindowTitle=聊天
chooseAnOption=请选择一项
chromeApp=Chrome应用软件
+collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=已压缩
commitMessage=提交信息
csv=CSV
@@ -244,6 +245,7 @@ exporting=导出中
exportAs=导出为
exportOptionsDisabled=已禁止导出
exportOptionsDisabledDetails=所有者已禁止评论者及浏览者下载、打印或复制该文件。
+externalChanges=External Changes
extras=其它
facebook=Facebook
failedToSaveTryReconnect=保存失败,正在尝试重新连接