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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2019-07-19 11:51:19 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2019-07-19 11:51:19 +0300
commit5df243860f05c2b380d922a76a78bff470006ae6 (patch)
treeb3f2b591662cd5825cabeb0ce5e198869c75235b
parent832cc773a7a779169f09430cab971d06390d0f7e (diff)
11.0.0 releasev11.0.0
Former-commit-id: bff06f60f416b63575594a75291131d1254473a5
-rw-r--r--ChangeLog7
-rw-r--r--VERSION2
-rw-r--r--etc/build/build.xml3
-rw-r--r--etc/mxgraph/mxClient.js6
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/gitlab.html35
-rw-r--r--src/main/webapp/images/gitlab-logo-white.svg1
-rw-r--r--src/main/webapp/images/gitlab-logo.svg1
-rw-r--r--src/main/webapp/js/app.min.js2720
-rw-r--r--src/main/webapp/js/diagramly/App.js309
-rw-r--r--src/main/webapp/js/diagramly/Devel.js3
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js597
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js8
-rw-r--r--src/main/webapp/js/diagramly/DriveClient.js573
-rw-r--r--src/main/webapp/js/diagramly/Editor.js72
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js191
-rw-r--r--src/main/webapp/js/diagramly/GitHubClient.js73
-rw-r--r--src/main/webapp/js/diagramly/GitLabClient.js1018
-rw-r--r--src/main/webapp/js/diagramly/GitLabFile.js278
-rw-r--r--src/main/webapp/js/diagramly/GitLabLibrary.js28
-rw-r--r--src/main/webapp/js/diagramly/GraphViewer.js3
-rw-r--r--src/main/webapp/js/diagramly/Menus.js70
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js4
-rw-r--r--src/main/webapp/js/diagramly/mxFreehand.js119
-rw-r--r--src/main/webapp/js/mxgraph/Dialogs.js18
-rw-r--r--src/main/webapp/js/mxgraph/Format.js8
-rw-r--r--src/main/webapp/js/viewer.min.js1333
-rw-r--r--src/main/webapp/plugins/googledrive.js1
-rw-r--r--src/main/webapp/resources/dia.txt2
-rw-r--r--src/main/webapp/resources/dia_am.txt2
-rw-r--r--src/main/webapp/resources/dia_ar.txt2
-rw-r--r--src/main/webapp/resources/dia_bg.txt2
-rw-r--r--src/main/webapp/resources/dia_bn.txt2
-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.txt2
-rw-r--r--src/main/webapp/resources/dia_el.txt2
-rw-r--r--src/main/webapp/resources/dia_eo.txt2
-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.txt2
-rw-r--r--src/main/webapp/resources/dia_he.txt2
-rw-r--r--src/main/webapp/resources/dia_hi.txt2
-rw-r--r--src/main/webapp/resources/dia_hr.txt2
-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.txt2
-rw-r--r--src/main/webapp/resources/dia_ko.txt2
-rw-r--r--src/main/webapp/resources/dia_lt.txt2
-rw-r--r--src/main/webapp/resources/dia_lv.txt2
-rw-r--r--src/main/webapp/resources/dia_ml.txt2
-rw-r--r--src/main/webapp/resources/dia_mr.txt2
-rw-r--r--src/main/webapp/resources/dia_ms.txt2
-rw-r--r--src/main/webapp/resources/dia_nl.txt2
-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.txt2
-rw-r--r--src/main/webapp/resources/dia_sl.txt2
-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.txt2
-rw-r--r--src/main/webapp/resources/dia_ta.txt2
-rw-r--r--src/main/webapp/resources/dia_te.txt2
-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
-rw-r--r--src/main/webapp/templates/index.xml45
-rw-r--r--src/main/webapp/templates/network/arista.pngbin0 -> 4435 bytes
-rw-r--r--src/main/webapp/templates/network/arista.xml1
85 files changed, 4963 insertions, 2674 deletions
diff --git a/ChangeLog b/ChangeLog
index 758a6021..fa5fa99c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+19-JUL-2019: 11.0.0
+
+- Adds Show more option in splash screen
+- Adds uncompressed XML support (beta)
+- Adds support for GitLab (beta)
+- Uses mxGraph 4.0.3 beta 1
+
16-JUL-2019: 10.9.8
- Adds Extras, Insert, Freehand
diff --git a/VERSION b/VERSION
index d21bc0b1..4a68b557 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.9.8 \ No newline at end of file
+11.0.0 \ No newline at end of file
diff --git a/etc/build/build.xml b/etc/build/build.xml
index 8a40c8a4..8d663938 100644
--- a/etc/build/build.xml
+++ b/etc/build/build.xml
@@ -359,6 +359,9 @@
<file name="TrelloFile.js" />
<file name="TrelloLibrary.js" />
<file name="TrelloClient.js" />
+ <file name="GitLabFile.js" />
+ <file name="GitLabLibrary.js" />
+ <file name="GitLabClient.js" />
<file name="DrawioComment.js" />
<file name="DriveComment.js" />
</sources>
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index 847e10f4..96a7bb52 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"4.0.2",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")&&
+var mxClient={VERSION:"4.0.3",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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg",
@@ -1392,8 +1392,8 @@ mxGraphHandler.prototype.selectDelayed=function(a){this.graph.isCellSelected(thi
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));var g=this.graph.getModel().getParent(this.cell);null==e&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(g,a,f)&&(e=this.graph.getDefaultParent());d=d&&!this.graph.isCellLocked(e||this.graph.getDefaultParent());this.graph.getModel().beginUpdate();try{g=[];if(!d&&null!=e&&this.removeEmptyParents){for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(l=0;l<a.length;l++){var m=
this.graph.model.getParent(a[l]);null==m||k.get(m)||(k.put(m,!0),g.push(m))}}a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);b=[];for(l=0;l<g.length;l++)this.shouldRemoveParent(g[l])&&b.push(g[l]);this.graph.removeCells(b,!1)}finally{this.graph.getModel().endUpdate()}d&&this.graph.setSelectionCells(a);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0])};
-mxGraphHandler.prototype.shouldRemoveParent=function(a){var b=this.graph.view.getState(a);console.log("state",b,this.graph.model.getChildCount(b.cell));return null!=b&&(this.graph.model.isEdge(b.cell)||this.graph.model.isVertex(b.cell))&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)?(a=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),a==mxConstants.NONE&&b==mxConstants.NONE):
-!1};mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};
+mxGraphHandler.prototype.shouldRemoveParent=function(a){var b=this.graph.view.getState(a);return null!=b&&(this.graph.model.isEdge(b.cell)||this.graph.model.isVertex(b.cell))&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)?(a=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),a==mxConstants.NONE&&b==mxConstants.NONE):!1};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};
mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.refreshHandler&&(this.graph.getModel().removeListener(this.refreshHandler),this.refreshHandler=null);this.destroyShapes();this.removeHint()};
function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var b=c.getProperty("eventName"),e=c.getProperty("event");b==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",e)),e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,c){if(this.isPinchEnabled()){var b=
c.getProperty("event");mxEvent.isConsumed(b)||"gesturestart"!=b.type?"gestureend"==b.type&&null!=this.initialScale&&(this.initialScale=null):(this.initialScale=this.graph.view.scale,this.active||null==this.mouseDownEvent||(this.start(this.mouseDownEvent),this.mouseDownEvent=null));if(null!=this.initialScale){var e=Math.round(this.initialScale*b.scale*100)/100;null!=this.minScale&&(e=Math.max(this.minScale,e));null!=this.maxScale&&(e=Math.min(this.maxScale,e));this.graph.view.scale!=e&&(this.graph.zoomTo(e),
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 8693fb98..470cf0d4 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!
-# 07/16/2019 01:41 PM
+# 07/19/2019 10:46 AM
app.html
index.html?offline=1
diff --git a/src/main/webapp/gitlab.html b/src/main/webapp/gitlab.html
new file mode 100644
index 00000000..e9af7d31
--- /dev/null
+++ b/src/main/webapp/gitlab.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ This window will be closed automatically.
+ <script>
+ if (window.opener != null && window.opener.onGitLabCallback != null)
+ {
+ try
+ {
+ var search = window.location.href;
+ var idx1 = search.indexOf('access_token=');
+ var code = null;
+
+ if (idx1 >= 0)
+ {
+ var idx2 = search.indexOf('&', idx1);
+ code = search.substring(idx1 + 13, idx2);
+ }
+
+ // Continues execution of main program flow
+ window.opener.onGitLabCallback(code, window);
+ window.close();
+ }
+ catch (e)
+ {
+ alert('GitLab error: ' + e.toString());
+ window.close();
+ }
+ }
+ </script>
+ </body>
+</html> \ No newline at end of file
diff --git a/src/main/webapp/images/gitlab-logo-white.svg b/src/main/webapp/images/gitlab-logo-white.svg
new file mode 100644
index 00000000..3b6b3f36
--- /dev/null
+++ b/src/main/webapp/images/gitlab-logo-white.svg
@@ -0,0 +1 @@
+<svg id="logo_art" data-name="logo art" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 586 559"><defs><style>.cls-1{fill:#fff;}</style></defs><title>gitlab-icon-1-color-white-rgb</title><path class="cls-1" d="M461.48,298.35,443.7,243.72a7.72,7.72,0,0,0-.43-1.47L407.6,132.45a14.18,14.18,0,0,0-13.54-9.67,13.94,13.94,0,0,0-13.38,9.75l-34,104.63H239.37L205.32,132.53A13.94,13.94,0,0,0,192,122.78h-.08a14.22,14.22,0,0,0-13.5,9.76L142.72,242.47c0,.1-.08.18-.11.28l-18.1,55.61a20.29,20.29,0,0,0,7.37,22.71L288.26,434.7a8,8,0,0,0,9.45-.05l0,0L454.12,321.07A20.28,20.28,0,0,0,461.48,298.35ZM227.73,253.22l43.59,134.16L166.68,253.22Zm87,134.19,41.8-128.62,1.8-5.57h61.1L324.76,374.5Zm79.47-244.58,30.63,94.33H363.52ZM341.49,253.16l-30.37,93.46L293,402.28,244.58,253.16ZM191.85,142.83l30.69,94.33H161.27Zm-50.56,165.3a4.31,4.31,0,0,1-1.56-4.83L153.17,262l98.57,126.37Zm303.43,0L334.26,388.34l.37-.48L432.83,262l13.44,41.28A4.31,4.31,0,0,1,444.72,308.12Z"/></svg> \ No newline at end of file
diff --git a/src/main/webapp/images/gitlab-logo.svg b/src/main/webapp/images/gitlab-logo.svg
new file mode 100644
index 00000000..fd2bdb83
--- /dev/null
+++ b/src/main/webapp/images/gitlab-logo.svg
@@ -0,0 +1 @@
+<svg id="logo_art" data-name="logo art" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 586 559"><defs><style>.cls-1{fill:#fc6d26;}.cls-2{fill:#e24329;}.cls-3{fill:#fca326;}</style></defs><title>gitlab-icon-rgb</title><g id="g44"><path id="path46" class="cls-1" d="M461.17,301.83l-18.91-58.12L404.84,128.43a6.47,6.47,0,0,0-12.27,0L355.15,243.64H230.82L193.4,128.43a6.46,6.46,0,0,0-12.26,0L143.78,243.64l-18.91,58.19a12.88,12.88,0,0,0,4.66,14.39L293,435,456.44,316.22a12.9,12.9,0,0,0,4.73-14.39"/></g><g id="g48"><path id="path50" class="cls-2" d="M293,434.91h0l62.16-191.28H230.87L293,434.91Z"/></g><g id="g56"><path id="path58" class="cls-1" d="M293,434.91,230.82,243.63h-87L293,434.91Z"/></g><g id="g64"><path id="path66" class="cls-3" d="M143.75,243.69h0l-18.91,58.12a12.88,12.88,0,0,0,4.66,14.39L293,435,143.75,243.69Z"/></g><g id="g72"><path id="path74" class="cls-2" d="M143.78,243.69h87.11L193.4,128.49a6.47,6.47,0,0,0-12.27,0l-37.35,115.2Z"/></g><g id="g76"><path id="path78" class="cls-1" d="M293,434.91l62.16-191.28H442.3L293,434.91Z"/></g><g id="g80"><path id="path82" class="cls-3" d="M442.24,243.69h0l18.91,58.12a12.85,12.85,0,0,1-4.66,14.39L293,434.91l149.2-191.22Z"/></g><g id="g84"><path id="path86" class="cls-2" d="M442.28,243.69h-87.1l37.42-115.2a6.46,6.46,0,0,1,12.26,0l37.42,115.2Z"/></g></svg> \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index fbecab73..8090bb9a 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -141,7 +141,7 @@ ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefin
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL=
"https://log.draw.io"))})();if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);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:"4.0.2",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:"4.0.3",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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg",
@@ -1535,8 +1535,8 @@ mxGraphHandler.prototype.selectDelayed=function(a){this.graph.isCellSelected(thi
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));var g=this.graph.getModel().getParent(this.cell);null==e&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(g,a,f)&&(e=this.graph.getDefaultParent());d=d&&!this.graph.isCellLocked(e||this.graph.getDefaultParent());this.graph.getModel().beginUpdate();try{g=[];if(!d&&null!=e&&this.removeEmptyParents){for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(l=0;l<a.length;l++){var m=
this.graph.model.getParent(a[l]);null==m||k.get(m)||(k.put(m,!0),g.push(m))}}a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);b=[];for(l=0;l<g.length;l++)this.shouldRemoveParent(g[l])&&b.push(g[l]);this.graph.removeCells(b,!1)}finally{this.graph.getModel().endUpdate()}d&&this.graph.setSelectionCells(a);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0])};
-mxGraphHandler.prototype.shouldRemoveParent=function(a){var b=this.graph.view.getState(a);console.log("state",b,this.graph.model.getChildCount(b.cell));return null!=b&&(this.graph.model.isEdge(b.cell)||this.graph.model.isVertex(b.cell))&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)?(a=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),a==mxConstants.NONE&&b==mxConstants.NONE):
-!1};mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};
+mxGraphHandler.prototype.shouldRemoveParent=function(a){var b=this.graph.view.getState(a);return null!=b&&(this.graph.model.isEdge(b.cell)||this.graph.model.isVertex(b.cell))&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)?(a=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),a==mxConstants.NONE&&b==mxConstants.NONE):!1};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};
mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.refreshHandler&&(this.graph.getModel().removeListener(this.refreshHandler),this.refreshHandler=null);this.destroyShapes();this.removeHint()};
function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var b=c.getProperty("eventName"),e=c.getProperty("event");b==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",e)),e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,c){if(this.isPinchEnabled()){var b=
c.getProperty("event");mxEvent.isConsumed(b)||"gesturestart"!=b.type?"gestureend"==b.type&&null!=this.initialScale&&(this.initialScale=null):(this.initialScale=this.graph.view.scale,this.active||null==this.mouseDownEvent||(this.start(this.mouseDownEvent),this.mouseDownEvent=null));if(null!=this.initialScale){var e=Math.round(this.initialScale*b.scale*100)/100;null!=this.minScale&&(e=Math.max(this.minScale,e));null!=this.maxScale&&(e=Math.min(this.maxScale,e));this.graph.view.scale!=e&&(this.graph.zoomTo(e),
@@ -2047,11 +2047,11 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes);a.getModel();for(var f=[],g=0;g<d.length;g++)null!=a.view.getState(d[g])&&f.push(d[g]);a.setSelectionCells(f)};
c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};
OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,d,b,f,e,h,g,k,l,m){var p=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(p=80);d+=p;b+=p;var n=d,u=b,t=mxUtils.getDocumentSize(),r=t.height,v=Math.max(1,Math.round((t.width-d-64)/2)),w=Math.max(1,Math.round((r-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=null!=document.body?Math.min(d,document.body.scrollWidth-64):d;b=Math.min(b,r-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=r+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";v+=t.x;w+=t.y;f&&document.body.appendChild(this.bg);var q=a.createDiv(k?"geTransDialog":"geDialog");f=this.getPosition(v,w,d,b);v=f.x;w=f.y;q.style.width=
-d+"px";q.style.height=b+"px";q.style.left=v+"px";q.style.top=w+"px";q.style.zIndex=this.zIndex;q.appendChild(c);document.body.appendChild(q);!g&&c.clientHeight>q.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=w+14+"px",e.style.left=v+d+38-p+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
-document.body.appendChild(e),this.dialogImg=e,m||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(n=d=e.w,u=b=e.h)}e=mxUtils.getDocumentSize();r=e.height;this.bg.style.height=r+"px";v=Math.max(1,Math.round((e.width-d-64)/2));w=Math.max(1,Math.round((r-b-a.footerHeight)/3));d=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;b=Math.min(u,r-64);e=this.getPosition(v,
-w,d,b);v=e.x;w=e.y;q.style.left=v+"px";q.style.top=w+"px";q.style.width=d+"px";q.style.height=b+"px";!g&&c.clientHeight>q.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=v+d+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=q;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,c,d,b,f,e,h,g,k,l,m){var p=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(p=80);d+=p;b+=p;var n=d,t=b,r=mxUtils.getDocumentSize(),w=r.height,v=Math.max(1,Math.round((r.width-d-64)/2)),u=Math.max(1,Math.round((w-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=null!=document.body?Math.min(d,document.body.scrollWidth-64):d;b=Math.min(b,w-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=w+"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));r=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=r.x+"px";this.bg.style.top=r.y+"px";v+=r.x;u+=r.y;f&&document.body.appendChild(this.bg);var q=a.createDiv(k?"geTransDialog":"geDialog");f=this.getPosition(v,u,d,b);v=f.x;u=f.y;q.style.width=
+d+"px";q.style.height=b+"px";q.style.left=v+"px";q.style.top=u+"px";q.style.zIndex=this.zIndex;q.appendChild(c);document.body.appendChild(q);!g&&c.clientHeight>q.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=u+14+"px",e.style.left=v+d+38-p+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
+document.body.appendChild(e),this.dialogImg=e,m||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(n=d=e.w,t=b=e.h)}e=mxUtils.getDocumentSize();w=e.height;this.bg.style.height=w+"px";v=Math.max(1,Math.round((e.width-d-64)/2));u=Math.max(1,Math.round((w-b-a.footerHeight)/3));d=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;b=Math.min(t,w-64);e=this.getPosition(v,
+u,d,b);v=e.x;u=e.y;q.style.left=v+"px";q.style.top=u+"px";q.style.width=d+"px";q.style.height=b+"px";!g&&c.clientHeight>q.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=u+14+"px",this.dialogImg.style.left=v+d+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=q;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2061,8 +2061,8 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,c,d,b,f,e,h,g,k,l,m){k=null!=k?k:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);p.appendChild(n)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=d;p.appendChild(c);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",d.appendChild(c),d.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",d.appendChild(l));var u=mxUtils.button(b,function(){k&&a.hideDialog();null!=f&&f()});
-u.className="geBtn";d.appendChild(u);null!=h&&(b=mxUtils.button(h,function(){k&&a.hideDialog();null!=g&&g()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){u.focus()};p.appendChild(d);this.container=p},PrintDialog=function(a,c){this.create(a,c)};
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=d;p.appendChild(c);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",d.appendChild(c),d.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",d.appendChild(l));var t=mxUtils.button(b,function(){k&&a.hideDialog();null!=f&&f()});
+t.className="geBtn";d.appendChild(t);null!=h&&(b=mxUtils.button(h,function(){k&&a.hideDialog();null!=g&&g()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){t.focus()};p.appendChild(d);this.container=p},PrintDialog=function(a,c){this.create(a,c)};
PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var h=g.checked?1:parseInt(m.value);isNaN(h)||(f=mxUtils.getScaleForPageCount(h,d,e))}d.getGraphBounds();var k=h=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),h-=c.x*e.width,k-=c.y*e.height):
b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,h,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var h=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage"));
f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(f);h.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");f.appendChild(k);mxEvent.addListener(k,
@@ -2072,19 +2072,19 @@ f.style.paddingTop="20px";f.setAttribute("align","right");k=mxUtils.button(mxRes
f.appendChild(k);b.appendChild(f);h.appendChild(b);e.appendChild(h);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(d){}};
PrintDialog.createPrintPreview=function(a,c,d,b,f,e,h){c=new mxPrintPreview(a,c,d,b,f,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=h;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==u?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",u.src),n.style.fontSize="11px",n.innerHTML=u.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,h=document.createElement("table");h.style.width=
+var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==t?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",t.src),n.style.fontSize="11px",n.innerHTML=t.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,h=document.createElement("table");h.style.width=
"100%";h.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");
mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="18px";l.style.height="18px";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";var m=b.background;c();mxEvent.addListener(l,"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)});
e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=b.getGridSize();e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?b.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+
-":");f.appendChild(e);e=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var u=b.backgroundImage;mxEvent.addListener(n,"click",function(b){a.showBackgroundImageDialog(function(a){u=a;d()});mxEvent.consume(b)});d();e.appendChild(n);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var t=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);var r=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==p.value&&b.setGridSize(parseInt(p.value));var c=new ChangePageSetup(a,m,u,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=u?u.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||b.model.execute(c)});r.className="geBtn gePrimaryBtn";e.appendChild(r);a.editor.cancelFirst||e.appendChild(t);f.appendChild(e);g.appendChild(f);h.appendChild(g);this.container=h};
-PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||p!=document.activeElement&&n!=document.activeElement){a=!1;for(b=0;b<t.length;b++)c=t[b],q?"custom"==c.key&&(g.value=c.key,q=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
+":");f.appendChild(e);e=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var t=b.backgroundImage;mxEvent.addListener(n,"click",function(b){a.showBackgroundImageDialog(function(a){t=a;d()});mxEvent.consume(b)});d();e.appendChild(n);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var r=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&e.appendChild(r);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==p.value&&b.setGridSize(parseInt(p.value));var c=new ChangePageSetup(a,m,t,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=t?t.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
+c.ignoreColor&&c.ignoreImage||b.model.execute(c)});w.className="geBtn gePrimaryBtn";e.appendChild(w);a.editor.cancelFirst||e.appendChild(r);f.appendChild(e);g.appendChild(f);h.appendChild(g);this.container=h};
+PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||p!=document.activeElement&&n!=document.activeElement){a=!1;for(b=0;b<r.length;b++)c=r[b],q?"custom"==c.key&&(g.value=c.key,q=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(p.value=d.width/100,n.value=d.height/100,e.setAttribute("checked","checked"),
g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");
-p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var u={},t=PageSetupDialog.getFormats(),r=0;r<t.length;r++){var v=t[r];u[v.key]=v;var w=document.createElement("option");w.setAttribute("value",v.key);mxUtils.write(w,v.title);g.appendChild(w)}var q=!1;f();a.appendChild(g);mxUtils.br(a);
-a.appendChild(k);a.appendChild(m);var z=d,x=function(a,c){var e=u[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.width/100;e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
+p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var t={},r=PageSetupDialog.getFormats(),w=0;w<r.length;w++){var v=r[w];t[v.key]=v;var u=document.createElement("option");u.setAttribute("value",v.key);mxUtils.write(u,v.title);g.appendChild(u)}var q=!1;f();a.appendChild(g);mxUtils.br(a);
+a.appendChild(k);a.appendChild(m);var z=d,x=function(a,c){var e=t[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.width/100;e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
e.height,e.width));c&&q||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){q="custom"==g.value;
x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:p,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
@@ -2097,7 +2097,7 @@ d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var g=e*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,g=this.pageFormat,f=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
-new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,q=h.x+b,z=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
+new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,u=a?Math.ceil(b/k.width)-1:0,q=h.x+b,z=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:u,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
new mxPoint(Math.round(q),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var g=this.graph.getCellGeometry(b[e]);if(null!=g&&g.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0,
@@ -2112,15 +2112,15 @@ mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)
this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,h=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return e||h.apply(this,
arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(e=!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(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=b.panningHandler.isForcePanningEvent;
b.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||
-mxClient.IS_SF&&mxEvent.isShiftDown(a))};var l=!1,m=null,p=null,n=null,u=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var e=0;e<n.length;e++)this.toolbar.container.appendChild(n[e]);this.toolbar.fontMenu=
-m;this.toolbar.sizeMenu=p}l=b.cellEditor.isContentEditing();m=a;p=d;n=c}}),t=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);u();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=t.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-
-1)&&(d=d.substring(0,d.length-1));t.toolbar.setFontName(d);t.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 v=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){v.apply(this,arguments);u()};b.container.setAttribute("tabindex","0");b.container.style.cursor=
-"default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(E){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=
+mxClient.IS_SF&&mxEvent.isShiftDown(a))};var l=!1,m=null,p=null,n=null,t=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var e=0;e<n.length;e++)this.toolbar.container.appendChild(n[e]);this.toolbar.fontMenu=
+m;this.toolbar.sizeMenu=p}l=b.cellEditor.isContentEditing();m=a;p=d;n=c}}),r=this,w=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){w.apply(this,arguments);t();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!=r.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-
+1)&&(d=d.substring(0,d.length-1));r.toolbar.setFontName(d);r.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 v=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){v.apply(this,arguments);t()};b.container.setAttribute("tabindex","0");b.container.style.cursor=
+"default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(E){}var u=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=
this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var q="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d=a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):
[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(B){this.handleError(B)}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged",
"keys",[],"values",[],"cells",[]))};var x=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),A=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)q.push(A[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(q,z[a])&&q.push(z[a]);
-var D=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],B=q.slice(),g=0;g<m.length;g++){var p=m[g],C=p.indexOf("=");if(0<=C){var n=p.substring(0,C),U=mxUtils.indexOf(B,n);0<=U&&B.splice(U,1);for(var t=0;t<A.length;t++){var u=A[t];if(0<=
-mxUtils.indexOf(u,n))for(var E=0;E<u.length;E++){var v=mxUtils.indexOf(B,u[E]);0<=v&&B.splice(v,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,r=d.getStyle(k),g=0;g<B.length;g++){var n=B[g],w=f[n];null==w||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(z,n))||(r=mxUtils.setStyle(r,n,w))}d.setStyle(k,r)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
+var D=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],B=q.slice(),g=0;g<m.length;g++){var p=m[g],C=p.indexOf("=");if(0<=C){var n=p.substring(0,C),r=mxUtils.indexOf(B,n);0<=r&&B.splice(r,1);for(var t=0;t<A.length;t++){var E=A[t];if(0<=
+mxUtils.indexOf(E,n))for(var v=0;v<E.length;v++){var w=mxUtils.indexOf(B,E[v]);0<=w&&B.splice(w,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,u=d.getStyle(k),g=0;g<B.length;g++){var n=B[g],D=f[n];null==D||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(z,n))||(u=mxUtils.setStyle(u,n,D))}d.setStyle(k,u)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));D(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=
h[g])if(0<=mxUtils.indexOf(z,d[g]))f||0<=mxUtils.indexOf(F,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(q,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(q,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(F,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
@@ -2153,16 +2153,16 @@ this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+
b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=f.backBtn&&e(mxUtils.bind(this,function(a){window.location.href=f.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var g=e(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),k=document.createElement("div");k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontFamily=
"Helvetica,Arial";k.style.marginTop="8px";k.style.fontSize="14px";k.style.color="#ffffff";this.chromelessToolbar.appendChild(k);var l=e(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(k.innerHTML="",mxUtils.write(k,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});g.style.paddingLeft="0px";
g.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",g.style.display="",k.style.display="inline-block"):(l.style.display="none",g.style.display="none",k.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",m);e(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,
-mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var n=null,u=null,t=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),
-fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),a||200)}),r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||
+mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var n=null,t=null,r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),
+fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),a||200)}),w=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||
30)});if("1"==urlParams.layers){this.layersDialog=null;var v=e(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=v.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){v.style.display=1<w.getChildCount(w.root)?"":"none"})}this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(b){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
+this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){v.style.display=1<u.getChildCount(u.root)?"":"none"})}this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(b){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var q=this.lightboxToolbarActions[p];e(q.fn,q.icon,q.tooltip)}null!=f.refreshBtn&&e(mxUtils.bind(this,function(a){f.refreshBtn.url?window.location.href=f.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=f.fullscreenBtn&&
window.self!==window.top&&e(mxUtils.bind(this,function(b){f.fullscreenBtn.url?a.openLink(f.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(f.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,function(a){"1"==urlParams.close||f.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
-mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";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)||r(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():r(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():r(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var z=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
-c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<z&&Math.abs(this.scrollTop-a.container.scrollTop)<z&&Math.abs(this.startX-c.getGraphX())<z&&Math.abs(this.startY-c.getGraphY())<z&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?t():r(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=
+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)||w(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():w(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():w(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||w(30)}));var z=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
+c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<z&&Math.abs(this.scrollTop-a.container.scrollTop)<z&&Math.abs(this.startX-c.getGraphX())<z&&Math.abs(this.startY-c.getGraphY())<z&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?r():w(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=
a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};var F=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*
d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?F.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),
this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
@@ -2262,8 +2262,8 @@ Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"));this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=d>this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/
b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=f&&0<f.length?(null==this.tooltipTitle?(this.tooltipTitle=
document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,f),l=this.tooltipTitle.offsetHeight+
-10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,p=document.documentElement,n=this.getTooltipOffset(),u=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+n.x,g=Math.min(Math.max(m.clientHeight||
-0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+n.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=u+"px";this.tooltip.style.top=g+"px"});null!=this.tooltip&&
+10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,p=document.documentElement,n=this.getTooltipOffset(),t=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+n.x,g=Math.min(Math.max(m.clientHeight||
+0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+n.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=t+"px";this.tooltip.style.top=g+"px"});null!=this.tooltip&&
"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))};
Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length)for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),b=mxUtils.bind(this,function(a){if(null!=a&&1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[],dict:new mxDictionary},this.taglist[a]=b);null==b.dict.get(c)&&(b.dict.put(c,c),b.entries.push(c))}}),f=0;f<d.length;f++){b(d[f]);var e=d[f].replace(/\.*\d*$/,"");e!=d[f]&&b(e)}return c};
Sidebar.prototype.searchEntries=function(a,c,d,b,f){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");f=new mxDictionary;var h=(d+1)*c;a=[];for(var g=0,k=0;k<e.length;k++)if(0<e[k].length){var l=this.taglist[e[k]],m=new mxDictionary;if(null!=l){var p=l.entries;a=[];for(var n=0;n<p.length;n++)if(l=p[n],0==g==(null==f.get(l))&&(m.put(l,l),a.push(l),k==e.length-1&&a.length==h)){b(a.slice(d*c,h),h,!0,e);return}}else a=[];f=m;g++}f=a.length;b(a.slice(d*c,(d+1)*c),f,!1,e)}else b([],null,
@@ -2271,9 +2271,9 @@ null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for
Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var d=document.createElement("div");d.className="geSidebar";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.width="100%";d.style.padding="8px";d.style.paddingTop="14px";d.style.paddingBottom="0px";a||(d.style.display="none");var b=document.createElement("div");b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.paddingBottom="8px";
b.style.cursor="default";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("searchShapes"));f.setAttribute("type","text");f.style.fontSize="12px";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.border="solid 1px #d5d5d5";f.style.borderRadius="4px";f.style.width="100%";f.style.outline="none";f.style.padding="6px";b.appendChild(f);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",mxResources.get("search"));
e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var h;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),k=mxUtils.button(mxResources.get("moreResults"),function(){h()});k.style.display="none";k.style.lineHeight="normal";k.style.marginTop="4px";k.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom="4px";g.appendChild(k);
-d.appendChild(g);var l="",m=!1,p=!1,n=0,u={},t=12,r=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",r());f.focus()});h=mxUtils.bind(this,function(){t=4*Math.max(1,
-Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(r(),l=f.value,u={},p=!1,n=0),!m&&!p)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,t,n,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;n++;this.insertSearchHint(d,l,t,n,b,c,e,f);null!=g.parentNode&&g.parentNode.removeChild(g);
-for(c=0;c<b.length;c++)try{var h=b[c]();null==u[h.innerHTML]&&(u[h.innerHTML]="1",d.appendChild(h))}catch(A){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",p=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else r(),l=f.value="",u={},k.style.display="none",p=!1,f.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));
+d.appendChild(g);var l="",m=!1,p=!1,n=0,t={},r=12,w=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",w());f.focus()});h=mxUtils.bind(this,function(){r=4*Math.max(1,
+Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(w(),l=f.value,t={},p=!1,n=0),!m&&!p)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,r,n,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;n++;this.insertSearchHint(d,l,r,n,b,c,e,f);null!=g.parentNode&&g.parentNode.removeChild(g);
+for(c=0;c<b.length;c++)try{var h=b[c]();null==t[h.innerHTML]&&(t[h.innerHTML]="1",d.appendChild(h))}catch(A){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",p=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else w(),l=f.value="",t={},k.style.display="none",p=!1,f.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));
mxEvent.addListener(f,"focus",function(){f.style.paddingRight=""});mxEvent.addListener(f,"blur",function(){f.style.paddingRight="20px"});f.style.paddingRight="20px";mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(p=!0,k.style.display="none"):f.value!=l?(k.style.display=
"none",p=!1):m||(k.style.display=p?"none":"")}));mxEvent.addListener(f,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]};
Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,h,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))};
@@ -2389,11 +2389,11 @@ Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=
d.getModel().isEdge(k)==d.getModel().isEdge(a)){var l=d.view.getState(k),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(k,e);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var p=d.model.getChildCount(k);0<=p;p--)d.model.remove(d.model.getChildAt(k,p));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k])),
p=0;p<h.length;p++){var n=m[h[p]];null!=n&&d.setCellStyles(h[p],n,[k])}f.push(k)}}}finally{d.model.endUpdate()}return f};
Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(f,e,h,g,k,l){for(l=l?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&f.isEnabled()){a=f.getImportableCells(a);if(0<a.length){f.stopEditing();l=null==h||mxEvent.isAltDown(e)?!1:f.isValidDropTarget(h,a,e);var m=null;null==h||l||(h=null);if(!f.isCellLocked(h||
-f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var p=f.cloneCells(a);f.splitEdge(h,p,null,g-b.width/2,k-b.height/2);m=p}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var n=f.layoutManager.getLayout(h);if(null!=n){var u=f.view.scale,t=f.view.translate,r=(g+t.x)*u,v=(k+t.y)*u;for(h=0;h<m.length;h++)n.moveCell(m[h],r,v)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{f.model.endUpdate()}null!=
+f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var p=f.cloneCells(a);f.splitEdge(h,p,null,g-b.width/2,k-b.height/2);m=p}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var n=f.layoutManager.getLayout(h);if(null!=n){var t=f.view.scale,r=f.view.translate,w=(g+r.x)*t,v=(k+r.y)*t;for(h=0;h<m.length;h++)n.moveCell(m[h],w,v)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(u){this.editorUi.handleError(u)}finally{f.model.endUpdate()}null!=
m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
-Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),p=g.model.getParent(a),n=!0;if(null!=g.layoutManager){var u=g.layoutManager.getLayout(p);if(null!=u&&u.constructor==mxStackLayout&&(n=!1,h=g.view.getState(p),null!=h)){var t=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+=
-t.x;e.y+=t.y;var r=e.getTerminalPoint(!1);null!=r&&(r.x+=t.x,r.y+=t.y)}}var v=m.x,w=m.y;g.model.isEdge(c[b])&&(w=v=0);var q=g.model.isEdge(a)||null!=l&&!l.relative&&n,h=c=g.importCells(c,e.x-(q?v:0),e.y-(q?w:0),q?p:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var z=g.getCellGeometry(c[b]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(q&&g.model.isVertex(p)){var x=
-g.view.getState(p),t=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,t.x,t.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),v=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,v,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)||
+Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),p=g.model.getParent(a),n=!0;if(null!=g.layoutManager){var t=g.layoutManager.getLayout(p);if(null!=t&&t.constructor==mxStackLayout&&(n=!1,h=g.view.getState(p),null!=h)){var r=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+=
+r.x;e.y+=r.y;var w=e.getTerminalPoint(!1);null!=w&&(w.x+=r.x,w.y+=r.y)}}var v=m.x,u=m.y;g.model.isEdge(c[b])&&(u=v=0);var q=g.model.isEdge(a)||null!=l&&!l.relative&&n,h=c=g.importCells(c,e.x-(q?v:0),e.y-(q?u:0),q?p:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var z=g.getCellGeometry(c[b]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(q&&g.model.isVertex(p)){var x=
+g.view.getState(p),r=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,r.x,r.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),v=e.x-Math.round(m.x),u=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,v,u,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)||
g.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(F){this.editorUi.handleError(F)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
@@ -2402,26 +2402,26 @@ b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mx
2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};
Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),G=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])?
-m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&G==D){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=G&&null!=
-r&&G!=D?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,K,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var t=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),t.apply(this,arguments))};var r=null,v=null,w=null,q=!1,
-z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),F=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),E=null,J=e(this.roundDrop),M=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,G=null,L=u.createPreviewElement;u.createPreviewElement=function(a){var b=L.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
-this.previewElementHeight=b.style.height;return b};var O=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var Q=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=G&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&G==D)this.previewElement.style.display=
-a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=r&&null!=G){var e=a.model.isEdge(r.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(r.cell,b[e],K,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),B=a.model.getParent(r.cell),C=d.translate.x*d.scale,I=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(B)&&
-B!=d.currentRoot&&(I=d.getState(B),C=I.x,I=I.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+C+"px";this.previewElement.style.top=(g.y-k)*d.scale+I+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),H=0,B=null,I=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
-this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=G=null;B!=k?(B=k,P=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==G&&(B=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-P;if(2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
-mxUtils.getValue(I,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(I,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
-k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==E&&(a.container.appendChild(D),E=D.parentNode);h(c,d,l,D)}else null==w||!mxUtils.contains(w,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(w=null,null!=E&&(D.parentNode.removeChild(D),E=null)):null!=w&&null!=E&&
-(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,D));if(q&&null!=r&&!mxEvent.isAltDown(e)&&null==G){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var C=r.absolutePoints;null!=J.parentNode&&(l=C[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
-J)));null!=M.parentNode&&(C=C[C.length-1],f.add(h(c,d,new mxRectangle(C.x-this.roundDrop.width/2,C.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),M)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),C=this.graph.selectionCellsHandler.getHandler(r.cell),null!=C&&(l.x-=C.horizontalOffset/2,l.y-=C.verticalOffset/2,l.width+=C.horizontalOffset,
-l.height+=C.verticalOffset,null!=C.rotationShape&&null!=C.rotationShape.node&&"hidden"!=C.rotationShape.node.style.visibility&&"none"!=C.rotationShape.node.style.display&&null!=C.rotationShape.boundingBox&&l.add(C.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),z)),f.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
-x)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),F)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=f&&f.grow(10)}K=mxConstants.DIRECTION_NORTH;G==x?K=mxConstants.DIRECTION_EAST:G==F||G==M?K=mxConstants.DIRECTION_SOUTH:G==A&&(K=mxConstants.DIRECTION_WEST);null!=w&&G==D&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
-(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=r&&5E3<=H||r!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==G&&l))if(q=!1,r=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=r&&l){f=[J,M,z,x,F,A];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(C=k.absolutePoints,null!=C&&(l=C[0],C=C[C.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),J.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
+m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var t=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=u&&G==D){var h=a.isCellSelected(u.cell)?a.getSelectionCells():[u.cell],h=this.updateShapes(a.model.isEdge(u.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=G&&null!=
+w&&G!=D?(h=a.model.isEdge(w.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(w.cell,b,K,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){t.isActive()&&t.reset()});var r=t.mouseDown;t.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),r.apply(this,arguments))};var w=null,v=null,u=null,q=!1,
+z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),F=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),E=null,J=e(this.roundDrop),M=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,G=null,L=t.createPreviewElement;t.createPreviewElement=function(a){var b=L.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
+this.previewElementHeight=b.style.height;return b};var O=t.dragEnter;t.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var Q=t.dragExit;t.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};t.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=G&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=u&&G==D)this.previewElement.style.display=
+a.model.isEdge(u.cell)?"none":"",this.previewElement.style.left=u.x+"px",this.previewElement.style.top=u.y+"px",this.previewElement.style.width=u.width+"px",this.previewElement.style.height=u.height+"px";else if(null!=w&&null!=G){var e=a.model.isEdge(w.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(w.cell,b[e],K,b),h=a.model.isEdge(w.cell)?null:a.getCellGeometry(w.cell),k=a.getCellGeometry(b[e]),B=a.model.getParent(w.cell),C=d.translate.x*d.scale,I=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(B)&&
+B!=d.currentRoot&&(I=d.getState(B),C=I.x,I=I.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+C+"px";this.previewElement.style.top=(g.y-k)*d.scale+I+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=t.currentHighlight.state&&a.model.isEdge(t.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
+f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),H=0,B=null,I=this.editorUi.editor.graph.getCellStyle(b[0]);t.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
+this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=G=null;B!=k?(B=k,P=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==G&&(B=k,t.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-P;if(2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
+mxUtils.getValue(I,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(I,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){u=
+k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==E&&(a.container.appendChild(D),E=D.parentNode);h(c,d,l,D)}else null==u||!mxUtils.contains(u,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(u=null,null!=E&&(D.parentNode.removeChild(D),E=null)):null!=u&&null!=E&&
+(l=a.model.isEdge(u.cell)?a.view.getPoint(u):new mxPoint(u.getCenterX(),u.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,D));if(q&&null!=w&&!mxEvent.isAltDown(e)&&null==G){f=mxRectangle.fromRectangle(w);if(a.model.isEdge(w.cell)){var C=w.absolutePoints;null!=J.parentNode&&(l=C[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
+J)));null!=M.parentNode&&(C=C[C.length-1],f.add(h(c,d,new mxRectangle(C.x-this.roundDrop.width/2,C.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),M)))}else l=mxRectangle.fromRectangle(w),null!=w.shape&&null!=w.shape.boundingBox&&(l=mxRectangle.fromRectangle(w.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),C=this.graph.selectionCellsHandler.getHandler(w.cell),null!=C&&(l.x-=C.horizontalOffset/2,l.y-=C.verticalOffset/2,l.width+=C.horizontalOffset,
+l.height+=C.verticalOffset,null!=C.rotationShape&&null!=C.rotationShape.node&&"hidden"!=C.rotationShape.node.style.visibility&&"none"!=C.rotationShape.node.style.display&&null!=C.rotationShape.boundingBox&&l.add(C.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(w.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),z)),f.add(h(c,d,new mxRectangle(l.x+l.width,w.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
+x)),f.add(h(c,d,new mxRectangle(w.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),F)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,w.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=f&&f.grow(10)}K=mxConstants.DIRECTION_NORTH;G==x?K=mxConstants.DIRECTION_EAST:G==F||G==M?K=mxConstants.DIRECTION_SOUTH:G==A&&(K=mxConstants.DIRECTION_WEST);null!=u&&G==D&&(k=u);l=(null==m||a.isCellConnectable(b[m]))&&
+(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=w&&5E3<=H||w!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==G&&l))if(q=!1,w=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=w&&l){f=[J,M,z,x,F,A];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(C=k.absolutePoints,null!=C&&(l=C[0],C=C[C.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),J.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
J.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",M.style.left=Math.floor(C.x-this.roundDrop.width/2)+"px",M.style.top=Math.floor(C.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(J),null==a.model.getTerminal(g,!1)&&a.container.appendChild(M))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),C=this.graph.selectionCellsHandler.getHandler(k.cell),
null!=C&&(l.x-=C.horizontalOffset/2,l.y-=C.verticalOffset/2,l.width+=C.horizontalOffset,l.height+=C.verticalOffset,null!=C.rotationShape&&null!=C.rotationShape.node&&"hidden"!=C.rotationShape.node.style.visibility&&"none"!=C.rotationShape.node.style.display&&null!=C.rotationShape.boundingBox&&l.add(C.rotationShape.boundingBox)),z.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",F.style.left=z.style.left,F.style.top=Math.floor(l.y+l.height)+"px",A.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(F)),a.container.appendChild(x),a.container.appendChild(A));null!=k&&(v=a.selectionCellsHandler.getHandler(k.cell),null!=v&&null!=v.setHandlesVisible&&v.setHandlesVisible(!1));q=!0}else for(f=[J,M,z,x,F,A],
-l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);q||null==v||v.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=w&&G==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=G||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
-null}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,M,D,z,x,F,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=v&&v.reset();G=E=w=r=v=null};return u};
+l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);q||null==v||v.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=u&&G==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=G||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
+null}return g});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,M,D,z,x,F,A],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=w&&null!=v&&v.reset();G=E=u=w=v=null};return t};
Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}else if(mxEvent.isShiftDown(d)&&!b.isSelectionEmpty())this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell());else{a=b.getFreeInsertPoint();if(mxEvent.isAltDown(d)){var f=b.getGraphBounds(),e=b.view.translate,h=b.view.scale;a.x=f.x/h-e.x+f.width/h+b.gridSize;a.y=f.y/h-e.y}c.drop(b,d,null,a.x,a.y,!0);null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}};
Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))>
@@ -2456,8 +2456,8 @@ this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constr
function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,g=this.graph.view.scale,f=this.graph.getPageLayout(),h=0;h<f.width;h++)b.push(new mxRectangle(((f.x+h)*e+d.x)*g,(f.y*c+d.y)*g,e*g,c*g));for(h=0;h<f.height;h++)b.push(new mxRectangle((f.x*e+d.x)*g,((f.y+h)*c+d.y)*g,e*g,c*g));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);
"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
-this.getRubberband=function(){return p};var n=(new Date).getTime(),u=0,t=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),u=0):u=(new Date).getTime()-n};var r=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&r.apply(this,arguments)};var v=this.isToggleEvent;this.isToggleEvent=function(a){return v.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var q=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+this.getRubberband=function(){return p};var n=(new Date).getTime(),t=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),t=0):t=(new Date).getTime()-n};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<t||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&w.apply(this,arguments)};var v=this.isToggleEvent;this.isToggleEvent=function(a){return v.apply(this,arguments)||mxEvent.isShiftDown(a)};var u=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return u.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var q=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
(q=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=q)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return z.apply(this,
arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var x=this.getCursorForCell;this.getCursorForCell=
function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),B=0;B<
@@ -2496,8 +2496,8 @@ Graph.prototype.isLabelMovable=function(a){var c=this.view.getState(a),c=null!=c
Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),p=a[g+"FullYear"](),n=a[g+"Hours"](),u=a[g+"Minutes"](),t=a[g+"Seconds"](),g=a[g+"Milliseconds"](),r=d?0:a.getTimezoneOffset(),v={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:n%12||12,hh:h(n%12||12),H:n,HH:h(n),M:u,MM:h(u),s:t,ss:h(t),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<r?"-":"+")+h(100*Math.floor(Math.abs(r)/60)+Math.abs(r)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),p=a[g+"FullYear"](),n=a[g+"Hours"](),t=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),w=d?0:a.getTimezoneOffset(),v={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
+12],yy:String(p).slice(2),yyyy:p,h:n%12||12,hh:h(n%12||12),H:n,HH:h(n),M:t,MM:h(t),s:r,ss:h(r),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<w?"-":"+")+h(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var f=document.createElement("input");f.style.display="inline-block";f.setAttribute("type","checkbox");c.isVisible(b)&&(f.setAttribute("checked","checked"),
f.defaultChecked=!0);d.appendChild(f);var g=this.convertValueToString(b)||mxResources.get("background")||"Background";d.setAttribute("title",g);mxUtils.write(d,g);a.appendChild(d);mxEvent.addListener(f,"click",function(){null!=f.getAttribute("checked")?f.removeAttribute("checked"):f.setAttribute("checked","checked");c.setVisible(b,f.checked)})})(c.getChildAt(c.root,b));return a};
@@ -2507,9 +2507,9 @@ Graph.prototype.selectCellsForConnectVertex=function(a,c,d){2==a.length&&this.mo
Graph.prototype.connectVertex=function(a,c,d,b,f,e){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];e=e?e:!1;var h=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);c==mxConstants.DIRECTION_NORTH?(h.x+=a.geometry.width/2,h.y-=d):c==mxConstants.DIRECTION_SOUTH?(h.x+=a.geometry.width/2,h.y+=a.geometry.height+d):(h.x=c==mxConstants.DIRECTION_WEST?h.x-d:h.x+(a.geometry.width+
d),h.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;null!=d&&this.model.isVertex(d.cell)&&(l=d.x,k=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(h.x+=a.parent.geometry.x,h.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!f?null:this.getCellAt(l+h.x*g,k+h.y*g);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a),
g=this.view.getState(e),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(e=null));if(f=!mxEvent.isShiftDown(b)||f)c==mxConstants.DIRECTION_NORTH?h.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?h.y+=a.geometry.height/2:h.x=c==mxConstants.DIRECTION_WEST?h.x-a.geometry.width/2:h.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[];
-this.model.beginUpdate();try{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var p=this.view.getState(l),n=null!=p?p.style:this.getCellStyle(l);if(mxUtils.getValue(n,"part",!1)){var u=this.model.getParent(l);this.model.isVertex(u)&&(l=u)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=h.x-m.width/2,m.y=h.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));
-var t=mxEvent.isControlDown(b)&&f||null==e&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=t&&this.connectionHandler.insertBeforeSource){var r=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=t.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==t.parent&&(r=b.parent.getIndex(b),this.model.add(b.parent,t,r))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==
-mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(r=a.parent.getIndex(a),this.model.add(a.parent,g,r));null!=t&&d.push(t);null==e&&null!=g&&d.push(g);null==g&&null!=t&&t.geometry.setTerminalPoint(h,!1);null!=t&&this.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{this.model.endUpdate()}return d};
+this.model.beginUpdate();try{g=e;if(null==g&&f){for(var l=a,m=this.getCellGeometry(a);null!=m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var p=this.view.getState(l),n=null!=p?p.style:this.getCellStyle(l);if(mxUtils.getValue(n,"part",!1)){var t=this.model.getParent(l);this.model.isVertex(t)&&(l=t)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=h.x-m.width/2,m.y=h.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));
+var r=mxEvent.isControlDown(b)&&f||null==e&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var w=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=r.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==r.parent&&(w=b.parent.getIndex(b),this.model.add(b.parent,r,w))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==
+mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,g,w));null!=r&&d.push(r);null==e&&null!=g&&d.push(g);null==g&&null!=r&&r.geometry.setTerminalPoint(h,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return d};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],d,b;for(b in this.model.cells)if(d=this.model.cells[b],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.getLabel(d),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&c.push(d);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),d=a,b=null;null==b&&null!=d;)null!=d.value&&"object"==typeof d.value&&(b=d.hasAttribute(c)?null!=d.getAttribute(c)?d.getAttribute(c):"":null),d=this.model.getParent(d);return b||""}return 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};
@@ -2561,8 +2561,8 @@ this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHa
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,
arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var g=new mxPoint(c,e);g.type=b;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=b||g.x!=c||g.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h=
-b[f+1],k=b[f],w=[],q=b[f+2];f<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,h.x,h.y)<1*this.scale*this.scale;)h=q,f++,q=b[f+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],F=x.absolutePoints;if(null!=F&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<F.length-1;x++){for(var A=F[x+1],D=F[x],q=F[x+2];x<F.length-2&&mxUtils.ptSegDistSq(D.x,D.y,q.x,q.y,A.x,A.y)<1*this.scale*this.scale;)A=q,x++,q=F[x+2];q=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,A.x,
-A.y);if(null!=q&&(Math.abs(q.x-k.x)>g||Math.abs(q.y-k.y)>g)&&(Math.abs(q.x-h.x)>g||Math.abs(q.y-h.y)>g)&&(Math.abs(q.x-D.x)>g||Math.abs(q.y-D.y)>g)&&(Math.abs(q.x-A.x)>g||Math.abs(q.y-A.y)>g)){A=q.x-k.x;D=q.y-k.y;q={distSq:A*A+D*D,x:q.x,y:q.y};for(A=0;A<w.length;A++)if(w[A].distSq>q.distSq){w.splice(A,0,q);q=null;break}null==q||0!=w.length&&w[w.length-1].x===q.x&&w[w.length-1].y===q.y||w.push(q)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}q=b[b.length-1];c=e(0,q.x,q.y)||c}a.routedPoints=d;return c}return!1};
+b[f+1],k=b[f],u=[],q=b[f+2];f<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,h.x,h.y)<1*this.scale*this.scale;)h=q,f++,q=b[f+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],F=x.absolutePoints;if(null!=F&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<F.length-1;x++){for(var A=F[x+1],D=F[x],q=F[x+2];x<F.length-2&&mxUtils.ptSegDistSq(D.x,D.y,q.x,q.y,A.x,A.y)<1*this.scale*this.scale;)A=q,x++,q=F[x+2];q=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,A.x,
+A.y);if(null!=q&&(Math.abs(q.x-k.x)>g||Math.abs(q.y-k.y)>g)&&(Math.abs(q.x-h.x)>g||Math.abs(q.y-h.y)>g)&&(Math.abs(q.x-D.x)>g||Math.abs(q.y-D.y)>g)&&(Math.abs(q.x-A.x)>g||Math.abs(q.y-A.y)>g)){A=q.x-k.x;D=q.y-k.y;q={distSq:A*A+D*D,x:q.x,y:q.y};for(A=0;A<u.length;A++)if(u[A].distSq>q.distSq){u.splice(A,0,q);q=null;break}null==q||0!=u.length&&u[u.length-1].x===q.x&&u[u.length-1].y===q.y||u.push(q)}}}for(x=0;x<u.length;x++)c=e(1,u[x].x,u[x].y)||c}q=b[b.length-1];c=e(0,q.x,q.y)||c}a.routedPoints=d;return c}return!1};
var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,
"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var q=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var x=this.state.routedPoints[z],F=new mxPoint(x.x/this.scale,x.y/this.scale);0==z?F=b[0]:z==this.state.routedPoints.length-1&&(F=b[b.length-1]);var A=!1;if(null!=l&&1==x.type){var D=this.state.routedPoints[z+1],x=D.x/this.scale-F.x,D=D.y/this.scale-F.y,x=x*x+D*D;null==q&&(q=new mxPoint(F.x-l.x,F.y-l.y),m=Math.sqrt(q.x*q.x+q.y*q.y),0<m?(q.x=q.x*e/m,q.y=q.y*e/m):q=null);x>e*e&&0<m&&
(x=l.x-F.x,D=l.y-F.y,x=x*x+D*D,x>e*e&&(A=new mxPoint(F.x-q.x,F.y-q.y),x=new mxPoint(F.x+q.x,F.y+q.y),h.push(A),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(A.x-q.y*h,A.y+q.x*h),a.lineTo(x.x-q.y*h,x.y+q.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(A.x-q.y*h,A.y+q.x*h,x.x-q.y*h,x.y+q.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],A=!0))}else q=null;A||(h.push(F),l=F)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=
@@ -2588,12 +2588,12 @@ null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";")
this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};
Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),g=new mxGraphModel;e.decode(a,g);a=[];e=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges()));if(null!=e){e=e.slice();this.model.beginUpdate();try{if(1!=e.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<e.length;g++)a=a.concat(this.model.getChildren(this.moveCells([e[g]],b,c,!1,this.model.getRoot())[0]));else a=this.moveCells(g.getChildren(e[0]),b,c,!1,this.getDefaultParent());
if(d){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var f=this.getBoundingBoxFromGeometry(a,!0);null!=f&&this.moveCells(a,b-f.x,c-f.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var g=e[c];d.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]:
-0))}}catch(V){}return d}if(null!=a.shape&&null!=a.shape.bounds){g=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=d,d=e,e=g;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),
+0))}}catch(U){}return d}if(null!=a.shape&&null!=a.shape.bounds){g=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=d,d=e,e=g;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),
b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};
Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();
-try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),B=this.view.getState(g),p=this.view.getState(f);if(null!=m){var n=null!=B?this.getConnectionConstraint(m,B,!0):null,t=
-null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(e,g,!0,t);this.setConnectionConstraint(e,f,!1,n)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var u=h.width;h.width=h.height;h.height=u;b.setGeometry(e,h);var r=this.view.getState(e);if(null!=r){var q=r.style[mxConstants.STYLE_DIRECTION]||"east";"east"==q?q="south":"south"==q?q="west":"west"==q?q="north":"north"==q&&(q="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
+try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),B=this.view.getState(g),p=this.view.getState(f);if(null!=m){var n=null!=B?this.getConnectionConstraint(m,B,!0):null,r=
+null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(e,g,!0,r);this.setConnectionConstraint(e,f,!1,n)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var t=h.width;h.width=h.height;h.height=t;b.setGeometry(e,h);var w=this.view.getState(e);if(null!=w){var q=w.style[mxConstants.STYLE_DIRECTION]||"east";"east"==q?q="south":"south"==q?q="west":"west"==q?q="north":"north"==q&&(q="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
q,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=
0;c<b.length;c++){var d=this.view.getState(b[c]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(b[c]):this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};
Graph.prototype.processElements=function(a,b){for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var g=this.convertValueToString(a[e]);if(null!=g&&0<g.length){d.innerHTML=g;for(var f=d.getElementsByTagName(null!=c?c:"*"),h=0;h<f.length;h++)b(f[h]);d.innerHTML!=g&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=
@@ -2622,11 +2622,11 @@ d=d/h-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1)
Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var g=this.getCellGeometry(b[d]);null==g||!g.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(g,b[d]);
return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:!0;f=null!=f?f:!0;var C=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());
if(null==C)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,n=mxUtils.createXmlDocument(),B=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=B.style?B.style.backgroundColor=a:B.setAttribute("style","background-color:"+a));null==n.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);
-a=b/p;var t=Math.max(1,Math.ceil(C.width*a)+2*c)+(l?5:0),u=Math.max(1,Math.ceil(C.height*a)+2*c)+(l?5:0);B.setAttribute("version","1.1");B.setAttribute("width",t+"px");B.setAttribute("height",u+"px");B.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+u);n.appendChild(B);var I=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g");B.appendChild(I);var r=this.createSvgCanvas(I);r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/
-b-C.x)/p),Math.floor((c/b-C.y)/p));var q=document.createElement("textarea"),v=r.createAlternateContent;r.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,C,p){var n=this.state;if(null!=this.foAltText&&(0==d||0!=n.fontSize&&g.length<5*d/n.fontSize)){var B=this.createElement("text");B.setAttribute("x",Math.round(d/2));B.setAttribute("y",Math.round((e+n.fontSize)/2));B.setAttribute("fill",n.fontColor||"black");B.setAttribute("text-anchor","middle");B.setAttribute("font-size",Math.round(n.fontSize)+
-"px");B.setAttribute("font-family",n.fontFamily);(n.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&B.setAttribute("font-weight","bold");(n.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&B.setAttribute("font-style","italic");(n.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&B.setAttribute("text-decoration","underline");try{return q.innerHTML=g,B.textContent=q.value,B}catch(ha){return v.apply(this,arguments)}}else return v.apply(this,arguments)};var x=this.backgroundImage;
-if(null!=x){b=p/b;var w=this.view.translate,z=new mxRectangle(w.x*b,w.y*b,x.width*b,x.height*b);mxUtils.intersects(C,z)&&r.image(w.x,w.y,x.width,x.height,x.src,!0)}r.scale(a);r.textEnabled=f;h=null!=h?h:this.createSvgImageExport();var T=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&T.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),
-r);this.updateSvgLinks(B,k,!0);return B}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
+a=b/p;var r=Math.max(1,Math.ceil(C.width*a)+2*c)+(l?5:0),t=Math.max(1,Math.ceil(C.height*a)+2*c)+(l?5:0);B.setAttribute("version","1.1");B.setAttribute("width",r+"px");B.setAttribute("height",t+"px");B.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+r+" "+t);n.appendChild(B);var I=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g");B.appendChild(I);var q=this.createSvgCanvas(I);q.foOffset=e?-.5:0;q.textOffset=e?-.5:0;q.imageOffset=e?-.5:0;q.translate(Math.floor((c/
+b-C.x)/p),Math.floor((c/b-C.y)/p));var w=document.createElement("textarea"),u=q.createAlternateContent;q.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,C,p){var B=this.state;if(null!=this.foAltText&&(0==d||0!=B.fontSize&&g.length<5*d/B.fontSize)){var n=this.createElement("text");n.setAttribute("x",Math.round(d/2));n.setAttribute("y",Math.round((e+B.fontSize)/2));n.setAttribute("fill",B.fontColor||"black");n.setAttribute("text-anchor","middle");n.setAttribute("font-size",Math.round(B.fontSize)+
+"px");n.setAttribute("font-family",B.fontFamily);(B.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&n.setAttribute("font-weight","bold");(B.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&n.setAttribute("font-style","italic");(B.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.setAttribute("text-decoration","underline");try{return w.innerHTML=g,n.textContent=w.value,n}catch(ha){return u.apply(this,arguments)}}else return u.apply(this,arguments)};var x=this.backgroundImage;
+if(null!=x){b=p/b;var v=this.view.translate,z=new mxRectangle(v.x*b,v.y*b,x.width*b,x.height*b);mxUtils.intersects(C,z)&&q.image(v.x,v.y,x.width,x.height,x.src,!0)}q.scale(a);q.textEnabled=f;h=null!=h?h:this.createSvgImageExport();var T=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&T.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),
+q);this.updateSvgLinks(B,k,!0);return B}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;
a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,g=0;g<d.length;g++)var f=d[g].getAttribute("colspan"),
e=e+(null!=f?parseInt(f):1);c=c.insertRow(b);for(g=0;g<e;g++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
@@ -2671,15 +2671,15 @@ HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.protot
HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=
!0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){u.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
+function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var t=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){t.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div&&"none"!=this.div.style.display,
d=null,e=null,g=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,g=(this.currentX-d)/this.graph.view.scale,f=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(g=this.graph.snap(g),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var g=new mxRectangle(this.x,
this.y,this.width,this.height),h=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(g,f),this.graph.model.setGeometry(h[c],l))}}finally{this.graph.model.endUpdate()}}else g=
new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,g=this.first.y-c,f=this.graph.tolerance;if(null!=this.div||Math.abs(e)>f||Math.abs(g)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
-"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);t.apply(this,arguments)};var r=(new Date).getTime(),v=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){w.apply(this,arguments);c!=this.currentTerminalState?(r=(new Date).getTime(),v=0):v=(new Date).getTime()-r;this.currentTerminalState=c};var q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
+this.secondDiv=null);r.apply(this,arguments)};var w=(new Date).getTime(),v=0,u=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){u.apply(this,arguments);c!=this.currentTerminalState?(w=(new Date).getTime(),v=0):v=(new Date).getTime()-w;this.currentTerminalState=c};var q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
2E3<v||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&q.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;
mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),
@@ -2720,8 +2720,8 @@ mxEvent.addListener(a,"click",d);mxEvent.addListener(a,mxClient.IS_POINTER?"poin
if(f)k.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,g++)}mxUtils.write(k,mxResources.get("text"));d.appendChild(k);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);
d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var f=a.view.getState(c[b]);if(null!=f&&(f=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null),null!=f))if(null==d)d=f;else if(d!=f)return null}return d};
-BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,h,g){e=null!=e?e:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,p=!1,n=mxUtils.bind(this,function(n){var t=g?parseFloat(a.value):parseInt(a.value);isNaN(t)||c!=mxConstants.STYLE_ROTATION||(t=mxUtils.mod(Math.round(100*t),36E3)/100);t=Math.min(f,Math.max(b,isNaN(t)?d:t));if(l.cellEditor.isContentEditing()&&h)p||(p=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(t),a.value=t+e,
-p=!1);else if(t!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{l.setCellStyles(c,t,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=t+"px";a.removeAttribute("size")}),k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[t],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}a.value=t+e;mxEvent.consume(n)});h&&l.cellEditor.isContentEditing()&&
+BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,h,g){e=null!=e?e:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,p=!1,n=mxUtils.bind(this,function(n){var r=g?parseFloat(a.value):parseInt(a.value);isNaN(r)||c!=mxConstants.STYLE_ROTATION||(r=mxUtils.mod(Math.round(100*r),36E3)/100);r=Math.min(f,Math.max(b,isNaN(r)?d:r));if(l.cellEditor.isContentEditing()&&h)p||(p=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(r),a.value=r+e,
+p=!1);else if(r!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{l.setCellStyles(c,r,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=r+"px";a.removeAttribute("size")}),k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[r],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}a.value=r+e;mxEvent.consume(n)});h&&l.cellEditor.isContentEditing()&&
(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",n);mxEvent.addListener(a,"blur",n);return n};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 18px";return a};
BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
BaseFormatPanel.prototype.createStepper=function(a,c,d,b,f,e){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className=
@@ -2731,10 +2731,10 @@ BaseFormatPanel.prototype.createOption=function(a,c,d,b){var f=document.createEl
"checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),k!=a&&(k=a,c()!=k&&d(k)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)e.checked=!e.checked;l(e.checked)}});l(k);null!=b&&(b.install(l),this.listeners.push(b));return f};
BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,f,e,h,g){b=null!=b?"null"==b?null:b:"1";f=null!=f?"null"==f?null:f:"0";var k=this.editorUi,l=k.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=f:null},function(a){g&&l.stopEditing();if(null!=h)h.funct();else{l.getModel().beginUpdate();try{a=a?b:f,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),k.fireEvent(new mxEventObject("styleChanged",
"keys",[c],"values",[a],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}},{install:function(a){this.listener=function(){var b=l.view.getState(l.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,d)!=f)};l.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){l.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||g.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=c(),p=!1,n=null,u=function(a,g,f){if(!p){p=
+BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||g.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=c(),p=!1,n=null,t=function(a,g,f){if(!p){p=
!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:b;n.innerHTML='<div style="width:'+(mxClient.IS_QUIRKS?"30":"36")+"px;height:12px;margin:3px;border:1px solid black;background-color:"+mxUtils.htmlEntities(null!=a&&a!=mxConstants.NONE?a:b)+';"></div>';if(mxClient.IS_QUIRKS||8==document.documentMode)n.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1);n.style.display=k.checked||
-h?"":"none";null!=e&&e(a);g||(m=a,(f||h||c()!=m)&&d(m));p=!1}},n=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(m,function(a){u(a,null,!0)});mxEvent.consume(a)}));n.style.position="absolute";n.style.marginTop="-4px";n.style.right=mxClient.IS_QUIRKS?"0px":"20px";n.style.height="22px";n.className="geColorBtn";n.style.display=k.checked||h?"":"none";g.appendChild(n);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked=
-!k.checked),k.checked||null==m||m==mxConstants.NONE||b==mxConstants.NONE||(b=m),u(k.checked?b:mxConstants.NONE)});u(m,!0);null!=f&&(f.install(u),this.listeners.push(f));return g};
+h?"":"none";null!=e&&e(a);g||(m=a,(f||h||c()!=m)&&d(m));p=!1}},n=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(m,function(a){t(a,null,!0)});mxEvent.consume(a)}));n.style.position="absolute";n.style.marginTop="-4px";n.style.right=mxClient.IS_QUIRKS?"0px":"20px";n.style.height="22px";n.className="geColorBtn";n.style.display=k.checked||h?"":"none";g.appendChild(n);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked=
+!k.checked),k.checked||null==m||m==mxConstants.NONE||b==mxConstants.NONE||(b=m),t(k.checked?b:mxConstants.NONE)});t(m,!0);null!=f&&(f.install(t),this.listeners.push(f));return g};
BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,f){var e=this.editorUi,h=e.editor.graph;return this.createColorOption(a,function(){var a=h.view.getState(h.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){h.getModel().beginUpdate();try{null!=f&&f(a),h.setCellStyles(c,a,h.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}},d||mxConstants.NONE,
{install:function(a){this.listener=function(){var b=h.view.getState(h.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},b)};
BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.padding="6px";d.style.paddingRight="4px";var b=10-c;2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px";d.style.height=c+"px";d.style.borderLeft="1px solid #a0a0a0";d.innerHTML='<img border="0" src="'+(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUeNpidHB2ZyAGsACxDRBPIKCuA6TwCBB/h2rABu4A8SYmKCcXiP/iUFgAxL9gCi8A8SwsirZCMQMTkmANEH9E4v+CmsaArvAdyNFI/FlQ92EoBIE+qCRIUz168DBgsU4OqhinQpgHMABAgAEALY4XLIsJ20oAAAAASUVORK5CYII=":
@@ -2769,34 +2769,34 @@ ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph
a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(a)?"":a+"°"}),h=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,k);d.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){d.getModel().removeListener(k)}});k()}return a};
ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),f=this.createPanel();f.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));f.appendChild(e);var h,g,k,l,m=this.addUnitInput(f,"pt",84,44,function(){h.apply(this,arguments)}),p=this.addUnitInput(f,"pt",20,44,function(){g.apply(this,arguments)}),
n=document.createElement("div");n.className="geSprite geSprite-fit";n.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");n.style.position="relative";n.style.cursor="pointer";n.style.marginTop="-3px";n.style.border="0px";n.style.left="52px";mxUtils.setOpacity(n,50);mxEvent.addListener(n,"mouseenter",function(){mxUtils.setOpacity(n,100)});mxEvent.addListener(n,"mouseleave",function(){mxUtils.setOpacity(n,50)});mxEvent.addListener(n,"click",function(){c.actions.get("autosize").funct()});
-f.appendChild(n);this.addLabel(f,mxResources.get("width"),84);this.addLabel(f,mxResources.get("height"),20);mxUtils.br(f);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var u=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");u.style.width="100%";e.appendChild(u);f.appendChild(e);var t=u.getElementsByTagName("input")[0];this.addKeyHandler(m,q);this.addKeyHandler(p,
-q);h=this.addGeometryHandler(m,function(a,b){0<a.width&&(b=Math.max(1,b),t.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});g=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,b),t.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(f);var r=this.createPanel();r.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,
-mxResources.get("position"));r.appendChild(e);var v=this.addUnitInput(r,"pt",84,44,function(){k.apply(this,arguments)}),w=this.addUnitInput(r,"pt",20,44,function(){l.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var q=mxUtils.bind(this,function(a,c,e){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)f.style.display="none";else{f.style.display=
-"";if(e||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(e||document.activeElement!=p)p.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==d.getSelectionCount()&&null!=b.x&&null!=b.y){r.style.display="";if(e||document.activeElement!=v)v.value=b.x+(""==b.x?"":" pt");if(e||document.activeElement!=w)w.value=b.y+(""==b.y?"":" pt")}else r.style.display="none"});this.addKeyHandler(v,q);this.addKeyHandler(w,q);d.getModel().addListener(mxEvent.CHANGE,q);this.listeners.push({destroy:function(){d.getModel().removeListener(q)}});
-q();k=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(w,function(a,b){a.relative?a.offset.y=b:a.y=b});a.appendChild(r)};
+f.appendChild(n);this.addLabel(f,mxResources.get("width"),84);this.addLabel(f,mxResources.get("height"),20);mxUtils.br(f);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var t=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");t.style.width="100%";e.appendChild(t);f.appendChild(e);var r=t.getElementsByTagName("input")[0];this.addKeyHandler(m,q);this.addKeyHandler(p,
+q);h=this.addGeometryHandler(m,function(a,b){0<a.width&&(b=Math.max(1,b),r.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});g=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,b),r.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(f);var w=this.createPanel();w.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,
+mxResources.get("position"));w.appendChild(e);var v=this.addUnitInput(w,"pt",84,44,function(){k.apply(this,arguments)}),u=this.addUnitInput(w,"pt",20,44,function(){l.apply(this,arguments)});mxUtils.br(w);this.addLabel(w,mxResources.get("left"),84);this.addLabel(w,mxResources.get("top"),20);var q=mxUtils.bind(this,function(a,c,e){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)f.style.display="none";else{f.style.display=
+"";if(e||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(e||document.activeElement!=p)p.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==d.getSelectionCount()&&null!=b.x&&null!=b.y){w.style.display="";if(e||document.activeElement!=v)v.value=b.x+(""==b.x?"":" pt");if(e||document.activeElement!=u)u.value=b.y+(""==b.y?"":" pt")}else w.style.display="none"});this.addKeyHandler(v,q);this.addKeyHandler(u,q);d.getModel().addListener(mxEvent.CHANGE,q);this.listeners.push({destroy:function(){d.getModel().removeListener(q)}});
+q();k=this.addGeometryHandler(v,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(u,function(a,b){a.relative?a.offset.y=b:a.y=b});a.appendChild(w)};
ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isVertex(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isEdge(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur",
d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(p.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));p.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel(),
h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));e.appendChild(h);var g,k,l,m,p=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(p,q);mxEvent.addListener(p,"blur",c);mxEvent.addListener(p,"change",c);a.appendChild(e);var n=this.createPanel();n.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";
-h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"Start");n.appendChild(h);var u=this.addUnitInput(n,"pt",84,44,function(){l.apply(this,arguments)}),t=this.addUnitInput(n,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),84);this.addLabel(n,mxResources.get("top"),20);a.appendChild(n);this.addKeyHandler(u,q);this.addKeyHandler(t,q);var r=this.createPanel();r.style.paddingBottom="30px";h=document.createElement("div");
-h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");r.appendChild(h);var v=this.addUnitInput(r,"pt",84,44,function(){g.apply(this,arguments)}),w=this.addUnitInput(r,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);a.appendChild(r);this.addKeyHandler(v,q);this.addKeyHandler(w,q);var q=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();
-a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=p)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),p.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(u.value=d.sourcePoint.x,t.value=d.sourcePoint.y):n.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
-!1)?(v.value=d.targetPoint.x,w.value=d.targetPoint.y):r.style.display="none"):(n.style.display="none",r.style.display="none")});l=this.addEdgeGeometryHandler(u,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(t,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,q);this.listeners.push({destroy:function(){b.getModel().removeListener(q)}});
+h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"Start");n.appendChild(h);var t=this.addUnitInput(n,"pt",84,44,function(){l.apply(this,arguments)}),r=this.addUnitInput(n,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),84);this.addLabel(n,mxResources.get("top"),20);a.appendChild(n);this.addKeyHandler(t,q);this.addKeyHandler(r,q);var w=this.createPanel();w.style.paddingBottom="30px";h=document.createElement("div");
+h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");w.appendChild(h);var v=this.addUnitInput(w,"pt",84,44,function(){g.apply(this,arguments)}),u=this.addUnitInput(w,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(w);this.addLabel(w,mxResources.get("left"),84);this.addLabel(w,mxResources.get("top"),20);a.appendChild(w);this.addKeyHandler(v,q);this.addKeyHandler(u,q);var q=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();
+a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=p)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),p.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(t.value=d.sourcePoint.x,r.value=d.sourcePoint.y):n.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a,
+!1)?(v.value=d.targetPoint.x,u.value=d.targetPoint.y):w.style.display="none"):(n.style.display="none",w.style.display="none")});l=this.addEdgeGeometryHandler(t,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(r,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(v,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(u,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,q);this.listeners.push({destroy:function(){b.getModel().removeListener(q)}});
q()};TextFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#c5ecff', EndColorStr='#87d4fb', GradientType=0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px";e.style.paddingBottom=
"6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var h=e.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h,null,!0);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow=
"hidden";g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";var k=g.getElementsByTagName("div")[0];k.style.cssFloat="right";a.appendChild(h);mxClient.IS_FF&&(g.getElementsByTagName("div")[0].style.marginTop="-18px")}a.appendChild(e);h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,
!0);l.style.color="rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");k=e.cloneNode(!1);k.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+
-" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var p=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([p]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var n=function(a){return function(){return a()}},u=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
-b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),r=this.editorUi.toolbar.addButton("geSprite-right",
-mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([u,t,r]);if(b.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([v]);v.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-v.firstChild.style.backgroundPosition="2px 2px";v.firstChild.style.backgroundSize="18px 18px";this.styleButtons([v])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),q=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),g);this.styleButtons([w,q,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,F,A,D,E,J,M;b.cellEditor.isContentEditing()?(w.style.display="none",q.style.display="none",z.style.display="none",p.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==A.style.opacity&&document.execCommand("justifyfull",
+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var p=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([p]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var n=function(a){return function(){return a()}},t=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
+b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),r=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),w=this.editorUi.toolbar.addButton("geSprite-right",
+mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([t,r,w]);if(b.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([v]);v.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
+v.firstChild.style.backgroundPosition="2px 2px";v.firstChild.style.backgroundSize="18px 18px";this.styleButtons([v])}var u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),q=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),g);this.styleButtons([u,q,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,F,A,D,E,J,M;b.cellEditor.isContentEditing()?(u.style.display="none",q.style.display="none",z.style.display="none",p.style.display="none",A=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==A.style.opacity&&document.execCommand("justifyfull",
!1,null)},g),A.style.marginRight="9px",A.style.opacity=1,this.styleButtons([A,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},g),F=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),n=g.cloneNode(!1),n.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
-!1,null)},n),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},n)],this.styleButtons(g),g[g.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),n.style.height="40"),a.appendChild(n)):(m[2].style.marginRight="9px",r.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft=
+!1,null)},n),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},n)],this.styleButtons(g),g[g.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),n.style.height="40"),a.appendChild(n)):(m[2].style.marginRight="9px",w.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft=
"0px";g.style.paddingTop="8px";g.style.paddingBottom="4px";g.style.fontWeight="normal";mxUtils.write(g,mxResources.get("position"));var K=document.createElement("select");K.style.position="absolute";K.style.right="20px";K.style.width="97px";K.style.marginTop="-2px";for(var v="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),G={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<v.length;n++){var L=document.createElement("option");L.setAttribute("value",v[n]);mxUtils.write(L,mxResources.get(v[n]));K.appendChild(L)}g.appendChild(K);v=e.cloneNode(!1);v.style.marginLeft="0px";v.style.paddingTop=
@@ -2806,39 +2806,39 @@ a.appendChild(v),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxCo
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:
b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}H.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():
(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,g))for(B=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=B+"px";window.setTimeout(function(){H.value=B+" pt";B=null},0);break}},!0),g=this.createStepper(H,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=H.style.display;g.style.marginTop=
-"4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat="right";var I=null,C="#ffffff",T=null,U="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return C},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){I=a},destroy:function(){I=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
-mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});X.style.fontWeight="bold";var V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
+"4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat="right";var I=null,C="#ffffff",T=null,Z="#000000",W=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return C},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){I=a},destroy:function(){I=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
+mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});W.style.fontWeight="bold";var U=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");U.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Z},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var g=c.nextSibling;a[e].appendChild(c);
-c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){T=a},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";V.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
-null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(V);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||
+c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){T=a},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){W.style.display=null==a||a==mxConstants.NONE?"none":"";U.style.display=W.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
+null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(W);b.cellEditor.isContentEditing()||h.appendChild(U);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||
0!=f.edges.length||h.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));k.style.fontWeight="bold";h.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var aa,ka,ba,
-R,la,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),fa=this.addUnitInput(k,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var ga=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",20,44,function(){la.apply(this,arguments)});mxUtils.br(k);
+R,la,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),fa=this.addUnitInput(k,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var ga=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),X=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",20,44,function(){la.apply(this,arguments)});mxUtils.br(k);
this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});
mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),
!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(k);this.styleButtons(g);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(h);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=
-E&&b.selectNode(b.insertColumn(E,null!=J?J.cellIndex:0))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=E&&b.selectNode(b.insertColumn(E,null!=J?J.cellIndex+1:-1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=E&&null!=J&&b.deleteColumn(E,J.cellIndex)}catch(S){this.editorUi.handleError(S)}}),
-k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.selectNode(b.insertRow(E,M.sectionRowIndex))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.selectNode(b.insertRow(E,M.sectionRowIndex+1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",
-mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.deleteRow(E,M.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",
-mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=E){var c=E.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),
-d.style.border="",d.style.borderCollapse=""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=E){var c=E.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});
-this.editorUi.pickColor(c,function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=E){var a=E.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?E.setAttribute("cellPadding",a):E.removeAttribute("cellPadding")}),
-mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=E&&E.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=E&&E.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=E&&E.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight=
-"9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var W=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==
-mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);
-c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(q,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);K.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?
-"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":
-a==mxConstants.TEXT_DIRECTION_LTR?O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),Z.value=isNaN(a)?
-"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ga.value=isNaN(a)?"":a+" pt"});ka=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");la=this.installInputHandler(Z,mxConstants.STYLE_SPACING_RIGHT,0,
--999,999," pt");R=this.installInputHandler(Y,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(ga,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,W);this.addKeyHandler(fa,W);this.addKeyHandler(ca,W);this.addKeyHandler(Z,W);this.addKeyHandler(Y,W);this.addKeyHandler(ga,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();if(b.cellEditor.isContentEditing()){var ma=!1,e=function(){ma||
-(ma=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:
-null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);
-var k=mxUtils.getCurrentStyle(a),n=g(k),p=h(n,k,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var v=window.getSelection(),w=0;w<q.length;w++)if(v.containsNode(q[w],!0)){temp=mxUtils.getCurrentStyle(q[w]);var n=Math.max(g(temp),n),z=h(n,temp,q[w]);if(z!=p||isNaN(z))p=""}null!=k&&(c(m[0],"bold"==k.fontWeight||400<k.fontWeight||e("B")||e("STRONG")),c(m[1],"italic"==k.fontStyle||e("I")||e("EM")),c(m[2],e("U")),c(A,d(k.textAlign,"justify")),
-c(F,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(u,d(k.textAlign,"left")),c(t,d(k.textAlign,"center")),c(r,d(k.textAlign,"right")),A.style.opacity=1,A.style.cursor=""):(d=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),c(u,d==mxConstants.ALIGN_LEFT),c(t,d==mxConstants.ALIGN_CENTER),c(r,d==mxConstants.ALIGN_RIGHT),c(A,!1),A.style.opacity=.2,A.style.cursor="default"),E=b.getParentByName(a,"TABLE",b.cellEditor.textarea),M=null==E?null:b.getParentByName(a,
-"TR",E),J=null==E?null:b.getParentByNames(a,["TD","TH"],E),D.style.display=null!=E?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=B?(a.removeAttribute("size"),a.style.fontSize=B+" pt",B=null):H.value=isNaN(n)?"":n+" pt",z=parseFloat(p),isNaN(z)?ja.value="100 %":ja.value=Math.round(100*z)+" %"),n=k.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)}),p=k.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=T&&(U="#"==n.charAt(0)?n:"#000000",T(U,!0)),null!=I&&(C="#"==p.charAt(0)?p:null,I(C,!0)),null!=l.firstChild&&(k=k.fontFamily,"'"==k.charAt(0)&&(k=k.substring(1)),"'"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1)),'"'==
-k.charAt(0)&&(k=k.substring(1)),'"'==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1)),l.firstChild.nodeValue=k))}ma=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
-e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
+E&&b.insertColumn(E,null!=J?J.cellIndex:0)}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=E&&b.insertColumn(E,null!=J?J.cellIndex+1:-1)}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=E&&null!=J&&b.deleteColumn(E,J.cellIndex)}catch(S){this.editorUi.handleError(S)}}),
+k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.insertRow(E,M.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.insertRow(E,M.sectionRowIndex+1)}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
+mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.deleteRow(E,M.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
+mxUtils.bind(this,function(a){if(null!=E){var c=E.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=
+""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=E){var c=E.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,
+function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=E){var a=E.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?E.setAttribute("cellPadding",a):E.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=E&&E.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=E&&E.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=E&&E.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&
+(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var V=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);
+l.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(t,a==mxConstants.ALIGN_LEFT);c(r,a==mxConstants.ALIGN_CENTER);c(w,a==mxConstants.ALIGN_RIGHT);
+a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(q,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);K.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&
+b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
+O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
+X)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),X.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ga.value=isNaN(a)?"":a+" pt"});ka=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");la=this.installInputHandler(Y,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");R=this.installInputHandler(X,
+mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(ga,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,V);this.addKeyHandler(fa,V);this.addKeyHandler(ca,V);this.addKeyHandler(Y,V);this.addKeyHandler(X,V);this.addKeyHandler(ga,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var ma=!1,e=function(){ma||(ma=!0,window.setTimeout(function(){for(var a=
+b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
+2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var k=mxUtils.getCurrentStyle(a),
+n=g(k),p=h(n,k,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),v=0;v<q.length;v++)if(u.containsNode(q[v],!0)){temp=mxUtils.getCurrentStyle(q[v]);var n=Math.max(g(temp),n),z=h(n,temp,q[v]);if(z!=p||isNaN(z))p=""}null!=k&&(c(m[0],"bold"==k.fontWeight||400<k.fontWeight||e("B")||e("STRONG")),c(m[1],"italic"==k.fontStyle||e("I")||e("EM")),c(m[2],e("U")),c(A,d(k.textAlign,"justify")),c(F,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?
+(c(t,d(k.textAlign,"left")),c(r,d(k.textAlign,"center")),c(w,d(k.textAlign,"right")),A.style.opacity=1,A.style.cursor=""):(d=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),c(t,d==mxConstants.ALIGN_LEFT),c(r,d==mxConstants.ALIGN_CENTER),c(w,d==mxConstants.ALIGN_RIGHT),c(A,!1),A.style.opacity=.2,A.style.cursor="default"),E=b.getParentByName(a,"TABLE",b.cellEditor.textarea),M=null==E?null:b.getParentByName(a,"TR",E),J=null==E?null:b.getParentByNames(a,
+["TD","TH"],E),D.style.display=null!=E?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=B?(a.removeAttribute("size"),a.style.fontSize=B+" pt",B=null):H.value=isNaN(n)?"":n+" pt",z=parseFloat(p),isNaN(z)?ja.value="100 %":ja.value=Math.round(100*z)+" %"),n=k.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),
+p=k.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=T&&(Z="#"==n.charAt(0)?n:"#000000",T(Z,!0)),null!=I&&(C="#"==p.charAt(0)?p:null,I(C,!0)),null!=l.firstChild&&(k=k.fontFamily,"'"==k.charAt(0)&&(k=k.substring(1)),"'"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1)),'"'==k.charAt(0)&&(k=k.substring(1)),'"'==k.charAt(k.length-
+1)&&(k=k.substring(0,k.length-1)),l.firstChild.nodeValue=k))}ma=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};
+StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
StyleFormatPanel.prototype.getCssRules=function(a){var c=document.implementation.createHTMLDocument(""),d=document.createElement("style");mxUtils.setTextContent(d,a);c.body.appendChild(d);return d.sheet.cssRules};
@@ -2853,19 +2853,19 @@ null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.ST
e=0;e<g.length;e++){var k=document.createElement("option");k.setAttribute("value",g[e]);mxUtils.write(k,mxResources.get(g[e]));b.appendChild(k)}f.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);f.style.display=!d.fill||d.containsImage||
null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(f);h=this.getCustomColors();for(e=0;e<h.length;e++)a.appendChild(this.createCellColorOption(h[e].title,h[e].key,h[e].defaultValue));
return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];"swimlane"==this.format.getSelectionState().style.shape&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(v.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));v.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(v.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));v.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(u.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
+c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));u.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
"bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){f.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
"curved"==g.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)f.setCellStyles(c[e],d[e],f.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var p="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k="image"==e.style.shape?mxResources.get("border"):mxResources.get("line"),k=this.createCellColorOption(k,
-p,"#000000");k.appendChild(g);h.appendChild(k);var n=h.cloneNode(!1);n.style.fontWeight="normal";n.style.whiteSpace="nowrap";n.style.position="relative";n.style.paddingLeft="16px";n.style.marginBottom="2px";n.style.marginTop="2px";n.className="geToolbarContainer";var u=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop=
-"6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(n,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){u(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));u(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",
-null]).setAttribute("title",mxResources.get("dashed"));u(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");u(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");u(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),t=n.cloneNode(!1),
-r=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],
+p,"#000000");k.appendChild(g);h.appendChild(k);var n=h.cloneNode(!1);n.style.fontWeight="normal";n.style.whiteSpace="nowrap";n.style.position="relative";n.style.paddingLeft="16px";n.style.marginBottom="2px";n.style.marginTop="2px";n.className="geToolbarContainer";var t=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop=
+"6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(n,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){t(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));t(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",
+null]).setAttribute("title",mxResources.get("dashed"));t(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");t(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");t(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),r=n.cloneNode(!1),
+w=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],
["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,
-null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){u(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));u(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
-u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=n.cloneNode(!1),v=document.createElement("input");v.style.textAlign="right";
-v.style.marginTop="2px";v.style.width="41px";v.setAttribute("title",mxResources.get("linewidth"));n.appendChild(v);var w=v.cloneNode(!0);t.appendChild(w);var q=this.createStepper(v,c,1,9);q.style.display=v.style.display;q.style.marginTop="2px";n.appendChild(q);var z=this.createStepper(w,d,1,9);z.style.display=w.style.display;z.style.marginTop="2px";t.appendChild(z);mxClient.IS_QUIRKS?(v.style.height="17px",w.style.height="17px"):(v.style.position="absolute",v.style.right="32px",v.style.height="15px",
-q.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",z.style.right="20px");mxEvent.addListener(v,"blur",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
+null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){t(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));t(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
+t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");t(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=n.cloneNode(!1),v=document.createElement("input");v.style.textAlign="right";
+v.style.marginTop="2px";v.style.width="41px";v.setAttribute("title",mxResources.get("linewidth"));n.appendChild(v);var u=v.cloneNode(!0);r.appendChild(u);var q=this.createStepper(v,c,1,9);q.style.display=v.style.display;q.style.marginTop="2px";n.appendChild(q);var z=this.createStepper(u,d,1,9);z.style.display=u.style.display;z.style.marginTop="2px";r.appendChild(z);mxClient.IS_QUIRKS?(v.style.height="17px",u.style.height="17px"):(v.style.position="absolute",v.style.right="32px",v.style.height="15px",
+q.style.right="20px",u.style.position="absolute",u.style.right="32px",u.style.height="15px",z.style.right="20px");mxEvent.addListener(v,"blur",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(u,"blur",d);mxEvent.addListener(u,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",
@@ -2892,17 +2892,17 @@ mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstant
0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(r,8);this.addArrow(x);this.addArrow(F);this.addArrow(A);q=this.addArrow(l,
+"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(w,8);this.addArrow(x);this.addArrow(F);this.addArrow(A);q=this.addArrow(l,
9);q.className="geIcon";q.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";q.appendChild(D);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";z.appendChild(E);l.style.height="15px";m.style.height=
-"15px";r.style.height="15px";x.style.height="17px";F.style.marginLeft="3px";F.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(h);a.appendChild(t);a.appendChild(n);l=n.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
+"15px";w.style.height="15px";x.style.height="17px";F.style.marginLeft="3px";F.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(h);a.appendChild(r);a.appendChild(n);l=n.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
l.appendChild(m);var J,M,K=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),G=this.addUnitInput(l,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(l);q=document.createElement("div");q.style.height="8px";l.appendChild(q);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var L,O,Q=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,
mxResources.get("perimeter"));h.appendChild(m);var H,B=this.addUnitInput(h,"pt",20,41,function(){H.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var I=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(d||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
-w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+
+u)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+
this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.borderBottom=D.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
-"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";r.getElementsByTagName("div")[0].className="link"==
-e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(t.style.display="",n.style.display="none"):(t.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),F,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
+"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";w.getElementsByTagName("div")[0].className="link"==
+e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(r.style.display="",n.style.display="none"):(r.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),F,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
"endFill","1"),A,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(F,30),mxUtils.setOpacity(A,30)):(mxUtils.setOpacity(F,100),mxUtils.setOpacity(A,100));if(d||document.activeElement!=
P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
0)),K.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=B)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),B.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");M=this.installInputHandler(G,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(K,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
@@ -2930,11 +2930,11 @@ this.listener)},destroy:function(){d.removeListener(this.listener)}}))};DiagramF
DiagramFormatPanel.prototype.addPaperSize=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var b=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(c,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(b.widthInput,function(){b.set(d.pageFormat)});this.addKeyHandler(b.heightInput,
function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addListener("pageFormatChanged",f);this.listeners.push({destroy:function(){c.removeListener(f)}});d.getModel().addListener(mxEvent.CHANGE,f);this.listeners.push({destroy:function(){d.getModel().removeListener(f)}});return a};
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
-c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function u(){mxActor.call(this)}function t(a,b){this.canvas=
-a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function r(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function q(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function D(){mxShape.call(this)}function E(){mxShape.call(this)}
-function J(){mxEllipse.call(this)}function M(){mxShape.call(this)}function K(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxShape.call(this)}function H(){mxShape.call(this)}function B(){mxCylinder.call(this)}function I(){mxDoubleEllipse.call(this)}function C(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function U(){mxArrowConnector.call(this);
-this.spacing=0}function X(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function R(){mxActor.call(this)}function la(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function ga(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}
+c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function t(){mxActor.call(this)}function r(a,b){this.canvas=
+a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function q(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function A(){mxCylinder.call(this)}function D(){mxShape.call(this)}function E(){mxShape.call(this)}
+function J(){mxEllipse.call(this)}function M(){mxShape.call(this)}function K(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxShape.call(this)}function H(){mxShape.call(this)}function B(){mxCylinder.call(this)}function I(){mxDoubleEllipse.call(this)}function C(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function Z(){mxArrowConnector.call(this);
+this.spacing=0}function W(){mxActor.call(this)}function U(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function R(){mxActor.call(this)}function la(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function ga(){mxActor.call(this)}function X(){mxActor.call(this)}function Y(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}
function ma(){mxRhombus.call(this)}function S(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Fa(a,b,c,d,e,g,f,h,k,l){f+=k;var y=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(y.x-e-f,y.y-g-f,2*f,2*f);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),y=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,
g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=y&&(a.setFillAlpha(Math.abs(y)),a.setFillColor(0>y?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,e),a.lineTo(g,g),a.lineTo(0,
@@ -2952,19 +2952,19 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(
function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.isRoundable=function(){return!0};p.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,
-e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",u);t.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
-b;this.firstX=a;this.firstY=b};t.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};t.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};t.prototype.curveTo=function(a,b,c,d,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};t.prototype.arcTo=function(a,b,c,d,
-e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};t.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),y=this.defaultVariation;5>f&&(f=5,y/=3);for(var h=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,
-d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*y;this.originalLineTo.call(this.canvas,h*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
-var Ka=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new t(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ka.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
+e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);r.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
+b;this.firstX=a;this.firstY=b};r.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)};r.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};r.prototype.curveTo=function(a,b,c,d,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};r.prototype.arcTo=function(a,b,c,d,
+e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};r.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),y=this.defaultVariation;5>f&&(f=5,y/=3);for(var h=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,
+d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*y;this.originalLineTo.call(this.canvas,h*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};r.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
+var Ka=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ka.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ma=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ma.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=mxConstants.NONE||
(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?g=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.min(d*g,e*g)),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadTo(b+d,c,b+d,c+g),a.lineTo(b+d,c+e-g),a.quadTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadTo(b,c+e,b,c+e-g),
-a.lineTo(b,c+g),a.quadTo(b,c,b+g,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Na=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Na.apply(this,arguments)};mxUtils.extend(r,mxRectangleShape);r.prototype.size=.1;r.prototype.isHtmlAllowed=function(){return!1};r.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};r.prototype.paintForeground=
-function(a,b,c,d,e){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));g=Math.round(g);a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.moveTo(b+d-g,c);a.lineTo(b+d-g,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",r);mxUtils.extend(v,
-mxRectangleShape);v.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};v.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",v);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
-function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),y=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,g+y),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,g),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(q,mxActor);q.prototype.size=.2;q.prototype.fixedSize=20;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+a.lineTo(b,c+g),a.quadTo(b,c,b+g,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Na=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Na.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};w.prototype.paintForeground=
+function(a,b,c,d,e){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));g=Math.round(g);a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.moveTo(b+d-g,c);a.lineTo(b+d-g,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(v,
+mxRectangleShape);v.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};v.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",v);mxUtils.extend(u,mxHexagon);u.prototype.size=30;u.prototype.position=.5;u.prototype.position2=.5;u.prototype.base=20;u.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};u.prototype.isRoundable=
+function(){return!0};u.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),y=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,g+y),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,g),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",u);mxUtils.extend(q,mxActor);q.prototype.size=.2;q.prototype.fixedSize=20;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",q);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.isRoundable=function(){return!0};z.prototype.redrawPath=
function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,
b,c,d,e){var g=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+g);a.lineTo(b+d/2,c+e-g);a.moveTo(b+g,c+e/2);a.lineTo(b+d-g,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
@@ -2982,7 +2982,7 @@ function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this
mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+f,c);a.lineTo(b+f,c+Math.max(0,h-1.5*g));a.lineTo(b+Math.max(0,f-g),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",L);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size;
null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),
-a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",w.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;
+a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",u.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;
null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h,f),new mxPoint(g+h-e,f+k),new mxPoint(g,
f+k),new mxPoint(g+e,f)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=p.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,f+k),new mxPoint(g,f+k),new mxPoint(g+e,f)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,f)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f+e),new mxPoint(g+h,f),new mxPoint(g+h,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e)]):(e=k*Math.max(0,
@@ -2996,21 +2996,21 @@ h?y.y=c.y:y.x=c.x);return mxUtils.getPerimeterPoint(f,y,c)};mxStyleRegistry.putV
function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",P);mxUtils.extend(H,mxShape);H.prototype.inset=2;H.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
H);mxUtils.extend(B,mxCylinder);B.prototype.jettyWidth=32;B.prototype.jettyHeight=12;B.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",B);mxUtils.extend(I,mxDoubleEllipse);I.prototype.outerStroke=!0;I.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",I);
-mxUtils.extend(C,I);C.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",C);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",T);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=10;U.prototype.defaultArrowWidth=
-20;U.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};U.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",U);mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.isRoundable=
-function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",X);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=function(){return!1};
-V.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
-a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",V);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxUtils.extend(C,I);C.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",C);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",T);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=10;Z.prototype.defaultArrowWidth=
+20;Z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Z.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Z);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.isRoundable=
+function(){return!0};W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",W);mxUtils.extend(U,mxRectangleShape);U.prototype.dx=20;U.prototype.dy=20;U.prototype.isHtmlAllowed=function(){return!1};
+U.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
+a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",U);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",aa);mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ka);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=
20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-
b)/2,c),new mxPoint(0,c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(la,mxActor);la.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));
c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",la);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ca);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",fa);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);
-a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,
-c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Y);mxUtils.extend(Z,mxActor);Z.prototype.size=.375;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};
-mxCellRenderer.registerShape("offPageConnector",Z);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);
-a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ja);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",W);mxUtils.extend(ma,
+a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,
+c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",X);mxUtils.extend(Y,mxActor);Y.prototype.size=.375;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};
+mxCellRenderer.registerShape("offPageConnector",Y);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);
+a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ja);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",V);mxUtils.extend(ma,
mxRhombus);ma.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ma);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape("collate",S);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=
function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&
@@ -3042,25 +3042,25 @@ parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYL
b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ia(a,c/2))}return b},
label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(L.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
"width",L.prototype.width))),c=Math.max(1.5*L.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",L.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(L.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*L.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",r.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+"size",w.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
-[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));
-return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[N(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(b.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));
+return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[N(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));mxUtils.getValue(this.state.style,"base",u.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
+b)},function(a,b){mxUtils.getValue(this.state.style,"base",u.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",u.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(b.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",u.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",U.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
Math.min(a.height,b.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
-Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(q.prototype.size,!0,null,!0,q.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,Y.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(q.prototype.size,!0,null,!0,q.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,X.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=
function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=xa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=xa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),ha=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,b,
c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,n=za.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=y.x;var d=b-y.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(y=new mxPoint(y.x+k*b,y.y+l*
b),e.push(y)),y=new mxPoint(y.x+m*a,y.y+n*a)):(c&&(y=new mxPoint(y.x+m*a,y.y+n*a),e.push(y)),y=new mxPoint(y.x+k*b,y.y+l*b));e.push(y)};var y=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this,
arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,
+0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};u.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,
"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),
!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,
@@ -3073,10 +3073,10 @@ f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math
0),!1,null,0,.5*(c-d)));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};V.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;
-ja.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};Y.prototype.constraints=
-mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,
+0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};U.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;
+ja.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};X.prototype.constraints=
+mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,
1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,
@@ -3107,7 +3107,7 @@ function(){b.openLink(c.getUrl())});this.addAction("open...",function(){window.o
": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,
620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=f;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?
Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){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 c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,g=b.view.scale,f=e.x,h=e.y,e=null;if(1==c.length&&a){var t=b.getCellGeometry(c[0]);null!=t&&(e=t.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var r=Math.round(b.snap(b.popupMenuHandler.triggerX/g-f)),v=Math.round(b.snap(b.popupMenuHandler.triggerY/g-h));b.cellsMoved(c,r-e.x,v-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize",
+try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,g=b.view.scale,f=e.x,h=e.y,e=null;if(1==c.length&&a){var r=b.getCellGeometry(c[0]);null!=r&&(e=r.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var w=Math.round(b.snap(b.popupMenuHandler.triggerX/g-f)),v=Math.round(b.snap(b.popupMenuHandler.triggerY/g-h));b.cellsMoved(c,w-e.x,v-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize",
function(a){a=b.getSelectionCell();b.isEnabled()&&null!=a&&b.getModel().isVertex(a)&&(a=b.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shit+X");this.addAction("pasteSize",function(a){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=c.copiedSize){b.getModel().beginUpdate();try{var d=b.getSelectionCells();for(a=0;a<d.length;a++)if(b.getModel().isVertex(d[a])){var e=b.getCellGeometry(d[a]);null!=e&&(e=e.clone(),e.width=c.copiedSize.width,e.height=
c.copiedSize.height,b.getModel().setGeometry(d[a],e))}}finally{b.getModel().endUpdate()}}},null,null,"Alt+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();
@@ -3118,8 +3118,8 @@ null,null,"F2/Enter");this.addAction("editData...",function(){var a=b.getSelecti
320,200,!0,!0);d.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=c.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var b=a.getSelectionCell(),d=a.getLinkForCell(b)||"";c.showLinkDialog(d,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(b,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(b.clearSelection(),c.actions.get("image").funct())})).isEnabled=f;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&c.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var d=null,e=b.getLinkTitle(a);null!=c&&0<c.length&&(d=c[0].iconUrl,e=c[0].name||c[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&
(e=e.substring(0,30)+"..."));var g=b.getFreeInsertPoint(),d=new mxCell(e,new mxGeometry(g.x,g.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;b.setLinkForCell(d,a);b.cellSizeUpdated(d,!0);b.getModel().beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{b.getModel().endUpdate()}b.setSelectionCell(d);b.scrollCellToVisible(b.getSelectionCell())}})})).isEnabled=
-f;this.addAction("link...",mxUtils.bind(this,function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),d=a.getParentByName(b,"A",a.cellEditor.textarea),e="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var f=b.getElementsByTagName("a"),h=0;h<f.length&&null==d;h++)f[h].textContent==b.textContent&&(d=f[h]);null!=d&&"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var u=a.cellEditor.saveSelection();c.showLinkDialog(e,mxResources.get("apply"),
-mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(u);null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=f;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().getChildCount(d))b.updateGroupBounds([d],20);else{var e=b.view.getState(d),f=b.getCellGeometry(d);b.getModel().isVertex(d)&&null!=e&&null!=e.text&&
+f;this.addAction("link...",mxUtils.bind(this,function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),d=a.getParentByName(b,"A",a.cellEditor.textarea),e="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var f=b.getElementsByTagName("a"),h=0;h<f.length&&null==d;h++)f[h].textContent==b.textContent&&(d=f[h]);null!=d&&"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var t=a.cellEditor.saveSelection();c.showLinkDialog(e,mxResources.get("apply"),
+mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(t);null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=f;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().getChildCount(d))b.updateGroupBounds([d],20);else{var e=b.view.getState(d),f=b.getCellGeometry(d);b.getModel().isVertex(d)&&null!=e&&null!=e.text&&
null!=f&&b.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/b.view.scale,b.getModel().setGeometry(d,f)):b.updateCellSize(d)}}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=b.getView().getState(b.getSelectionCell());if(null!=a){var d="1";b.stopEditing();b.getModel().beginUpdate();try{if("1"==a.style.html){var d=null,e=b.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,
"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=e;e=mxUtils.extractTextWithWhitespace(f.childNodes);b.cellLabelChanged(a.cell,e)}else e=mxUtils.htmlEntities(b.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>")),b.cellLabelChanged(a.cell,b.sanitizeHtml(e));b.setCellStyles("html",d);c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});
this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),c="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",function(){var a="0",d=b.getView().getState(b.getSelectionCell());null!=d&&(a=d.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&b.setCellStyles(mxConstants.STYLE_ROTATION,a)},
@@ -3179,9 +3179,9 @@ Menus.prototype.addMenu=function(a,c,d){var b=this.get(a);null!=b&&(c.showDisabl
Menus.prototype.addInsertTableItem=function(a){function c(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b&&null!=d.cellEditor.textarea){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var h=0;h<f.length;h++)a.push(f[h]);
d.container.focus();d.pasteHtmlAtCaret(c(e.sectionRowIndex+1,b.cellIndex+1));b=d.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(h=b.length-1;0<=h;h--)if(0==h||b[h]!=a[h-1]){d.selectNode(b[h].rows[0].cells[0]);break}}}));var b='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';a.firstChild.innerHTML="";var f=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS||
d.setAttribute("cellPadding","8");for(var e=0;e<a;e++)for(var f=d.insertRow(e),g=0;g<c;g++){var h=f.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=b)}return d}(5,5);a.firstChild.appendChild(f);var e=document.createElement("div");e.style.padding="4px";e.style.fontSize=Menus.prototype.defaultFontSize+"px";e.innerHTML="1x1";a.firstChild.appendChild(e);mxEvent.addListener(f,"mouseover",function(a){var c=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=c){for(var h=d.getParentByName(c,"TR"),l=Math.min(20,
-h.sectionRowIndex+2),m=Math.min(20,c.cellIndex+2),p=f.rows.length;p<l;p++)for(var n=f.insertRow(p),u=0;u<f.rows[0].cells.length;u++){var t=n.insertCell(-1);mxClient.IS_QUIRKS&&(t.innerHTML=b)}for(p=0;p<f.rows.length;p++)for(n=f.rows[p],u=n.cells.length;u<m;u++)t=n.insertCell(-1),mxClient.IS_QUIRKS&&(t.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(l=0;l<f.rows.length;l++)for(m=f.rows[l],p=0;p<m.cells.length;p++)m.cells[p].style.backgroundColor=l<=h.sectionRowIndex&&p<=c.cellIndex?
+h.sectionRowIndex+2),m=Math.min(20,c.cellIndex+2),p=f.rows.length;p<l;p++)for(var n=f.insertRow(p),t=0;t<f.rows[0].cells.length;t++){var r=n.insertCell(-1);mxClient.IS_QUIRKS&&(r.innerHTML=b)}for(p=0;p<f.rows.length;p++)for(n=f.rows[p],t=n.cells.length;t<m;t++)r=n.insertCell(-1),mxClient.IS_QUIRKS&&(r.innerHTML=b);e.innerHTML=c.cellIndex+1+"x"+(h.sectionRowIndex+1);for(l=0;l<f.rows.length;l++)for(m=f.rows[l],p=0;p<m.cells.length;p++)m.cells[p].style.backgroundColor=l<=h.sectionRowIndex&&p<=c.cellIndex?
"blue":"white";mxEvent.consume(a)}})};
-Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var p=c[f];if(a.getModel().isEdge(p)){if(h){var n=a.getCellGeometry(p);null!=n&&(n=n.clone(),n.points=null,a.getModel().setGeometry(p,n))}for(var u=0;u<d.length;u++)a.setCellStyles(d[u],b[u],[p]);e.push(p)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
+Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var p=c[f];if(a.getModel().isEdge(p)){if(h){var n=a.getCellGeometry(p);null!=n&&(n=n.clone(),n.points=null,a.getModel().setGeometry(p,n))}for(var t=0;t<d.length;t++)a.setCellStyles(d[t],b[t],[p]);e.push(p)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,h,g){var k=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=h&&a.cellEditor.isContentEditing()?h():k(g)}),e,f)};
Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var f=0;f<a.length;f++)b.setCellStyles(a[f],c[f]),a[f]==mxConstants.STYLE_ALIGN&&b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("align");a.style.textAlign=null});null!=d&&d();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};
Menus.prototype.promptChange=function(a,c,d,b,f,e,h,g,k){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=b,e=a.getView().getState(a.getSelectionCell());null!=e&&(c=e.style[f]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(f,b)}finally{a.getModel().endUpdate()}null!=g&&g(b)}}),mxResources.get("enterValue")+(0<d.length?" "+
@@ -3246,8 +3246,8 @@ Toolbar.prototype.createLabel=function(a,c){var d=document.createElement("a");d.
Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var f=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(h&&(null==a.enabled||a.enabled)){f.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}h=!0;mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){h=this.currentElt!=a;b.preventDefault()}))}};
Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=
-function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),r=0;r<b;r++)(function(a){var b=
-document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+r]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
+function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),t=0;t<b;t++)(function(a){var b=
+document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+t]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";
h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var g=new jscolor.color(h);g.pickerOnfocus=!1;g.showPicker();var k=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";k.appendChild(jscolor.picker.box);var l=document.createElement("center");k.appendChild(h);
mxUtils.br(k);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";k.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);var n=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?
@@ -3256,49 +3256,49 @@ ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");c.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(d);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);d=document.createElement("a");d.setAttribute("href",
-"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,m){k=null!=k?k:!0;var p,n,u=document.createElement("table"),t=document.createElement("tbody");u.style.marginTop="8px";p=document.createElement("tr");n=document.createElement("td");
-n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";mxUtils.write(n,(f||mxResources.get("filename"))+":");p.appendChild(n);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width="180px";var v=mxUtils.button(d,function(){if(null==e||e(r.value))k&&a.hideDialog(),b(r.value)});v.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-r.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=u.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=r,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=
-b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(r.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),v.click());a.stopPropagation();a.preventDefault()}))}}};n=document.createElement("td");n.appendChild(r);p.appendChild(n);if(null!=f||null==h)t.appendChild(p),null!=m&&n.appendChild(FilenameDialog.createTypeHint(a,r,m));null!=h&&(p=document.createElement("tr"),n=document.createElement("td"),n.colSpan=2,n.appendChild(h),p.appendChild(n),
-t.appendChild(p));p=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&n.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",n.appendChild(d));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&
-v.click()});n.appendChild(v);a.editor.cancelFirst||n.appendChild(c);p.appendChild(n);t.appendChild(p);u.appendChild(t);this.container=u};FilenameDialog.filenameHelpLink=null;
+"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,m,p){k=null!=k?k:!0;var n,t,r=document.createElement("table"),w=document.createElement("tbody");r.style.marginTop="8px";n=document.createElement("tr");t=document.createElement("td");
+t.style.whiteSpace="nowrap";t.style.fontSize="10pt";t.style.width="120px";mxUtils.write(t,(f||mxResources.get("filename"))+":");n.appendChild(t);var v=document.createElement("input");v.setAttribute("value",c||"");v.style.marginLeft="4px";v.style.width=null!=p?p+"px":"180px";var u=mxUtils.button(d,function(){if(null==e||e(v.value))k&&a.hideDialog(),b(v.value)});u.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=r.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=v,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,
+function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(v.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),u.click());a.stopPropagation();a.preventDefault()}))}}};t=document.createElement("td");t.appendChild(v);n.appendChild(t);if(null!=f||null==h)w.appendChild(n),null!=m&&t.appendChild(FilenameDialog.createTypeHint(a,v,m));null!=h&&(n=document.createElement("tr"),t=document.createElement("td"),t.colSpan=2,t.appendChild(h),
+n.appendChild(t),w.appendChild(n));n=document.createElement("tr");t=document.createElement("td");t.colSpan=2;t.style.paddingTop="20px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&t.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),d.className="geBtn",t.appendChild(d));mxEvent.addListener(v,"keypress",function(a){13==
+a.keyCode&&u.click()});t.appendChild(u);a.editor.cancelFirst||t.appendChild(c);n.appendChild(t);w.appendChild(n);r.appendChild(w);this.container=r};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,c,d){var b=document.createElement("img");b.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(b,70);var f=function(){b.setAttribute("src",Editor.helpImage);b.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&c.value.substring(c.value.length-d[a].ext.length-1)=="."+d[a].ext){b.setAttribute("src",
mxClient.imageBasePath+"/warning.png");b.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(c,"keyup",f);mxEvent.addListener(c,"change",f);mxEvent.addListener(b,"click",function(c){var d=b.getAttribute("title");b.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(c)});f();return b};
-var TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,p){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var n,u,t=document.createElement("table"),r=document.createElement("tbody");n=document.createElement("tr");u=document.createElement("td");u.style.fontSize="10pt";u.style.width="100px";mxUtils.write(u,c);n.appendChild(u);r.appendChild(n);n=document.createElement("tr");u=document.createElement("td");var v=document.createElement("textarea");m&&v.setAttribute("wrap","off");v.setAttribute("spellcheck","false");
-v.setAttribute("autocorrect","off");v.setAttribute("autocomplete","off");v.setAttribute("autocapitalize","off");mxUtils.write(v,d||"");v.style.resize="none";v.style.width=h+"px";v.style.height=g+"px";this.textarea=v;this.init=function(){v.focus();v.scrollTop=0};u.appendChild(v);n.appendChild(u);r.appendChild(n);n=document.createElement("tr");u=document.createElement("td");u.style.paddingTop="14px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");c=mxUtils.button(e||mxResources.get("cancel"),
-function(){a.hideDialog();null!=f&&f()});c.className="geBtn";a.editor.cancelFirst&&u.appendChild(c);null!=k&&k(u,v);null!=b&&(k=mxUtils.button(p||mxResources.get("apply"),function(){l||a.hideDialog();b(v.value)}),k.className="geBtn gePrimaryBtn",u.appendChild(k));a.editor.cancelFirst||u.appendChild(c);n.appendChild(u);r.appendChild(n);t.appendChild(r);this.container=t},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");
-d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},
-!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var f=document.createElement("select");f.style.width="180px";f.className="geBtn";if(a.editor.graph.isEnabled()){var e=
-document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),f.appendChild(e));c.appendChild(f);
-e=mxUtils.button(mxResources.get("ok"),function(){var b=Graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(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"),u.setAttribute("disabled","true"),t.setAttribute("disabled","true"),v.setAttribute("disabled","true")):(n.removeAttribute("disabled"),u.removeAttribute("disabled"),t.removeAttribute("disabled"),v.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled")}
-function d(){u.style.backgroundColor=u.value*t.value>MAX_AREA||0>=u.value?"red":"";t.style.backgroundColor=u.value*t.value>MAX_AREA||0>=t.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,
+var TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,p,n){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var t,r,w=document.createElement("table"),v=document.createElement("tbody");t=document.createElement("tr");r=document.createElement("td");r.style.fontSize="10pt";r.style.width="100px";mxUtils.write(r,c);t.appendChild(r);v.appendChild(t);t=document.createElement("tr");r=document.createElement("td");var u=document.createElement("textarea");m&&u.setAttribute("wrap","off");u.setAttribute("spellcheck",
+"false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");mxUtils.write(u,d||"");u.style.resize="none";u.style.width=h+"px";u.style.height=g+"px";this.textarea=u;this.init=function(){u.focus();u.scrollTop=0};r.appendChild(u);t.appendChild(r);v.appendChild(t);t=document.createElement("tr");r=document.createElement("td");r.style.paddingTop="14px";r.style.whiteSpace="nowrap";r.setAttribute("align","right");null!=n&&(c=mxUtils.button(mxResources.get("help"),
+function(){a.editor.graph.openLink(n)}),c.className="geBtn",r.appendChild(c));e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});e.className="geBtn";a.editor.cancelFirst&&r.appendChild(e);null!=k&&k(r,u);null!=b&&(k=mxUtils.button(p||mxResources.get("apply"),function(){l||a.hideDialog();b(u.value)}),k.className="geBtn gePrimaryBtn",r.appendChild(k));a.editor.cancelFirst||r.appendChild(e);t.appendChild(r);v.appendChild(t);w.appendChild(v);this.container=w},EditDiagramDialog=
+function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};
+Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);
+var f=document.createElement("select");f.style.width="180px";f.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value",
+"import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=Graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(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"),t.setAttribute("disabled","true"),r.setAttribute("disabled","true"),v.setAttribute("disabled","true")):(n.removeAttribute("disabled"),t.removeAttribute("disabled"),r.removeAttribute("disabled"),v.removeAttribute("disabled"));"png"===p.value||"svg"===p.value?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}
+function d(){t.style.backgroundColor=t.value*r.value>MAX_AREA||0>=t.value?"red":"";r.style.backgroundColor=t.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",
"png");mxUtils.write(k,mxResources.get("formatPng"));p.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),p.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));p.appendChild(k);k=document.createElement("option");
k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));p.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),p.appendChild(k));k=document.createElement("td");k.appendChild(p);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");f.appendChild(k);var n=document.createElement("input");
-n.setAttribute("type","number");n.setAttribute("value","100");n.style.width="180px";k=document.createElement("td");k.appendChild(n);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");f.appendChild(k);var u=document.createElement("input");u.setAttribute("value",h);u.style.width="180px";k=document.createElement("td");k.appendChild(u);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");
-k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("value",g);t.style.width="180px";k=document.createElement("td");k.appendChild(t);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var r=document.createElement("input");r.setAttribute("type",
-"checkbox");r.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var v=document.createElement("input");v.setAttribute("type","number");v.setAttribute("value",ExportDialog.lastBorderValue);v.style.width="180px";
-k=document.createElement("td");k.appendChild(v);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(n,"change",function(){var a=Math.max(0,parseFloat(n.value)||100)/100;n.value=parseFloat((100*a).toFixed(2));0<h?(u.value=Math.floor(h*a),t.value=Math.floor(g*a)):(n.value="100",u.value=h,t.value=g);d()});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value)/h;0<a?(n.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(g*a)):(n.value=
-"100",u.value=h,t.value=g);d()});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value)/g;0<a?(n.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(h*a)):(n.value="100",u.value=h,t.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var w=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(n.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
-m.value,d=p.value,e=Math.max(0,parseFloat(n.value)||100)/100,f=Math.max(0,parseInt(v.value)),g=b.background;if(("svg"==d||"png"==d)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));w.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst?(k.appendChild(q),k.appendChild(w)):(k.appendChild(w),k.appendChild(q));f.appendChild(k);
+n.setAttribute("type","number");n.setAttribute("value","100");n.style.width="180px";k=document.createElement("td");k.appendChild(n);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("value",h);t.style.width="180px";k=document.createElement("td");k.appendChild(t);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");
+k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");f.appendChild(k);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";k=document.createElement("td");k.appendChild(r);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var w=document.createElement("input");w.setAttribute("type",
+"checkbox");w.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(w);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var v=document.createElement("input");v.setAttribute("type","number");v.setAttribute("value",ExportDialog.lastBorderValue);v.style.width="180px";
+k=document.createElement("td");k.appendChild(v);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(n,"change",function(){var a=Math.max(0,parseFloat(n.value)||100)/100;n.value=parseFloat((100*a).toFixed(2));0<h?(t.value=Math.floor(h*a),r.value=Math.floor(g*a)):(n.value="100",t.value=h,r.value=g);d()});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value)/h;0<a?(n.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(n.value=
+"100",t.value=h,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(n.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(h*a)):(n.value="100",t.value=h,r.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var u=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(n.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
+m.value,d=p.value,e=Math.max(0,parseFloat(n.value)||100)/100,f=Math.max(0,parseInt(v.value)),g=b.background;if(("svg"==d||"png"==d)&&w.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));u.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst?(k.appendChild(q),k.appendChild(u)):(k.appendChild(u),k.appendChild(q));f.appendChild(k);
l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,c,d,b,f,e){var h=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(b,f,e)),c,d);else{var g=h.getGraphBounds(),k=mxUtils.createXmlDocument(),l=k.createElement("output");k.appendChild(l);k=new mxXmlCanvas2D(l);k.translate(Math.floor((e/f-g.x)/h.view.scale),Math.floor((e/f-g.y)/h.view.scale));k.scale(f/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
k);l="xml="+encodeURIComponent(mxUtils.getXml(l));k=Math.ceil(g.width*f/h.view.scale+2*e);f=Math.ceil(g.height*f/h.view.scale+2*e);l.length<=MAX_REQUEST_SIZE&&k*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+k+"&h="+f+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function d(){0<w.value.length?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var g=new mxForm("properties");g.table.style.width="100%";for(var k=e.attributes,l=[],m=[],p=0,n=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,
-c):null,u=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin=
-"0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=n?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[p]+":",c,2);m[a].style.width="100%";u(m[a],b)},t=[],r=f.getModel().getParent(c)==f.getModel().getRoot(),v=0;v<k.length;v++)!r&&
-"label"==k[v].nodeName||"placeholders"==k[v].nodeName||t.push({name:k[v].nodeName,value:k[v].nodeValue});t.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=n&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,n),g.addField(mxResources.get("id")+":",k));for(v=0;v<t.length;v++)h(p,t[v].name,t[v].value),p++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";
-h.appendChild(g.table);t=document.createElement("div");t.style.boxSizing="border-box";t.style.paddingRight="160px";t.style.whiteSpace="nowrap";t.style.marginTop="6px";t.style.width="100%";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");w.style.boxSizing="border-box";w.style.marginLeft="2px";w.style.width="100%";t.appendChild(w);h.appendChild(t);b.appendChild(h);
-var q=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);u(c,a);c.focus()}q.setAttribute("disabled","disabled");w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=
-function(){0<m.length?m[0].focus():w.focus()};q.setAttribute("title",mxResources.get("addProperty"));q.setAttribute("disabled","disabled");q.style.textOverflow="ellipsis";q.style.position="absolute";q.style.overflow="hidden";q.style.width="144px";q.style.right="0px";q.className="geBtn";t.appendChild(q);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";t=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);
-e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(A){mxUtils.alert(A)}});t.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||
-a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});r.appendChild(v);mxUtils.write(r,mxResources.get("placeholders"));if(null!=
+var EditDataDialog=function(a,c){function d(){0<u.value.length?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var g=new mxForm("properties");g.table.style.width="100%";for(var k=e.attributes,l=[],m=[],p=0,n=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,
+c):null,t=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin=
+"0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=n?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[p]+":",c,2);m[a].style.width="100%";t(m[a],b)},r=[],w=f.getModel().getParent(c)==f.getModel().getRoot(),v=0;v<k.length;v++)!w&&
+"label"==k[v].nodeName||"placeholders"==k[v].nodeName||r.push({name:k[v].nodeName,value:k[v].nodeValue});r.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=n&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,n),g.addField(mxResources.get("id")+":",k));for(v=0;v<r.length;v++)h(p,r[v].name,r[v].value),p++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";
+h.appendChild(g.table);r=document.createElement("div");r.style.boxSizing="border-box";r.style.paddingRight="160px";r.style.whiteSpace="nowrap";r.style.marginTop="6px";r.style.width="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("enterPropertyName"));u.setAttribute("type","text");u.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");u.style.boxSizing="border-box";u.style.marginLeft="2px";u.style.width="100%";r.appendChild(u);h.appendChild(r);b.appendChild(h);
+var q=mxUtils.button(mxResources.get("addProperty"),function(){var a=u.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);t(c,a);c.focus()}q.setAttribute("disabled","disabled");u.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=
+function(){0<m.length?m[0].focus():u.focus()};q.setAttribute("title",mxResources.get("addProperty"));q.setAttribute("disabled","disabled");q.style.textOverflow="ellipsis";q.style.position="absolute";q.style.overflow="hidden";q.style.width="144px";q.style.right="0px";q.className="geBtn";r.appendChild(q);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";r=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);
+e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(A){mxUtils.alert(A)}});r.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keyup",d);mxEvent.addListener(u,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||
+a.editor.graph.getModel().isEdge(c)){w=document.createElement("span");w.style.marginRight="10px";v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});w.appendChild(v);mxUtils.write(w,mxResources.get("placeholders"));if(null!=
EditDataDialog.placeholderHelpLink){v=document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="8px";v.style.cursor="help";var z=document.createElement("img");mxUtils.setOpacity(z,50);z.style.height="16px";z.style.width="16px";z.setAttribute("border","0");z.setAttribute("valign","middle");z.style.marginTop=mxClient.IS_IE11?"0px":"-4px";z.setAttribute("src",Editor.helpImage);
-v.appendChild(z);r.appendChild(v)}k.appendChild(r)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(t)):(k.appendChild(t),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
+v.appendChild(z);w.appendChild(v)}k.appendChild(w)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(r)):(k.appendChild(r),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
"text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});e.appendChild(h);e.appendChild(c);f.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
@@ -3311,22 +3311,22 @@ m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=h.pageScale;b.pageFormat=h.
function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var p=a.actions.get("zoomIn"),n=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?p.funct():n.funct(),mxEvent.consume(a))})}},LayersWindow=function(a,c,d,b,f){function e(b){if(g.isEnabled()&&null!=b){var c=g.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),
mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&g.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var f=document.createElement("div");f.className="geToolbarContainer";f.style.overflow="hidden";f.style.position="relative";f.style.padding="4px";f.style.height="22px";f.style.display="block";f.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;f.style.borderWidth=
"0px 0px 1px 0px";f.style.borderColor="#c3c3c3";f.style.borderStyle="solid";f.style.whiteSpace="nowrap";f.setAttribute("title",b);var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(f,"dragover",function(b){b.dataTransfer.dropEffect="move";n=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){p=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});
-mxEvent.addListener(f,"dragend",function(a){null!=p&&null!=n&&g.addCell(c,g.model.root,n);n=p=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var q=g.view.getState(c),r=null!=q?q.style:g.getCellStyle(c);"1"==mxUtils.getValue(r,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",
-Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(r,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",
+mxEvent.addListener(f,"dragend",function(a){null!=p&&null!=n&&g.addCell(c,g.model.root,n);n=p=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var q=g.view.getState(c),u=null!=q?q.style:g.getCellStyle(c);"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",
+Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",
[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);f.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),
b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,
-a-1);mxEvent.consume(b)})),0<=a&&a<u-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
-(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",t=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}u=g.model.getChildCount(g.model.root);
-m.innerHTML="";for(var b=u-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(t)||mxResources.get("background");v.setAttribute("title",mxResources.get("removeIt",[c]));z.setAttribute("title",mxResources.get("duplicateIt",[c]));q.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");
+a-1);mxEvent.consume(b)})),0<=a&&a<t-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
+(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",r=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}t=g.model.getChildCount(g.model.root);
+m.innerHTML="";for(var b=t-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(r)||mxResources.get("background");v.setAttribute("title",mxResources.get("removeIt",[c]));z.setAttribute("title",mxResources.get("duplicateIt",[c]));q.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(u.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");
k.style.userSelect="none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":Dialog.backdropColor;m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=
-parseInt(l)+7+"px";k.appendChild(m);var p=null,n=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";n=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var u=null,t=null,r=document.createElement("div");r.className="geToolbarContainer";r.style.position="absolute";r.style.bottom="0px";r.style.left="0px";r.style.right="0px";r.style.height=l;r.style.overflow="hidden";r.style.padding=EditorUi.compactUi?
-"4px 0px 3px 0px":"1px";r.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;r.style.borderWidth="1px 0px 0px 0px";r.style.borderColor="#c3c3c3";r.style.borderStyle="solid";r.style.display="block";r.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(r.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';
-mxEvent.addListener(v,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(t);g.removeCells([t],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(v.className="geButton mxDisabled");r.appendChild(v);var w=l.cloneNode();
-w.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",[""])));w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(b){if(g.isEnabled()&&!g.isSelectionEmpty()){a.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=u-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),
-0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=mxUtils.getOffset(w);c.popup(d.x,d.y+w.offsetHeight,null,b);a.setCurrentMenu(c)}});r.appendChild(w);var q=l.cloneNode();q.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';
-q.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(q,"click",function(b){g.isEnabled()&&a.showDataDialog(t);mxEvent.consume(b)});g.isEnabled()||(q.className="geButton mxDisabled");r.appendChild(q);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(t),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),
-a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");r.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);
-g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");r.appendChild(l);k.appendChild(r);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+parseInt(l)+7+"px";k.appendChild(m);var p=null,n=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";n=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var t=null,r=null,w=document.createElement("div");w.className="geToolbarContainer";w.style.position="absolute";w.style.bottom="0px";w.style.left="0px";w.style.right="0px";w.style.height=l;w.style.overflow="hidden";w.style.padding=EditorUi.compactUi?
+"4px 0px 3px 0px":"1px";w.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;w.style.borderWidth="1px 0px 0px 0px";w.style.borderColor="#c3c3c3";w.style.borderStyle="solid";w.style.display="block";w.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(w.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';
+mxEvent.addListener(v,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(v.className="geButton mxDisabled");w.appendChild(v);var u=l.cloneNode();
+u.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",[""])));u.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(u,"click",function(b){if(g.isEnabled()&&!g.isSelectionEmpty()){a.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=t-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),
+0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=mxUtils.getOffset(u);c.popup(d.x,d.y+u.offsetHeight,null,b);a.setCurrentMenu(c)}});w.appendChild(u);var q=l.cloneNode();q.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';
+q.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(q,"click",function(b){g.isEnabled()&&a.showDataDialog(r);mxEvent.consume(b)});g.isEnabled()||(q.className="geButton mxDisabled");w.appendChild(q);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(r),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),
+a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");w.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);
+g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");w.appendChild(l);k.appendChild(w);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?u.className="geButton mxDisabled":u.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-
48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -7939,28 +7939,28 @@ DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this
DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;
DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
-DrawioFile.prototype.updateFile=function(a,c,b,d){null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(e){try{null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=e?this.mergeFile(e,a,c,d):this.reloadFile(a,c))}catch(g){null!=c&&c(g)}}),c))};
-DrawioFile.prototype.mergeFile=function(a,c,b,d){var e=!0;try{this.stats.fileMerged++;var g=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(g,this.ui.pages):null;var m=[this.ui.diffPages(null!=d?d:g,this.shadowPages)];if(!this.ignorePatches(m)){var n=this.ui.patchPages(g,
-m[0]);d={};var t=this.ui.getHashValueForPages(n,d),g={},f=this.ui.getHashValueForPages(this.shadowPages,g);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",m,"checksum",f==t,t);if(null!=t&&t!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(b,m,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+t+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(m,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw e=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=b&&b(z);try{if(e)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var q=this.getCurrentUser(),A=null!=q?q.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,z)}}catch(D){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var e=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(e=this.ui.anonymizeNode(e,!0));e.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,e,!0);b.appendChild(e)}return mxUtils.getPrettyXml(b)};
+DrawioFile.prototype.updateFile=function(a,c,b,d){null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,a,c,d):this.reloadFile(a,c))}catch(e){null!=c&&c(e)}}),c))};
+DrawioFile.prototype.mergeFile=function(a,c,b,d){var g=!0;try{this.stats.fileMerged++;var e=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(e,this.ui.pages):null;var m=[this.ui.diffPages(null!=d?d:e,this.shadowPages)];if(!this.ignorePatches(m)){var n=this.ui.patchPages(e,
+m[0]);d={};var q=this.ui.getHashValueForPages(n,d),e={},f=this.ui.getHashValueForPages(this.shadowPages,e);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",m,"checksum",f==q,q);if(null!=q&&q!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(b,m,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+q+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(m,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=b&&b(x);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var t=this.getCurrentUser(),z=null!=t?t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,x)}}catch(C){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var g=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,g,!0);b.appendChild(g)}return mxUtils.getPrettyXml(b)};
DrawioFile.prototype.compressReportData=function(a,c,b){c=null!=c?c:1E4;null!=b&&null!=a&&a.length>b?a=a.substring(0,b)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,c,b,d,e){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var g=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+e+" "+this.getHash(),(null!=b?b:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?g(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?g(a):g(null)}),function(){})}else{var k=this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Checksum Error in "+e+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+m+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:e,label:"user_"+m+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(n){}}}catch(n){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,b,d){try{var e=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),g=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),m=null!=k?this.ui.hashValue(k.id):"unknown",n=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",t=this.getTitle(),f=t.lastIndexOf("."),k="xml";0<f&&(k=t.substring(f));var l=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.checksumError=function(a,c,b,d,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var e=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=b?b:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?e(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?e(a):e(null)}),function(){})}else{var k=this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+m+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+m+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(n){}}}catch(n){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,b,d){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),m=null!=k?this.ui.hashValue(k.id):"unknown",n=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",q=this.getTitle(),f=q.lastIndexOf("."),k="xml";0<f&&(k=q.substring(f));var l=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+m+n+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+
-(null!=b?"\n\nError: "+b.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+e+"\n\nData:\n"+g,d)}catch(p){}};
-DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),g=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(g,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=
+(null!=b?"\n\nError: "+b.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+g+"\n\nData:\n"+e,d)}catch(p){}};
+DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),e=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(e,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=
this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}catch(d){null!=c&&c(d)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,b=0;b<a.length&&c;b++)c=c&&0==Object.keys(a[b]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,d=b.history.slice(),e=b.indexOfNextAdd,g=this.ui.editor.graph;g.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var m=g.foldingEnabled,n=g.mathEnabled,t=g.cellRenderer.redraw;g.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());t.apply(this,arguments)};g.model.beginUpdate();try{for(var f=
-0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{g.container.style.visibility="";g.model.endUpdate();g.cellRenderer.redraw=t;this.changeListenerEnabled=k;b.history=d;b.indexOfNextAdd=e;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
-g.mathEnabled?(this.ui.editor.updateGraphComponents(),g.refresh()):(m!=g.foldingEnabled?g.view.revalidate():g.view.validate(),g.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,c,b,d,e,g){try{if(this.isEditable())if(!e&&this.invalidChecksum)if(null!=b)b({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=b)b({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(k){if(null!=b)b(k);else throw k;}};
-DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,c,b){};DrawioFile.prototype.saveFile=function(a,c,b,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};
-DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,b){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,c,b){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};
+DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,d=b.history.slice(),g=b.indexOfNextAdd,e=this.ui.editor.graph;e.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var m=e.foldingEnabled,n=e.mathEnabled,q=e.cellRenderer.redraw;e.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());q.apply(this,arguments)};e.model.beginUpdate();try{for(var f=
+0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{e.container.style.visibility="";e.model.endUpdate();e.cellRenderer.redraw=q;this.changeListenerEnabled=k;b.history=d;b.indexOfNextAdd=g;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
+e.mathEnabled?(this.ui.editor.updateGraphComponents(),e.refresh()):(m!=e.foldingEnabled?e.view.revalidate():e.view.validate(),e.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,c,b,d,g,e){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=b)b({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=b)b({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(k){if(null!=b)b(k);else throw k;}};
+DrawioFile.prototype.updateFileData=function(){var a=null!=this.ui.fileNode?"false"==this.ui.fileNode.getAttribute("compressed"):!1;this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,a))};DrawioFile.prototype.saveAs=function(a,c,b){};DrawioFile.prototype.saveFile=function(a,c,b,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};
+DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,b){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,c,b){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};
DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
DrawioFile.prototype.open=function(){this.stats.opened++;var a=this.getData();null!=a&&(this.ui.setFileData(a),this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null));this.installListeners();this.isSyncSupported()&&this.startSync()};DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(a,c){a(null)};
DrawioFile.prototype.loadDescriptor=function(a,c){a(null)};DrawioFile.prototype.loadPatchDescriptor=function(a,c){this.loadDescriptor(mxUtils.bind(this,function(b){a(b)}),c)};DrawioFile.prototype.patchDescriptor=function(a,c){this.setDescriptorEtag(a,this.getDescriptorEtag(c))};DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.sync.start())};
@@ -7984,315 +7984,324 @@ mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("
b)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,c);else if(this.isModified()&&this.addUnsavedStatus(a),c)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var b=null!=a?null!=a.error?a.error.message:a.message:null;null!=b&&60<b.length&&(b=b.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),e=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,d,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
-function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,d,e):this.invalidChecksum?this.showRefreshDialog(b,d,this.getErrorMessage(a)):c?this.showConflictDialog(e,g):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,
-d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),e=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,d,g):this.invalidChecksum?this.showRefreshDialog(b,d,this.getErrorMessage(a)):c?this.showConflictDialog(g,e):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(b,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=
this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};
-DrawioFile.prototype.fileSaved=function(a,c,b,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d,a)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,k);else{var e=
-this.getCurrentUser(),g=null!=e?e.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),g,k)}}catch(m){}}};
-DrawioFile.prototype.autosave=function(a,c,b,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<c?a:0;this.clearAutosave();var e=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==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!=b&&b(a)}),mxUtils.bind(this,
-function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=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.fileSaved=function(a,c,b,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d,a)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,k);else{var g=
+this.getCurrentUser(),e=null!=g?g.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),e,k)}}catch(m){}}};
+DrawioFile.prototype.autosave=function(a,c,b,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<c?a:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==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!=b&&b(a)}),mxUtils.bind(this,
+function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=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.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,c){if(null!=a&&null!=c){var b=a.lastIndexOf("."),d=0<b?a.substring(b):"",b=c.lastIndexOf(".");return d===(0<b?c.substring(b):"")}return a==c};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.stats.destroyed++;this.clearAutosave();this.removeListeners();null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,c){a([])};DrawioFile.prototype.addComment=function(a,c,b){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,c){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,c)};LocalFile=function(a,c,b,d){DrawioFile.call(this,a,c);this.title=b;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,c,b){this.saveAs(this.title,c,b)};LocalFile.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};
-LocalFile.prototype.saveFile=function(a,c,b,d){this.title=a;this.updateFileData();c=this.getData();var e=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),g=mxUtils.bind(this,function(c){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,e?"image/png":"text/xml",e);else if(c.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(c)+"&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(c)}));this.setModified(!1);this.contentChanged();null!=b&&b()});e?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):g(c)};LocalFile.prototype.rename=function(a,c,b){this.title=a;this.descriptorChanged();null!=c&&c()};
+LocalFile.prototype.saveFile=function(a,c,b,d){this.title=a;this.updateFileData();c=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),e=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 d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&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!=b&&b()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):e(c)};LocalFile.prototype.rename=function(a,c,b){this.title=a;this.descriptorChanged();null!=c&&c()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(a,c,b){LocalFile.call(this,a,c,b)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,c,b){DrawioFile.call(this,a,c);this.title=b};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,c,b){this.saveAs(this.getTitle(),c,b)};StorageFile.prototype.saveAs=function(a,c,b){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,c,b)};
-StorageFile.prototype.saveFile=function(a,c,b,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!=b&&b()}))}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!=b&&b()};StorageFile.prototype.rename=function(a,c,b){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,c)}),b)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),g,b):g()})):c()};
+StorageFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=b&&b()}))}catch(e){null!=d&&d(e)}});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]),g,d):g()}))}else null!=b&&b()};StorageFile.prototype.rename=function(a,c,b){var d=this.getTitle();d!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(g){var e=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,c)}),b)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),e,b):e()})):c()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.getLatestVersion=function(a,c){this.ui.getLocalData(this.title,mxUtils.bind(this,function(b){a(new StorageFile(this.ui,b,this.title))}))};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,c,b){StorageFile.call(this,a,c,b)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(a,c,b){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,c,b){DrawioFile.call(this,a,c);this.title=b;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,c,b){RemoteFile.call(this,a,c,b.title);this.libObj=b};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,c,b){};
RemoteLibrary.prototype.saveAs=function(a,c,b){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,c,b){StorageFile.call(this,a,c,b);a=b;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,c,b){return!1};UrlLibrary.prototype.saveAs=function(a,c,b){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,c,b){function d(d,p,g,e,u,k){function q(){mxEvent.addListener(x,"click",null!=k?k: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,t.checked);c()})):g==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,t.checked);
-c()})):(a.setMode(g,t.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",p);mxClient.IS_QUIRKS&&
-(x.style.cssFloat="left",x.style.zoom="1");var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";if(null!=d){var B=document.createElement("img");B.setAttribute("src",d);B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width="60px";B.style.height="60px";B.style.paddingBottom="6px";x.appendChild(B)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&
-(y.style.paddingTop="0px",y.style.marginTop="-2px");x.appendChild(y);mxUtils.write(y,p);if(null!=u)for(d=0;d<u.length;d++)mxUtils.br(y),mxUtils.write(y,u[d]);if(null!=e&&null==a[e]){B.style.visibility="hidden";mxUtils.setOpacity(y,10);var v=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});v.spin(x);var z=window.setTimeout(function(){null==a[e]&&(v.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",
-mxUtils.bind(this,function(b,c){null!=a[e]&&c.getProperty("client")==a[e]&&(window.clearTimeout(z),mxUtils.setOpacity(y,100),B.style.visibility="",v.stop(),q(),"drive"==e&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else q();n.appendChild(x);++f>=b&&(mxUtils.br(n),f=0)}b=null!=b?b: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")-
-3+"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");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border",
-"0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";g.appendChild(k);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 t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;var f=0,l=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");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(t);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 p=a.getRecent();if(null!=p&&0<p.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var v=document.createElement("option");v.setAttribute("value","");v.setAttribute("selected","selected");v.style.textAlign="center";mxUtils.write(v,mxResources.get("openRecent")+"...");
-u.appendChild(v);for(v=0;v<p.length;v++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");u.appendChild(c)})(p[v]);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&&(p=document.createElement("div"),p.style.cursor=
-"pointer",p.style.padding="18px 0px 6px 0px",p.style.fontSize="12px",p.style.color="gray",mxUtils.write(p,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(p,"click",function(){if(null==a.storageFileInputElt){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.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),g.appendChild(p),n.style.paddingBottom="4px");n.appendChild(g);mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop=
-"-14px",l.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",e.appendChild(l))},5E3);this.container=e},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";var b=a.addLanguageMenu(c,!0);null!=b&&(b.style.bottom="19px");
-b=null;b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px";b.style.left="26px";b.style.color="gray";var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border",
-"0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);d.style.marginRight="2px";b.appendChild(d);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="40px";d.style.height="40px";d.style.marginRight="12px";d.style.paddingBottom=
-"4px";var 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 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"):(b.appendChild(d),mxUtils.write(b,e),c.appendChild(b),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);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?
-mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(d=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)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(k.style.marginBottom="24px",d=document.createElement("a"),d.setAttribute("href","javascript:void(0)"),d.style.display="inline-block",d.style.marginTop="6px",mxUtils.write(d,mxResources.get("changeUser")+" ("+b.displayName+")"),k.style.marginBottom="16px",g.style.paddingBottom="18px",mxEvent.addListener(d,"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(d)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?d(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?d(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&
-d(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&d(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(g),d=document.createElement("a"),d.setAttribute("href","javascript:void(0)"),d.style.display="inline-block",d.style.marginTop="8px",mxUtils.write(d,mxResources.get("changeStorage")),mxEvent.addListener(d,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),g.appendChild(d));c.appendChild(g);this.container=
-c},EmbedDialog=function(a,c,b,d,e,g){d=document.createElement("div");var k=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=g?mxUtils.write(d,g):mxUtils.write(d,mxResources.get(5E5>c.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(c.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>c.length?(m.value=c,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",
-!1,null)):(m.setAttribute("readonly","true"),m.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var f=5E5>c.length?
-m.value:c;if(null!=e)e(f);else if(k)try{var d=a.openLink(f);null!=d&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=d&&null!=d.location.href&&d.location.href.substring(0,8)!=f.substring(0,8)&&(d.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var g=window.open(),g=null!=g?g.document:null;null!=g?(g.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),g.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className="geBtn",g.appendChild(n));if(!k||7500<c.length){var t=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});t.className="geBtn";g.appendChild(t)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+
-encodeURIComponent(m.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img");t.setAttribute("src",Editor.facebookImage);t.setAttribute("width","18");t.setAttribute("height","18");t.setAttribute("border","0");f.appendChild(t);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";g.appendChild(f)}7168>
-c.length&&(f=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(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",f.appendChild(t),f.setAttribute("title",
-mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",g.appendChild(f))}t=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(t);f=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});
-5E5>c.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(g.appendChild(f),f.className="geBtn gePrimaryBtn",t.className="geBtn"):(g.appendChild(n),t.className="geBtn",n.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,c){function b(){var a=null!=x&&null!=x.getTitle()?x.getTitle():this.defaultFilename;if(B.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<F.length&&(b+="&s="+F);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(q.checked?"1":"0");b+="&fit="+(y.checked?"1":"0");
-b+="&resize="+(D.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;e.mathEnabled&&(b+="&math=1");z.checked?b+="&edit=_blank":A.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else x.constructor==DriveFile||x.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=x.getHash().substring(1),b=x.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),t.value=b):t.value=""}var d=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),k=e.view.scale,m=Math.floor(g.x/k-e.view.translate.x),n=Math.floor(g.y/k-e.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";
-d.appendChild(t);mxUtils.br(d);this.init=function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,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=m;d.appendChild(f);mxUtils.write(d,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type",
-"text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(g.height/k);d.appendChild(l);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 p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||"";
-d.appendChild(p);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 v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";d.appendChild(v);mxUtils.write(d,mxResources.get("pan")+" ");var q=document.createElement("input");
-q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";d.appendChild(q);mxUtils.write(d,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);d.appendChild(A);mxUtils.write(d,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,
-mxResources.get("asNew")+" ");mxUtils.br(d);var D=document.createElement("input");D.setAttribute("type","checkbox");D.setAttribute("checked","checked");D.defaultChecked=!0;D.style.marginLeft="16px";d.appendChild(D);mxUtils.write(d,mxResources.get("resize")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";d.appendChild(y);mxUtils.write(d,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
-"8px";d.appendChild(B);mxUtils.write(d,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),x=a.getCurrentFile();mxEvent.addListener(v,"change",b);mxEvent.addListener(q,"change",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(A,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(p,"change",b);b();
-mxEvent.addListener(t,"click",function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.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,c,b){var d=document.createElement("div");d.style.textAlign=
-"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);d.appendChild(c);var g=new Graph(c);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,k);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 f=g.getCellGeometry(a),d;l(function(){d=g.insertVertex(m,null,"Entry",f.x,f.y,80,30,"rounded=1;");n(d);g.view.refresh(d);
-g.insertEdge(m,null,"",a,d,k)},function(){g.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var d=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(f,d.x,d.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var t;try{t=g.insertVertex(m,null,"Start",
-0,0,80,30,"ellipse"),n(t)}finally{g.getModel().endUpdate()}var f;"horizontalTree"==b?(f=new mxCompactTreeLayout(g),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(f=new mxCompactTreeLayout(g,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(f=new mxRadialTreeLayout(g,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==b?f=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-b?f=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==b?(f=new mxFastOrganicLayout(g,!1),f.forceConstant=80):"circle"==b&&(f=new mxCircleLayout(g));if(null!=f){var l=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),f.execute(g.getDefaultParent(),t)}catch(D){throw D;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,f,d){p.apply(this,arguments);l()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(g.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&d.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();
-var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,d=f.getBounds(b);d.x-=f.translate.x;d.y-=f.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(g.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(u)};this.container=d};
+var StorageDialog=function(a,c,b){function d(d,p,e,t,g,k){function A(){mxEvent.addListener(y,"click",null!=k?k:function(){e!=App.MODE_GOOGLE||a.isDriveDomain()?e==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,n.checked);c()})):e==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,n.checked);
+c()})):(a.setMode(e,n.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}++q>b&&(mxUtils.br(f),q=0);var y=document.createElement("a");y.style.overflow="hidden";y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="2px";y.style.padding="8px 10px 12px 10px";y.style.width="88px";y.style.height=StorageDialog.extended?"50px":
+"100px";y.style.whiteSpace="nowrap";y.setAttribute("title",p);mxClient.IS_QUIRKS&&(y.style.cssFloat="left",y.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=d){var B=document.createElement("img");B.setAttribute("src",d);B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width=StorageDialog.extended?"24px":"60px";B.style.height=StorageDialog.extended?"24px":"60px";B.style.paddingBottom=StorageDialog.extended?
+"4px":"6px";y.appendChild(B)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");StorageDialog.extended&&(y.style.paddingTop="4px",y.style.marginBottom="0px",u.display="inline-block",2==b&&(B.style.width="38px",B.style.height="38px",y.style.width="80px",y.style.height="68px"));y.appendChild(u);mxUtils.write(u,p);if(null!=g)for(d=0;d<g.length;d++)mxUtils.br(u),
+mxUtils.write(u,g[d]);if(null!=t&&null==a[t]){B.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=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});v.spin(y);var x=window.setTimeout(function(){null==a[t]&&(v.stop(),y.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,c){null!=a[t]&&c.getProperty("client")==a[t]&&(window.clearTimeout(x),mxUtils.setOpacity(u,
+100),B.style.visibility="",v.stop(),A(),"drive"==t&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else A();f.appendChild(y)}b=null!=b?b:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var e=a.addLanguageMenu(g,!0);null!=e&&(e.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title",
+mxResources.get("help"));e.setAttribute("target","_blank");e.style.position="absolute";e.style.userSelect="none";e.style.textDecoration="none";e.style.cursor="pointer";e.style.fontSize="12px";e.style.bottom="28px";e.style.left="26px";e.style.color="gray";var k=document.createElement("img");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";e.appendChild(k);
+mxUtils.write(e,mxResources.get("help"));g.appendChild(e)}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";m.style.userSelect="none";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"};g.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});e=document.createElement("div");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");e.style.border="1px solid #d3d3d3";e.style.borderWidth="1px 0px 1px 0px";e.style.padding="12px 0px 12px 0px";var n=document.createElement("input");n.setAttribute("type",
+"checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;var q=0,f=document.createElement("div");f.style.paddingTop="2px";e.appendChild(f);var l=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){q=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+
+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&
+d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"),null!=a.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(e);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("a");v.style.color=
+"gray";v.style.fontSize="12px";v.style.cursor="pointer";v.style.userSelect="none";mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(v);k.appendChild(u);k.appendChild(n);mxEvent.addListener(v,"click",function(a){f.innerHTML="";v.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)});var t=document.createElement("span");
+t.style.color="gray";t.style.fontSize="12px";t.style.userSelect="none";mxUtils.write(t," "+mxResources.get("rememberThisSetting"));k.appendChild(t);mxUtils.br(k);u=a.getRecent();if(null!=u&&0<u.length){var z=document.createElement("select");z.style.marginTop="8px";z.style.width="140px";var x=document.createElement("option");x.setAttribute("value","");x.setAttribute("selected","selected");x.style.textAlign="center";mxUtils.write(x,mxResources.get("openRecent")+"...");z.appendChild(x);for(x=0;x<u.length;x++)(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)+")");z.appendChild(c)})(u[x]);k.appendChild(z);mxEvent.addListener(z,"change",function(b){""!=z.value&&a.loadFile(z.value)})}else k.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),u.style.marginBottom="10px",u.style.padding="18px 0px 6px 0px",
+x=document.createElement("a"),x.style.cursor="pointer",x.style.fontSize="12px",x.style.color="gray",x.style.userSelect="none",mxUtils.write(x,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(x,"click",function(){if(null==a.storageFileInputElt){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.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(x),k.appendChild(u),e.style.paddingBottom="4px");e.appendChild(k);mxEvent.addListener(t,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&
+(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(l))},5E3);this.container=g};StorageDialog.extended=!1;
+var SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";var b=a.addLanguageMenu(c,!0);null!=b&&(b.style.bottom="19px");b=null;b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px";
+b.style.left="26px";b.style.color="gray";var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);d.style.marginRight="2px";b.appendChild(d);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";d=document.createElement("img");
+d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="40px";d.style.height="40px";d.style.marginRight="12px";d.style.paddingBottom="4px";var g="";a.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",g=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",g=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",g=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+
+"/github-logo.svg",g=mxResources.get("github")):a.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",g=mxResources.get("gitlab")):a.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",g=mxResources.get("device"));var e=document.createElement("div");e.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?(e.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px"):(b.appendChild(d),mxUtils.write(b,g),c.appendChild(b),e.style.border="1px solid #d3d3d3",e.style.borderWidth="1px 0px 1px 0px",e.style.padding="18px 0px 24px 0px",k.style.marginBottom="8px");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.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()});e.appendChild(k);mxUtils.br(e);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()});e.appendChild(k);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==
+App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(d=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";e.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});e.appendChild(c)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(k.style.marginBottom="24px",d=document.createElement("a"),d.setAttribute("href","javascript:void(0)"),d.style.display="inline-block",d.style.marginTop="6px",mxUtils.write(d,mxResources.get("changeUser")+
+" ("+b.displayName+")"),k.style.marginBottom="16px",e.style.paddingBottom="18px",mxEvent.addListener(d,"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()})}))}),e.appendChild(d)):a.mode==App.MODE_ONEDRIVE&&
+null!=a.oneDrive?d(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?d(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&null!=a.gitLab?d(function(){a.gitLab.logout();a.openLink("https://gitlab.com/users/sign_out")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&d(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&d(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),
+mxUtils.br(e),d=document.createElement("a"),d.setAttribute("href","javascript:void(0)"),d.style.display="inline-block",d.style.marginTop="8px",mxUtils.write(d,mxResources.get("changeStorage")),mxEvent.addListener(d,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),e.appendChild(d));c.appendChild(e);this.container=c},EmbedDialog=function(a,c,b,d,g,e){d=document.createElement("div");var k=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=e?mxUtils.write(d,e):mxUtils.write(d,
+mxResources.get(5E5>c.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);e=document.createElement("div");e.style.position="absolute";e.style.top="30px";e.style.right="30px";e.style.color="gray";mxUtils.write(e,a.formatFileSize(c.length));d.appendChild(e);var m=document.createElement("textarea");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";
+m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");d.appendChild(m);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>c.length?(m.value=c,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};e=document.createElement("div");
+e.style.position="absolute";e.style.bottom="36px";e.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var f=5E5>c.length?m.value:c;if(null!=g)g(f);else if(k)try{var d=a.openLink(f);null!=d&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=d&&null!=d.location.href&&
+d.location.href.substring(0,8)!=f.substring(0,8)&&(d.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var e=window.open(),e=null!=e?e.document:null;null!=e?(e.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),e.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className=
+"geBtn",e.appendChild(n));if(!k||7500<c.length){var q=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});q.className="geBtn";e.appendChild(q)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),q=document.createElement("img");
+q.setAttribute("src",Editor.facebookImage);q.setAttribute("width","18");q.setAttribute("height","18");q.setAttribute("border","0");f.appendChild(q);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";e.appendChild(f)}7168>c.length&&(f=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(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),q=document.createElement("img"),q.setAttribute("src",Editor.tweetImage),q.setAttribute("width","18"),q.setAttribute("height","18"),q.setAttribute("border","0"),q.style.marginBottom="5px",f.appendChild(q),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",
+f.className="geBtn",e.appendChild(f))}q=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.appendChild(q);f=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?q.className="geBtn gePrimaryBtn":(e.appendChild(f),
+f.className="geBtn gePrimaryBtn",q.className="geBtn"):(e.appendChild(n),q.className="geBtn",n.className="geBtn gePrimaryBtn");d.appendChild(e);this.container=d};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,c){function b(){var a=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(B.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(t.checked?"1":"0");b+="&fit="+(y.checked?"1":"0");
+b+="&resize="+(C.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");x.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));q.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),q.value=b):q.value=""}var d=document.createElement("div"),g=a.editor.graph,e=g.getGraphBounds(),k=g.view.scale,m=Math.floor(e.x/k-g.view.translate.x),n=Math.floor(e.y/k-g.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","text");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";
+d.appendChild(q);mxUtils.br(d);this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,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=m;d.appendChild(f);mxUtils.write(d,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type",
+"text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(e.height/k);d.appendChild(l);mxUtils.br(d);e=document.createElement("hr");e.setAttribute("size","1");e.style.marginBottom="16px";e.style.marginTop="16px";d.appendChild(e);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||"";
+d.appendChild(p);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 v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";d.appendChild(v);mxUtils.write(d,mxResources.get("pan")+" ");var t=document.createElement("input");
+t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);d.appendChild(z);mxUtils.write(d,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";d.appendChild(x);mxUtils.write(d,
+mxResources.get("asNew")+" ");mxUtils.br(d);var C=document.createElement("input");C.setAttribute("type","checkbox");C.setAttribute("checked","checked");C.defaultChecked=!0;C.style.marginLeft="16px";d.appendChild(C);mxUtils.write(d,mxResources.get("resize")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";d.appendChild(y);mxUtils.write(d,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
+"8px";d.appendChild(B);mxUtils.write(d,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(v,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(p,"change",b);b();
+mxEvent.addListener(q,"click",function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";e.appendChild(k);d.appendChild(e);this.container=d},CreateGraphDialog=function(a,c,b){var d=document.createElement("div");d.style.textAlign=
+"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);d.appendChild(c);var e=new Graph(c);e.setCellsCloneable(!0);e.setPanning(!0);e.setAllowDanglingEdges(!1);e.connectionHandler.select=!1;e.view.setTranslate(20,20);e.border=20;e.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";e.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))})};e.getAllConnectionConstraints=function(){return null};e.connectionHandler.marker.highlight.keepOnTop=
+!1;e.connectionHandler.createEdgeState=function(a){a=e.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=e.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){e.connectionHandler.reset();e.clearSelection();var f=e.getCellGeometry(a),d;l(function(){d=e.insertVertex(m,null,"Entry",f.x,f.y,80,30,"rounded=1;");n(d);e.view.refresh(d);
+e.insertEdge(m,null,"",a,d,k)},function(){e.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");e.popupMenuHandler.hideMenu();e.stopEditing(!1);var d=mxUtils.convertPoint(e.container,mxEvent.getClientX(c),mxEvent.getClientY(c));e.connectionHandler.start(f,d.x,d.y);e.isMouseDown=!0;e.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});e.addCellOverlay(a,b)});e.getModel().beginUpdate();var q;try{q=e.insertVertex(m,null,"Start",
+0,0,80,30,"ellipse"),n(q)}finally{e.getModel().endUpdate()}var f;"horizontalTree"==b?(f=new mxCompactTreeLayout(e),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(f=new mxCompactTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(f=new mxRadialTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==b?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+b?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_WEST):"organic"==b?(f=new mxFastOrganicLayout(e,!1),f.forceConstant=80):"circle"==b&&(f=new mxCircleLayout(e));if(null!=f){var l=function(a,b){e.getModel().beginUpdate();try{null!=a&&a(),f.execute(e.getDefaultParent(),q)}catch(C){throw C;}finally{var c=new mxMorphing(e);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,f,d){p.apply(this,arguments);l()};e.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};e.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&d.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){e.clearCellOverlays();
+var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,d=f.getBounds(b);d.x-=f.translate.x;d.y-=f.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(u)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";b.appendChild(d);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var d=a.editor.graph.backgroundImage,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,k=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 c=b.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!=
-f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"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,c,f,d,l){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)}};b.appendChild(e);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,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:"";b.appendChild(m);mxUtils.write(b,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:"";b.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";b.appendChild(d);mxUtils.br(b);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 t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-t.className="geBtn";a.editor.cancelFirst&&d.appendChild(t);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=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)});
-f.className="geBtn";d.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=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)}))}),f.className="geBtn",d.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=e.value?new mxImage(mxUtils.trim(e.value),m.value,n.value):null)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(t);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
-c||"plantUmlTxt"==c){var f="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",d=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},p=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=
-l(c4&63)},e=new XMLHttpRequest;e.open("GET",f+function(a){r="";for(x=0;x<a.length;x+=3)r=x+2==a.length?r+p(a.charCodeAt(x),a.charCodeAt(x+1),0):x+1==a.length?r+p(a.charCodeAt(x),0,0):r+p(a.charCodeAt(x),a.charCodeAt(x+1),a.charCodeAt(x+2));return r}(Graph.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(e.responseType="blob");e.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),d.setSelectionCell(a.insertAsPreText(this.response,
-g.x,g.y)),d.scrollCellToVisible(d.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);l.onloadend=function(c){var f=new Image;f.onload=function(){a.spinner.stop();var c=f.width,p=f.height;if(0==c&&0==p){var e=l.result,q=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(q+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(c=parseFloat(e[0].getAttribute("width")),p=parseFloat(e[0].getAttribute("height")))}d.getModel().beginUpdate();try{cell=d.insertVertex(null,
-null,b,g.x,g.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+";")}finally{d.getModel().endUpdate()}d.setSelectionCell(cell);d.scrollCellToVisible(d.getSelectionCell())};f.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(f)};e.onerror=function(b){a.handleError(b)};e.send()}}else if("table"==c){for(var y=null,u=[],k=0,x=0;x<f.length;x++)if(e=mxUtils.trim(f[x]),"create table"==e.substring(0,12).toLowerCase())e=
-mxUtils.trim(e.substring(12)),"("==e.charAt(e.length-1)&&(e=e.substring(0,e.lastIndexOf(" "))),y=new mxCell(e,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),y.vertex=!0,u.push(y),e=a.editor.graph.getPreferredSizeForCell(n),null!=e&&(y.geometry.width=e.width+10);else if(null!=y&&")"==e.charAt(0))k+=y.geometry.width+
-40,y=null;else if("("!=e&&null!=y&&(e=e.substring(0,","==e.charAt(e.length-1)?e.length-1:e.length),"primary key"!=e.substring(0,11).toLowerCase())){var m=e.toLowerCase().indexOf("primary key"),e=e.replace(/primary key/i,""),n=new mxCell(e,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;");n.vertex=
-!0;e=sb.cloneCell(n,0<m?"PK":"");e.connectable=!1;e.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;";e.geometry.width=30;e.geometry.height=26;n.insert(e);e=a.editor.graph.getPreferredSizeForCell(n);null!=e&&y.geometry.width<e.width+10&&(y.geometry.width=Math.min(220,e.width+10));y.insert(n);y.geometry.height+=26}0<u.length&&(d=a.editor.graph,f=d.view,
-e=d.getGraphBounds(),d.setSelectionCells(d.importCells(u,Math.ceil(Math.max(0,e.x/f.scale-f.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(e.y+e.height)/f.scale-f.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==c){if(0<f.length){d=a.editor.graph;n=null;u=[];for(x=y=0;x<f.length;x++)";"!=f[x].charAt(0)&&(0==f[x].length?n=null:null==n?(n=new mxCell(f[x],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;"),
-n.vertex=!0,u.push(n),e=d.getPreferredSizeForCell(n),null!=e&&n.geometry.width<e.width+10&&(n.geometry.width=e.width+10),y+=n.geometry.width+40):"--"==f[x]?(e=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;"),e.vertex=!0,n.geometry.height+=e.geometry.height,n.insert(e)):0<f[x].length&&(k=new mxCell(f[x],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-k.vertex=!0,e=d.getPreferredSizeForCell(k),null!=e&&k.geometry.width<e.width&&(k.geometry.width=e.width),n.geometry.width=Math.max(n.geometry.width,k.geometry.width),n.geometry.height+=k.geometry.height,n.insert(k)));if(0<u.length){d.getModel().beginUpdate();try{u=d.importCells(u,g.x,g.y);e=[];for(x=0;x<u.length;x++)e.push(u[x]),e=e.concat(u[x].children);d.fireEvent(new mxEventObject("cellsInserted","cells",e))}finally{d.getModel().endUpdate()}d.setSelectionCells(u);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var n=
-function(a){var b=t[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,t[a]=b,u.push(b));return b},t={},u=[],x=0;x<f.length;x++)if(";"!=f[x].charAt(0)){var G=f[x].split("->");if(2<=G.length){var m=n(G[0]),J=n(G[G.length-1]),G=new mxCell(2<G.length?G[1]:"",new mxGeometry);G.edge=!0;m.insertEdge(G,!0);J.insertEdge(G,!1);u.push(G)}}if(0<u.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate();
-try{u=d.importCells(u);for(x=0;x<u.length;x++)d.getModel().isVertex(u[x])&&(e=d.getPreferredSizeForCell(u[x]),u[x].geometry.width=Math.max(u[x].geometry.width,e.width),u[x].geometry.height=Math.max(u[x].geometry.height,e.height));y=new mxFastOrganicLayout(d);y.disableEdgeStyle=!1;y.forceConstant=120;y.execute(d.getDefaultParent());k=new mxParallelEdgeLayout(d);k.spacing=20;k.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();e=[];a.editor.graph.getModel().beginUpdate();
-try{e=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",e))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(e);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();f.parentNode.removeChild(f)}}}function e(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":
+var BackgroundImageDialog=function(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";b.appendChild(d);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var d=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
+null!=d?d.src:"";var e=!1,k=function(){e||""==g.value||a.isOffline()?(m.value="",n.value=""):a.loadImage(mxUtils.trim(g.value),function(a){m.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";m.value="";n.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=b.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!=
+f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"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,c,f,d,l){g.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)&&(g.value=decodeURIComponent(c),k())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(g);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,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:"";b.appendChild(m);mxUtils.write(b,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:"";b.appendChild(n);d=mxUtils.button(mxResources.get("reset"),function(){g.value="";m.value="";n.value="";e=!1});mxEvent.addListener(d,"mousedown",
+function(){e=!0});mxEvent.addListener(d,"touchstart",function(){e=!0});d.className="geBtn";d.width="100";b.appendChild(d);mxUtils.br(b);mxEvent.addListener(g,"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&&(g.value=a.url,k()));g.focus()};d=document.createElement("div");d.style.marginTop="40px";d.style.textAlign="right";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+q.className="geBtn";a.editor.cancelFirst&&d.appendChild(q);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=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)});
+f.className="geBtn";d.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=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.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
+f.className="geBtn",d.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),m.value,n.value):null)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(q);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){var f="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+
+"/svg/",d=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},p=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=l(c4&63)},g=new XMLHttpRequest;g.open("GET",f+function(a){r="";for(A=0;A<a.length;A+=3)r=A+2==a.length?r+
+p(a.charCodeAt(A),a.charCodeAt(A+1),0):A+1==a.length?r+p(a.charCodeAt(A),0,0):r+p(a.charCodeAt(A),a.charCodeAt(A+1),a.charCodeAt(A+2));return r}(Graph.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(g.responseType="blob");g.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),d.setSelectionCell(a.insertAsPreText(this.response,e.x,e.y)),d.scrollCellToVisible(d.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);
+l.onloadend=function(c){var f=new Image;f.onload=function(){a.spinner.stop();var c=f.width,p=f.height;if(0==c&&0==p){var g=l.result,k=g.indexOf(","),g=decodeURIComponent(escape(atob(g.substring(k+1)))),g=mxUtils.parseXml(g).getElementsByTagName("svg");0<g.length&&(c=parseFloat(g[0].getAttribute("width")),p=parseFloat(g[0].getAttribute("height")))}d.getModel().beginUpdate();try{cell=d.insertVertex(null,null,b,e.x,e.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+
+";")}finally{d.getModel().endUpdate()}d.setSelectionCell(cell);d.scrollCellToVisible(d.getSelectionCell())};f.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(f)};g.onerror=function(b){a.handleError(b)};g.send()}}else if("table"==c){for(var y=null,k=[],u=0,A=0;A<f.length;A++)if(g=mxUtils.trim(f[A]),"create table"==g.substring(0,12).toLowerCase())g=mxUtils.trim(g.substring(12)),"("==g.charAt(g.length-1)&&(g=g.substring(0,g.lastIndexOf(" "))),y=new mxCell(g,
+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;"),y.vertex=!0,k.push(y),g=a.editor.graph.getPreferredSizeForCell(n),null!=g&&(y.geometry.width=g.width+10);else if(null!=y&&")"==g.charAt(0))u+=y.geometry.width+40,y=null;else if("("!=g&&null!=y&&(g=g.substring(0,","==g.charAt(g.length-1)?g.length-1:g.length),"primary key"!=
+g.substring(0,11).toLowerCase())){var m=g.toLowerCase().indexOf("primary key"),g=g.replace(/primary key/i,""),n=new mxCell(g,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;");n.vertex=!0;g=sb.cloneCell(n,0<m?"PK":"");g.connectable=!1;g.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;";
+g.geometry.width=30;g.geometry.height=26;n.insert(g);g=a.editor.graph.getPreferredSizeForCell(n);null!=g&&y.geometry.width<g.width+10&&(y.geometry.width=Math.min(220,g.width+10));y.insert(n);y.geometry.height+=26}0<k.length&&(d=a.editor.graph,f=d.view,g=d.getGraphBounds(),d.setSelectionCells(d.importCells(k,Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==
+c){if(0<f.length){d=a.editor.graph;n=null;k=[];for(A=y=0;A<f.length;A++)";"!=f[A].charAt(0)&&(0==f[A].length?n=null:null==n?(n=new mxCell(f[A],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;"),n.vertex=!0,k.push(n),g=d.getPreferredSizeForCell(n),null!=g&&n.geometry.width<g.width+10&&(n.geometry.width=g.width+10),y+=n.geometry.width+40):"--"==f[A]?
+(g=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;"),g.vertex=!0,n.geometry.height+=g.geometry.height,n.insert(g)):0<f[A].length&&(u=new mxCell(f[A],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,g=d.getPreferredSizeForCell(u),null!=g&&u.geometry.width<g.width&&(u.geometry.width=g.width),n.geometry.width=Math.max(n.geometry.width,u.geometry.width),n.geometry.height+=u.geometry.height,n.insert(u)));if(0<k.length){d.getModel().beginUpdate();try{k=d.importCells(k,e.x,e.y);g=[];for(A=0;A<k.length;A++)g.push(k[A]),g=g.concat(k[A].children);d.fireEvent(new mxEventObject("cellsInserted","cells",g))}finally{d.getModel().endUpdate()}d.setSelectionCells(k);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var n=
+function(a){var b=q[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,q[a]=b,k.push(b));return b},q={},k=[],A=0;A<f.length;A++)if(";"!=f[A].charAt(0)){var I=f[A].split("->");if(2<=I.length){var m=n(I[0]),J=n(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;m.insertEdge(I,!0);J.insertEdge(I,!1);k.push(I)}}if(0<k.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate();
+try{k=d.importCells(k);for(A=0;A<k.length;A++)d.getModel().isVertex(k[A])&&(g=d.getPreferredSizeForCell(k[A]),k[A].geometry.width=Math.max(k[A].geometry.width,g.width),k[A].geometry.height=Math.max(k[A].geometry.height,g.height));y=new mxFastOrganicLayout(d);y.disableEdgeStyle=!1;y.forceConstant=120;y.execute(d.getDefaultParent());u=new mxParallelEdgeLayout(d);u.spacing=20;u.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();g=[];a.editor.graph.getModel().beginUpdate();
+try{g=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",g))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(g);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":
"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();c=document.createElement("div");c.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
+"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 e=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.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 m=document.createElement("select");"formatSql"==b&&(m.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=b&&m.appendChild(n);null!=b&&"fromText"!=b||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==b&&(m.appendChild(n),n.setAttribute("selected","selected"));
-n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var t=document.createElement("option");t.setAttribute("value","plantUmlPng");mxUtils.write(t,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"==b&&(m.appendChild(n),m.appendChild(t),m.appendChild(f));var l=e();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
-a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(m);mxEvent.addListener(m,"change",function(){var a=e();if(0==k.value.length||k.value==l)l=a,k.value=l});b=mxUtils.button(mxResources.get("close"),function(){k.value==l?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();d(k.value,m.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,e,g,k,m,n,t,f,l,p,u,v,q,A){function z(){var a=!0;if(null!=T)for(;G<T.length&&(a||0!=mxUtils.mod(G,30));)a=T[G++],B(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function D(){if(U)b||a.hideDialog(),u(U,ca,E.value);else if(d)b||a.hideDialog(),d(fa,E.value);
-else{var c=E.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,fa,null!=Z&&0<Z.length?Z:null,null,function(){a.hideDialog()},null,b,null,null!=ha&&0<ha.length?ha:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function y(a,b,c,f,d,l){null!=da&&(da.style.backgroundColor="transparent",da.style.border="1px solid transparent");C.removeAttribute("disabled");fa=b;Z=c;ha=l;da=a;U=f;ca=d;da.style.backgroundColor=m;da.style.border=n}function B(b,c,f,d,
-l,p,g,e,q,x,u){var k=document.createElement("div");k.className="geTemplate";k.style.height=X+"px";k.style.width=ea+"px";null!=d&&0<d.length&&k.setAttribute("title",d);if(null!=p)k.style.backgroundImage="url("+p+")",k.style.backgroundSize="contain",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",mxEvent.addListener(k,"click",function(a){y(k,null,null,b,g,u)}),mxEvent.addListener(k,"dblclick",function(a){D()});else if(!x&&null!=b&&0<b.length){f=q||TEMPLATE_PATH+"/"+b.substring(0,
-b.length-4)+".png";k.style.backgroundImage="url("+f+")";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";var B=!1;mxEvent.addListener(k,"click",function(f){C.setAttribute("disabled","disabled");k.style.backgroundColor="transparent";k.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;J.spin(Q);mxUtils.get(f,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&
-299>=a.getStatus()&&(y(k,a.getText(),c,null,null,u),B&&D())}))});mxEvent.addListener(k,"dblclick",function(a){B=!0})}else k.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(f,null,f)+"</td></tr></table>",l&&y(k),null!=e?mxEvent.addListener(k,"click",e):(mxEvent.addListener(k,"click",function(a){y(k,null,null,b,g)}),mxEvent.addListener(k,"dblclick",function(a){D()}));Q.appendChild(k)}function F(){S&&
-(S=!1,mxEvent.addListener(Q,"scroll",function(a){Q.scrollTop+Q.clientHeight>=Q.scrollHeight&&(z(),mxEvent.consume(a))}));var a=null;if(0<ba){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));aa.appendChild(b);for(var c in N){var f=document.createElement("div"),b=c,d=N[c];18<b.length&&(b=b.substring(0,18)+"&hellip;");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";
-f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=t&&(f.style.padding=t);aa.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",G=0,T=N[b],K=null,z())})})(c,f)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");aa.appendChild(b)}for(c in P)f=document.createElement("div"),
-b=mxResources.get(c),d=P[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=t&&(f.style.padding=t),aa.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,T=d),function(b,c){mxEvent.addListener(f,"click",
-function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",G=0,T=P[b],K=null,z())})}(c,f);z()}b=null!=b?b:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height="46px";b&&x.appendChild(I);var H=document.createElement("img");H.setAttribute("border",
-"0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
-!c&&b&&I.appendChild(H);b&&mxUtils.write(I,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?H=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?H=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?H=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?H=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(H=a.trello.extension);var E=
-document.createElement("input");E.setAttribute("value",a.defaultFilename+H);E.style.marginLeft="10px";E.style.width=c?"220px":"430px";this.init=function(){b&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?E.select():document.execCommand("selectAll",!1,null))};b&&(I.appendChild(E),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a,E,a.editor.fileExtensions),H.style.marginTop="12px",I.appendChild(H)));var I=!1,G=0,J=new Spinner({lines:12,length:10,
-width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),C=mxUtils.button(q||mxResources.get("create"),function(){C.setAttribute("disabled","disabled");D();C.removeAttribute("disabled")});C.className="geBtn gePrimaryBtn";if(l||p){var L=[],K=null,R=null,V=null,Y=function(a){C.setAttribute("disabled","disabled");for(var b=0;b<L.length;b++)L[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},I=!0;q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height=
-"30px";x.appendChild(q);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){aa.style.display="";Q.style.left="160px";Y(0);Q.scrollTop=0;Q.innerHTML="";G=0;K!=T&&(T=K,P=R,ba=V,aa.innerHTML="",F(),K=null)});L.push(H);q.appendChild(H);var M=function(a){aa.style.display="none";Q.style.left="30px";Y(a?-1:1);null==K&&(K=T);Q.scrollTop=0;Q.innerHTML="";J.spin(Q);var b=function(a,b,c){G=0;J.stop();T=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)Q.innerHTML=b;else if(0==a.length&&
-0==f)Q.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Q.innerHTML="",0<f){aa.style.display="";Q.style.left="160px";aa.innerHTML="";ba=0;P={"draw.io":a};for(d in c)P[d]=c[d];F()}else z()};a?p(W.value,b):l(b)};l&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),q.appendChild(H),L.push(H));if(p){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");q.appendChild(H);
-var W=document.createElement("input");W.style.marginRight="10px";W.style.marginLeft="10px";W.style.width="220px";mxEvent.addListener(W,"keypress",function(a){13==a.keyCode&&M(!0)});q.appendChild(W);H=mxUtils.button(mxResources.get("search"),function(){M(!0)});H.className="geBtn";q.appendChild(H)}Y(0)}var Z=null,ha=null,fa=null,da=null,U=null,ca=null,Q=document.createElement("div");Q.style.border="1px solid #d3d3d3";Q.style.position="absolute";Q.style.left="160px";Q.style.right="34px";I=(b?72:40)+
-(I?30:0);Q.style.top=I+"px";Q.style.bottom="68px";Q.style.margin="6px 0 0 -1px";Q.style.padding="6px";Q.style.overflow="auto";var aa=document.createElement("div");aa.style.cssText="position:absolute;left:30px;width:128px;top:"+I+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var X=140,ea=140,P={},N={},ba=0,S=!0;P.basic=[{title:"blankDiagram",select:!0}];var T=P.basic;if(!c){var ja=function(){mxUtils.get(O,function(a){if(!ka){ka=!0;for(a=a.getXml().documentElement.firstChild;null!=
-a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=P[c];null==b&&(b=[],P[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:a.getAttribute("clibs")})}}a=a.nextSibling}J.stop();F()}})};x.appendChild(aa);x.appendChild(Q);var ka=!1,O=f;/^https?:\/\//.test(O)&&!a.editor.isCorsEnabledForUrl(O)&&
-(O=PROXY_URL+"?url="+encodeURIComponent(O));J.spin(Q);null!=A?A(function(a,b){N=a;V=ba=b;ja()},ja):ja();R=P}mxEvent.addListener(E,"keypress",function(b){a.dialog.container.firstChild==x&&13==b.keyCode&&D()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!b||null!=d||e||(A=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-A.className="geBtn",f.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});A.className="geBtn";!a.editor.cancelFirst||e&&null==g||f.appendChild(A);c||"1"==urlParams.embed||e||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(E.value)+"&create="+encodeURIComponent(b)),
-null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",f.appendChild(c));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){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.value=""});b.style.display="none";document.body.appendChild(b);
-a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),v.className="geBtn",f.appendChild(v));f.appendChild(C);a.editor.cancelFirst||null!=d||e&&null==g||f.appendChild(A);x.appendChild(f);this.container=x},CreateDialog=function(a,c,b,d,e,g,k,m,n,t,f,l,p,u,v,q){function A(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(k){var f=y.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:x.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=
-a.gitHub.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=l&&(f=f.substring(0,l));y.value=f+p}}z(d)})}var e=document.createElement("a");e.style.overflow="hidden";var q=document.createElement("img");q.src=b;q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(q);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var u=document.createElement("div");e.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){q.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,
-color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(e);var m=window.setTimeout(function(){null==a[p]&&(v.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(m),mxUtils.setOpacity(u,100),q.style.visibility="",v.stop(),g())}))}else g();B.appendChild(e);++F==l&&(mxUtils.br(B),F=0)}function z(c){var f=y.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}k=null!=k?k:!0;m=null!=m?m:!0;l=null!=
-l?l:4;g=document.createElement("div");g.style.whiteSpace="nowrap";null==d&&a.addLanguageMenu(g);var D=document.createElement("h2");mxUtils.write(D,e||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom="24px";g.appendChild(D);mxUtils.write(g,mxResources.get("filename")+":");var y=document.createElement("input");y.setAttribute("value",c);y.style.width="280px";y.style.marginLeft="10px";y.style.marginBottom="20px";y.style.maxWidth="70%";this.init=function(){y.focus();mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?y.select():document.execCommand("selectAll",!1,null)};g.appendChild(y);null!=q&&g.appendChild(FilenameDialog.createTypeHint(a,y,q));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(y.style.width="160px",e=null,"image/svg+xml"==u&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(p),p=e.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+
-u+" "+v),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+p)),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%)"),g.appendChild(e),n&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){z("_blank")})));mxUtils.br(g);var B=document.createElement("div");
-B.style.textAlign="center";var F=0;B.style.marginTop="6px";g.appendChild(B);var x=document.createElement("select");x.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),x.appendChild(p),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),
-p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),x.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),x.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),
-A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),x.appendChild(p),A(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.TrelloClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),x.appendChild(p),
-A(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),x.appendChild(p),a.mode!=App.MODE_DEVICE&&m||p.setAttribute("selected","selected"),f&&A(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")),x.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="center";null!=t&&(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(t)}),f.className="geBtn",m.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=
-d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),p.className="geBtn",m.appendChild(p));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),n.className="geBtn",m.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){z("download")}),
-n.className="geBtn",m.appendChild(n));a.editor.cancelFirst||m.appendChild(f);mxEvent.addListener(y,"keypress",function(b){13==b.keyCode?z(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});g.appendChild(m);this.container=g};CreateDialog.showDownloadButton=!0;
-var PopupDialog=function(a,c,b,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 m=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=b&&b();a.openLink(c,
-null,!0)});m.className="geBtn gePrimaryBtn";m.style.width=k.style.width;g.appendChild(m);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,c,b,d,e,g){g=null!=g?g:!0;var k=a.editor.graph,m=document.createElement("div");mxUtils.write(m,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor=
+n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var q=document.createElement("option");q.setAttribute("value","plantUmlPng");mxUtils.write(q,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"==b&&(m.appendChild(n),m.appendChild(q),m.appendChild(f));var l=g();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
+a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(m);mxEvent.addListener(m,"change",function(){var a=g();if(0==k.value.length||k.value==l)l=a,k.value=l});b=mxUtils.button(mxResources.get("close"),function(){k.value==l?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("insert"),
+function(){a.hideDialog();d(k.value,m.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,g,e,k,m,n,q,f,l,p,u,v,t,z){function x(){var a=!0;if(null!=T)for(;I<T.length&&(a||0!=mxUtils.mod(I,30));)a=T[I++],B(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function C(){if(U)b||a.hideDialog(),u(U,ca,F.value);else if(d)b||a.hideDialog(),d(fa,F.value);
+else{var c=F.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,fa,null!=Z&&0<Z.length?Z:null,null,function(){a.hideDialog()},null,b,null,null!=ha&&0<ha.length?ha:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function y(a,b,c,f,d,l){null!=da&&(da.style.backgroundColor="transparent",da.style.border="1px solid transparent");D.removeAttribute("disabled");fa=b;Z=c;ha=l;da=a;U=f;ca=d;da.style.backgroundColor=m;da.style.border=n}function B(b,c,f,d,
+l,p,e,g,k,t,A){var u=document.createElement("div");u.className="geTemplate";u.style.height=X+"px";u.style.width=ea+"px";null!=d&&0<d.length&&u.setAttribute("title",d);if(null!=p)u.style.backgroundImage="url("+p+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){y(u,null,null,b,e,A)}),mxEvent.addListener(u,"dblclick",function(a){C()});else if(!t&&null!=b&&0<b.length){f=k||TEMPLATE_PATH+"/"+b.substring(0,
+b.length-4)+".png";u.style.backgroundImage="url("+f+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";var B=!1;mxEvent.addListener(u,"click",function(f){D.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;J.spin(Q);mxUtils.get(f,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&
+299>=a.getStatus()&&(y(u,a.getText(),c,null,null,A),B&&C())}))});mxEvent.addListener(u,"dblclick",function(a){B=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(f,null,f)+"</td></tr></table>",l&&y(u),null!=g?mxEvent.addListener(u,"click",g):(mxEvent.addListener(u,"click",function(a){y(u,null,null,b,e)}),mxEvent.addListener(u,"dblclick",function(a){C()}));Q.appendChild(u)}function E(){S&&
+(S=!1,mxEvent.addListener(Q,"scroll",function(a){Q.scrollTop+Q.clientHeight>=Q.scrollHeight&&(x(),mxEvent.consume(a))}));var a=null;if(0<ba){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));aa.appendChild(b);for(var c in N){var f=document.createElement("div"),b=c,d=N[c];18<b.length&&(b=b.substring(0,18)+"&hellip;");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";
+f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=q&&(f.style.padding=q);aa.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",I=0,T=N[b],K=null,x())})})(c,f)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");aa.appendChild(b)}for(c in P)f=document.createElement("div"),
+b=mxResources.get(c),d=P[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=q&&(f.style.padding=q),aa.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,T=d),function(b,c){mxEvent.addListener(f,"click",
+function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,Q.scrollTop=0,Q.innerHTML="",I=0,T=P[b],K=null,x())})}(c,f);x()}b=null!=b?b:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var A=document.createElement("div");A.style.height="100%";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.height="46px";b&&A.appendChild(G);var H=document.createElement("img");H.setAttribute("border",
+"0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?
+IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&b&&G.appendChild(H);b&&mxUtils.write(G,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?H=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?H=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?H=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?H=a.gitHub.extension:
+a.mode==App.MODE_GITLAB&&null!=a.gitLab?H=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(H=a.trello.extension);var F=document.createElement("input");F.setAttribute("value",a.defaultFilename+H);F.style.marginLeft="10px";F.style.width=c?"220px":"430px";this.init=function(){b&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};b&&(G.appendChild(F),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a,
+F,a.editor.fileExtensions),H.style.marginTop="12px",G.appendChild(H)));var G=!1,I=0,J=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),D=mxUtils.button(t||mxResources.get("create"),function(){D.setAttribute("disabled","disabled");C();D.removeAttribute("disabled")});D.className="geBtn gePrimaryBtn";if(l||p){var L=[],K=null,R=null,V=null,Y=function(a){D.setAttribute("disabled","disabled");for(var b=0;b<L.length;b++)L[b].className=
+b==a?"geBtn gePrimaryBtn":"geBtn"},G=!0;t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.height="30px";A.appendChild(t);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){aa.style.display="";Q.style.left="160px";Y(0);Q.scrollTop=0;Q.innerHTML="";I=0;K!=T&&(T=K,P=R,ba=V,aa.innerHTML="",E(),K=null)});L.push(H);t.appendChild(H);var M=function(a){aa.style.display="none";Q.style.left="30px";Y(a?-1:1);null==K&&(K=T);Q.scrollTop=0;Q.innerHTML="";J.spin(Q);var b=
+function(a,b,c){I=0;J.stop();T=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)Q.innerHTML=b;else if(0==a.length&&0==f)Q.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Q.innerHTML="",0<f){aa.style.display="";Q.style.left="160px";aa.innerHTML="";ba=0;P={"draw.io":a};for(d in c)P[d]=c[d];E()}else x()};a?p(W.value,b):l(b)};l&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),t.appendChild(H),L.push(H));if(p){H=document.createElement("span");
+H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");t.appendChild(H);var W=document.createElement("input");W.style.marginRight="10px";W.style.marginLeft="10px";W.style.width="220px";mxEvent.addListener(W,"keypress",function(a){13==a.keyCode&&M(!0)});t.appendChild(W);H=mxUtils.button(mxResources.get("search"),function(){M(!0)});H.className="geBtn";t.appendChild(H)}Y(0)}var Z=null,ha=null,fa=null,da=null,U=null,ca=null,Q=document.createElement("div");Q.style.border=
+"1px solid #d3d3d3";Q.style.position="absolute";Q.style.left="160px";Q.style.right="34px";G=(b?72:40)+(G?30:0);Q.style.top=G+"px";Q.style.bottom="68px";Q.style.margin="6px 0 0 -1px";Q.style.padding="6px";Q.style.overflow="auto";var aa=document.createElement("div");aa.style.cssText="position:absolute;left:30px;width:128px;top:"+G+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var X=140,ea=140,P={},N={},ba=0,S=!0;P.basic=[{title:"blankDiagram",select:!0}];var T=P.basic;if(!c){var ja=
+function(){mxUtils.get(O,function(a){if(!ka){ka=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var c=a.getAttribute("name"),f=a.getElementsByTagName("add"),d=[],l=0;l<f.length;l++)d.push(encodeURIComponent(mxUtils.getTextContent(f[l])));null!=c&&0<d.length&&(b[c]=d.join(";"))}else c=a.getAttribute("url"),null!=c&&(f=a.getAttribute("section"),null==f&&(f=c.indexOf("/"),f=c.substring(0,f)),c=P[f],null==c&&(c=[],P[f]=
+c),f=a.getAttribute("clibs"),null!=b[f]&&(f=b[f]),c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:f}));a=a.nextSibling}J.stop();E()}})};A.appendChild(aa);A.appendChild(Q);var ka=!1,O=f;/^https?:\/\//.test(O)&&!a.editor.isCorsEnabledForUrl(O)&&(O=PROXY_URL+"?url="+encodeURIComponent(O));J.spin(Q);null!=z?z(function(a,b){N=a;V=ba=b;ja()},ja):ja();R=P}mxEvent.addListener(F,"keypress",function(b){a.dialog.container.firstChild==
+A&&13==b.keyCode&&C()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!b||null!=d||g||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",f.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=e&&e();a.hideDialog(!0)});z.className=
+"geBtn";!a.editor.cancelFirst||g&&null==e||f.appendChild(z);c||"1"==urlParams.embed||g||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(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()}),
+c.className="geBtn",f.appendChild(c));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){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.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),v.className="geBtn",f.appendChild(v));f.appendChild(D);a.editor.cancelFirst||
+null!=d||g&&null==e||f.appendChild(z);A.appendChild(f);this.container=A},CreateDialog=function(a,c,b,d,g,e,k,m,n,q,f,l,p,u,v,t){function z(b,f,d,p){function e(){mxEvent.addListener(g,"click",function(){var b=d;if(k){var f=y.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:A.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
+b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=l&&(f=f.substring(0,l));y.value=f+p}}x(d)})}var g=document.createElement("a");g.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";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 u=document.createElement("div");g.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(g);var m=window.setTimeout(function(){null==
+a[p]&&(v.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(m),mxUtils.setOpacity(u,100),t.style.visibility="",v.stop(),e())}))}else e();B.appendChild(g);++E==l&&(mxUtils.br(B),E=0)}function x(c){var f=y.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}k=null!=k?k:!0;m=null!=m?m:!0;l=null!=l?l:4;e=document.createElement("div");e.style.whiteSpace="nowrap";null==d&&a.addLanguageMenu(e);var C=document.createElement("h2");
+mxUtils.write(C,g||mxResources.get("create"));C.style.marginTop="0px";C.style.marginBottom="24px";e.appendChild(C);mxUtils.write(e,mxResources.get("filename")+":");var y=document.createElement("input");y.setAttribute("value",c);y.style.width="280px";y.style.marginLeft="10px";y.style.marginBottom="20px";y.style.maxWidth="70%";this.init=function(){y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?y.select():document.execCommand("selectAll",!1,null)};e.appendChild(y);
+null!=t&&e.appendChild(FilenameDialog.createTypeHint(a,y,t));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(y.style.width="160px",g=null,"image/svg+xml"==u&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+v),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src",
+"data:"+u+(v?";base64,":";utf8,")+p)),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%)"),e.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){x("_blank")})));mxUtils.br(e);var B=document.createElement("div");B.style.textAlign="center";var E=0;B.style.marginTop="6px";e.appendChild(B);var A=document.createElement("select");
+A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),A.appendChild(p),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),
+A.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),A.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),
+null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),A.appendChild(p),z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),A.appendChild(p),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&
+(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),A.appendChild(p),z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),A.appendChild(p),a.mode!=App.MODE_DEVICE&&m||p.setAttribute("selected","selected"),
+f&&z(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")),A.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="center";null!=q&&
+(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(q)}),f.className="geBtn",m.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),p.className="geBtn",m.appendChild(p));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),
+function(){x("_blank")}),n.className="geBtn",m.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){x("download")}),n.className="geBtn",m.appendChild(n));a.editor.cancelFirst||m.appendChild(f);mxEvent.addListener(y,"keypress",function(b){13==b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});e.appendChild(m);this.container=e};CreateDialog.showDownloadButton=!0;
+var PopupDialog=function(a,c,b,d,g){g=null!=g?g:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=d&&d()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";e.appendChild(k);mxUtils.br(e);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=b&&b();a.openLink(c,
+null,!0)});m.className="geBtn gePrimaryBtn";m.style.width=k.style.width;e.appendChild(m);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,b,d,g,e){e=null!=e?e:!0;var k=a.editor.graph,m=document.createElement("div");mxUtils.write(m,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor=
"default";mxClient.IS_VML||(c.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("value",b);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";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()});c.appendChild(n);c.appendChild(b);
-m.appendChild(c);var t=function(b,c,f,l){var p="data:"==b.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(p){a.spinner.stop();a.hideDialog();var e=!1===l?1:null!=c&&null!=f?Math.max(c/p.width,f/p.height):Math.min(1,Math.min(520/p.width,520/p.height));g&&(b=a.convertDataUri(b));d(b,Math.round(Number(p.width)*e),Math.round(Number(p.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))},f=function(b,c){if(null!=b){var f=e?null:k.getModel().getGeometry(k.getSelectionCell());null!=f?t(b,f.width,f.height,c):t(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",
+m.appendChild(c);var q=function(b,c,f,l){var p="data:"==b.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(p){a.spinner.stop();a.hideDialog();var g=!1===l?1:null!=c&&null!=f?Math.max(c/p.width,f/p.height):Math.min(1,Math.min(520/p.width,520/p.height));e&&(b=a.convertDataUri(b));d(b,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},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))},f=function(b,c){if(null!=b){var f=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=f?q(b,f.width,f.height,c):q(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(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,d,l,p,e,g){f(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)&&f(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),
function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(n.value=a.url));n.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");mxEvent.addListener(l,"change",function(b){null!=
l.files&&(a.importFiles(l.files,0,0,a.maxImageSize,function(a,b,c,d,l,p){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),l.type="",l.type="file",l.value="")});l.style.display="none";document.body.appendChild(l);a.imgDlgFileInputElt=l}var p=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});p.className="geBtn";b.appendChild(p)}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,
11)&&"data:image/svg"!=n.value.substring(0,14)&&(p=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()}),p.className="geBtn",b.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=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)}),p.className="geBtn",b.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=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.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),p.className="geBtn",b.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=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.PHOTO_UPLOAD);
a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",b.appendChild(p)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&f(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition=
-"center 65%",m.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),m.appendChild(c));m.appendChild(b);this.container=m},LinkDialog=function(a,c,b,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);A.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,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 t=document.createElement("div");t.setAttribute("title",mxResources.get("reset"));t.style.position="relative";t.style.left="-16px";t.style.width="12px";t.style.height="14px";t.style.cursor="pointer";
-t.style.display=mxClient.IS_VML?"inline":"inline-block";t.style.top=(mxClient.IS_VML?0:3)+"px";t.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(t,"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 l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
-l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="420px";if(e&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(n.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.style.width="420px";m.appendChild(f);m.appendChild(n);m.appendChild(t);mxUtils.br(m);m.appendChild(l);e=!1;for(t=0;t<a.pages.length;t++){var u=
-document.createElement("option");mxUtils.write(u,a.pages[t].getName()||mxResources.get("pageWithNumber",[t+1]));u.setAttribute("value","data:page/id,"+a.pages[t].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),e=!0);p.appendChild(u)}if(!e&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,
-"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)})}m.appendChild(p)}else n.setAttribute("value",c),m.appendChild(n),m.appendChild(t);k.appendChild(m);var q=mxUtils.button(b,function(){a.hideDialog();d(l.checked?"pageNotFound"!==p.value?p.value:c:n.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){l.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+"center 65%",m.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),m.appendChild(c));m.appendChild(b);this.container=m},LinkDialog=function(a,c,b,d,g){function e(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);z.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,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 q=document.createElement("div");q.setAttribute("title",mxResources.get("reset"));q.style.position="relative";q.style.left="-16px";q.style.width="12px";q.style.height="14px";q.style.cursor="pointer";
+q.style.display=mxClient.IS_VML?"inline":"inline-block";q.style.top=(mxClient.IS_VML?0:3)+"px";q.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(q,"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 l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
+l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="420px";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(n.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.style.width="420px";m.appendChild(f);m.appendChild(n);m.appendChild(q);mxUtils.br(m);m.appendChild(l);g=!1;for(q=0;q<a.pages.length;q++){var u=
+document.createElement("option");mxUtils.write(u,a.pages[q].getName()||mxResources.get("pageWithNumber",[q+1]));u.setAttribute("value","data:page/id,"+a.pages[q].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,
+"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)})}m.appendChild(p)}else n.setAttribute("value",c),m.appendChild(n),m.appendChild(q);k.appendChild(m);var t=mxUtils.button(b,function(){a.hideDialog();d(l.checked?"pageNotFound"!==p.value?p.value:c:n.value,LinkDialog.selectedDocs)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){l.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){f.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(n,"focus",function(){l.removeAttribute("checked");f.setAttribute("checked","checked");f.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(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,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var A=document.createElement("div");
-A.style.marginTop="20px";A.style.textAlign="right";b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});b.style.verticalAlign="middle";b.className="geBtn";A.appendChild(b);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(b.style.display="none");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&A.appendChild(b);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,t.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");
+z.style.marginTop="20px";z.style.textAlign="right";b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});b.style.verticalAlign="middle";b.className="geBtn";z.appendChild(b);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(b.style.display="none");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&z.appendChild(b);LinkDialog.selectedDocs=null;LinkDialog.filePicked=
function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);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),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(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(f).addView(d).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],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(l.checked?p.value:n.value,LinkDialog.selectedDocs))});A.appendChild(q);a.editor.cancelFirst||A.appendChild(b);k.appendChild(A);this.container=
-k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width","176"),b.setAttribute("height","219"),b.style.width="170px",b.style.height="219px",b.setAttribute("src",IMAGE_PATH+
-"/logo-flat.png"));"dark"==uiTheme&&(b.style.filter="grayscale(100%) invert(100%)");c.appendChild(b);mxUtils.br(c);var b="dark"==uiTheme?"#cccccc":"#505050",d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color=b;c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=document.createElement("small");d.style.color=b;d.innerHTML='&copy; 2005-2019 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(d);mxEvent.addListener(c,
-"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),b=document.createElement("div");mxUtils.write(b,mxResources.get("sendYourFeedbackToDrawIo"));b.style.fontSize="18px";b.style.marginBottom="18px";c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(b);var 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=n.value+(k.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
-"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});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")});c.appendChild(d);this.init=function(){d.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
+null!=a.drive&&e(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),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(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(f).addView(d).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.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});
+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&e(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&&e(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&&e(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],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;n.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://gitlab.com/"+b+"/"+c+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(l.checked?
+p.value:n.value,LinkDialog.selectedDocs))});z.appendChild(t);a.editor.cancelFirst||z.appendChild(b);k.appendChild(z);this.container=k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width",
+"176"),b.setAttribute("height","219"),b.style.width="170px",b.style.height="219px",b.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));"dark"==uiTheme&&(b.style.filter="grayscale(100%) invert(100%)");c.appendChild(b);mxUtils.br(c);var b="dark"==uiTheme?"#cccccc":"#505050",d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color=b;c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=document.createElement("small");d.style.color=b;d.innerHTML='&copy; 2005-2019 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';
+c.appendChild(d);mxEvent.addListener(c,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),b=document.createElement("div");mxUtils.write(b,mxResources.get("sendYourFeedbackToDrawIo"));b.style.fontSize="18px";b.style.marginBottom="18px";c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(b);var d=document.createElement("input");
+d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var b=n.value+(k.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+
+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\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<e.test(d.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&e.test(d.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
"14px";b.appendChild(k);var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(m);mxEvent.addListener(m,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);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("comments"));
-c.appendChild(n);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(b.appendChild(m),b.appendChild(e)):(b.appendChild(e),b.appendChild(m));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,c,b){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 m=new Graph(k);m.setTooltips(!1);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var n=0,t=null,f=0,l=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[f]?t[f].getAttribute("name"):"pagenumber"==a?f+1:l.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 p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,q=null,A=null,z=null,D=mxUtils.button("",function(){null!=A&&m.zoomIn()});D.className="geSprite geSprite-zoomin";D.setAttribute("title",
-mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var y=mxUtils.button("",function(){null!=A&&m.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var B=mxUtils.button("",function(){null!=A&&(m.maxFitScale=8,m.fit(8),
-m.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var F=mxUtils.button("",function(){null!=A&&(m.zoomActual(),m.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");
-mxUtils.setOpacity(F,20);var x=document.createElement("div");x.style.position="absolute";x.style.textAlign="right";x.style.color="gray";x.style.marginTop="10px";x.style.backgroundColor="transparent";x.style.top="440px";x.style.right="32px";x.style.maxWidth="380px";x.style.cursor="default";var I=mxUtils.button(mxResources.get("download"),function(){if(null!=A){var b=mxUtils.getXml(A.documentElement),c=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(b="undefined"===
-typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});I.className="geBtn";I.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=A&&null!=z&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(z):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();a.replaceFileData(z);
-a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});H.className="geBtn";H.setAttribute("disabled","disabled");var E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var G=null;mxEvent.addListener(E,"change",function(a){null!=G&&(G(a),mxEvent.consume(a))});
-var J=mxUtils.button(mxResources.get("edit"),function(){null!=A&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(A.documentElement)),a.openLink(a.getUrl(),null,!0))});J.className="geBtn";J.setAttribute("disabled","disabled");null!=b&&(J.style.display="none");var C=mxUtils.button(mxResources.get("show"),function(){null!=q&&a.openLink(q.getUrl(E.selectedIndex))});C.className="geBtn gePrimaryBtn";C.setAttribute("disabled","disabled");null!=b&&(C.style.display=
-"none",H.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var K=null;if(null!=c&&0<c.length){k.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse=
-"collapse";R.style.borderSpacing="0px";R.style.width="100%";var V=document.createElement("tbody"),Y=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var M=c.length-1;0<=M;M--){var W=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var g=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var q=function(a){null!=a&&(a=v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));
-return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};E.style.display="none";E.innerHTML="";A=e;z=c;t=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");t=[];for(c=0;c<e.length;c++)t.push(e[c]);f=Math.min(n,t.length-1);0<t.length&&q(t[f]);if(1<t.length)for(E.removeAttribute("disabled"),
-E.style.display="",c=0;c<t.length;c++)e=document.createElement("option"),mxUtils.write(e,t[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),E.appendChild(e);G=function(){try{var b=parseInt(E.value);q(t[b]);f=n=b}catch(N){E.value=n,a.handleError(N)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");x.innerHTML="";mxUtils.write(x,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());
-x.setAttribute("title",l.getAttribute("title"));D.removeAttribute("disabled");y.removeAttribute("disabled");B.removeAttribute("disabled");F.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),I.removeAttribute("disabled"),C.removeAttribute("disabled"),J.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(y,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(F,60)}else E.style.display="none",E.innerHTML="",x.innerHTML="",
-mxUtils.write(x,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var e=document.createElement("td");e.style.padding="6px";e.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(e,mxResources.get("current")):d.toDateString()===Y?mxUtils.write(e,d.toLocaleTimeString()):mxUtils.write(e,d.toLocaleDateString()+" "+d.toLocaleTimeString());l.appendChild(e);l.setAttribute("title",d.toLocaleDateString()+
-" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){q!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),q=b,v=l,v.style.backgroundColor="#ebf2f9",z=A=null,x.removeAttribute("title"),x.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor="#ffffff",m.getModel().clear(),H.setAttribute("disabled","disabled"),I.setAttribute("disabled",
-"disabled"),D.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(F,20),p.spin(k),b.getXml(function(a){if(q==b)try{g(a)}catch(aa){x.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+aa.message)}},
-function(a){p.stop();E.style.display="none";E.innerHTML="";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){C.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(l)}return l}(c[M]);null!=W&&M==c.length-1&&(K=W)}R.appendChild(V);g.appendChild(R)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
-a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",L.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",L.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";L.appendChild(E);L.appendChild(D);L.appendChild(y);L.appendChild(F);L.appendChild(B);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(I),
-e.appendChild(J),e.appendChild(H),e.appendChild(C)):(e.appendChild(I),e.appendChild(J),e.appendChild(H),e.appendChild(C),e.appendChild(g));d.appendChild(e);d.appendChild(L);d.appendChild(x);this.container=d},DraftDialog=function(a,c,b,d,e,g,k,m){var n=document.createElement("div"),t=document.createElement("div");t.style.marginTop="0px";t.style.whiteSpace="nowrap";t.style.overflow="auto";mxUtils.write(t,c);n.appendChild(t);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 l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,q=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==
-a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==a?u+1:q.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){l.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline=
-"none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);t=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("fit"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);var A=mxUtils.button("",function(){l.zoomActual();l.center()});A.className="geSprite geSprite-actualsize";A.setAttribute("title",mxResources.get("actualSize"));A.style.outline="none";
-A.style.border="none";A.style.margin="2px";mxUtils.setOpacity(A,60);e=mxUtils.button(k||mxResources.get("discard"),e);e.className="geBtn";var z=document.createElement("select");z.style.maxWidth="80px";z.style.position="relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.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 a(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,l.getModel());l.maxFitScale=1;l.fit(8);l.center()}}function b(b){null!=b&&(b=
-a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(z,"change",function(a){u=parseInt(z.value);b(v[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");v=[];for(var d=0;d<c.length;d++)v.push(c[d]);0<v.length&&b(v[u]);if(1<v.length)for(z.style.display="",d=0;d<v.length;d++)c=document.createElement("option"),mxUtils.write(c,v[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value",
-d),d==u&&c.setAttribute("selected","selected"),z.appendChild(c)}else a(p)};k.appendChild(z);k.appendChild(c);k.appendChild(b);k.appendChild(A);k.appendChild(t);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(g.appendChild(c),null!=m&&g.appendChild(m),g.appendChild(e),g.appendChild(d)):(g.appendChild(d),g.appendChild(e),null!=m&&g.appendChild(m),
-g.appendChild(c));n.appendChild(g);n.appendChild(k);this.container=n},FindWindow=function(a,c,b,d,e){function g(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var d=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,c.length)===c||null!=a&&a.test(d))return!0}}return!1}function k(){var a=n.model.getDescendants(n.model.getRoot()),b=p.value.toLowerCase(),
-c=u.checked?new RegExp(b):null,d=null;t!=b&&(t=b,f=null);var l=null==f;if(0<b.length)for(var e=0;e<a.length;e++){var k=n.view.getState(a[e]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(n.model.isVertex(k.cell)||n.model.isEdge(k.cell))&&(n.isHtmlLabel(k.cell)?(q.innerHTML=n.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([q])):label=n.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(l){d=k;break}else null==d&&(d=k);l=l||k==f}null!=d?(f=d,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d}var m=a.actions.get("find"),n=a.editor.graph,t=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",
+c.appendChild(n);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(b.appendChild(m),b.appendChild(g)):(b.appendChild(g),b.appendChild(m));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,c,b){var d=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));d.appendChild(g);var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.width="170px";e.style.height="378px";d.appendChild(e);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height=
+"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.setTooltips(!1);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var n=0,q=null,f=0,l=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[f]?q[f].getAttribute("name"):"pagenumber"==a?f+1:l.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 p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,t=null,z=null,x=null,C=mxUtils.button("",function(){null!=z&&m.zoomIn()});C.className="geSprite geSprite-zoomin";C.setAttribute("title",
+mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var y=mxUtils.button("",function(){null!=z&&m.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var B=mxUtils.button("",function(){null!=z&&(m.maxFitScale=8,m.fit(8),
+m.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var E=mxUtils.button("",function(){null!=z&&(m.zoomActual(),m.center())});E.className="geSprite geSprite-actualsize";E.setAttribute("title",mxResources.get("actualSize"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
+mxUtils.setOpacity(E,20);var A=document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var G=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=mxUtils.getXml(z.documentElement),c=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(b="undefined"===
+typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(x):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();a.replaceFileData(x);
+a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});H.className="geBtn";H.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var I=null;mxEvent.addListener(F,"change",function(a){null!=I&&(I(a),mxEvent.consume(a))});
+var J=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});J.className="geBtn";J.setAttribute("disabled","disabled");null!=b&&(J.style.display="none");var D=mxUtils.button(mxResources.get("show"),function(){null!=t&&a.openLink(t.getUrl(F.selectedIndex))});D.className="geBtn gePrimaryBtn";D.setAttribute("disabled","disabled");null!=b&&(D.style.display=
+"none",H.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var K=null;if(null!=c&&0<c.length){k.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse=
+"collapse";R.style.borderSpacing="0px";R.style.width="100%";var V=document.createElement("tbody"),Y=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var M=c.length-1;0<=M;M--){var W=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var t=function(a){null!=a&&(a=v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));
+return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};F.style.display="none";F.innerHTML="";z=e;x=c;q=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");q=[];for(c=0;c<e.length;c++)q.push(e[c]);f=Math.min(n,q.length-1);0<q.length&&t(q[f]);if(1<q.length)for(F.removeAttribute("disabled"),
+F.style.display="",c=0;c<q.length;c++)e=document.createElement("option"),mxUtils.write(e,q[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);I=function(){try{var b=parseInt(F.value);t(q[b]);f=n=b}catch(N){F.value=n,a.handleError(N)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");A.innerHTML="";mxUtils.write(A,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());
+A.setAttribute("title",l.getAttribute("title"));C.removeAttribute("disabled");y.removeAttribute("disabled");B.removeAttribute("disabled");E.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),G.removeAttribute("disabled"),D.removeAttribute("disabled"),J.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(y,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(E,60)}else F.style.display="none",F.innerHTML="",A.innerHTML="",
+mxUtils.write(A,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===Y?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());l.appendChild(g);l.setAttribute("title",d.toLocaleDateString()+
+" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){t!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),t=b,v=l,v.style.backgroundColor="#ebf2f9",x=z=null,A.removeAttribute("title"),A.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor="#ffffff",m.getModel().clear(),H.setAttribute("disabled","disabled"),G.setAttribute("disabled",
+"disabled"),C.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(E,20),p.spin(k),b.getXml(function(a){if(t==b)try{e(a)}catch(aa){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+aa.message)}},
+function(a){p.stop();F.style.display="none";F.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){D.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(l)}return l}(c[M]);null!=W&&M==c.length-1&&(K=W)}R.appendChild(V);e.appendChild(R)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
+a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",L.style.display="none",mxUtils.write(e,mxResources.get("notAvailable"))):(k.style.display="none",L.style.display="none",mxUtils.write(e,mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn";L.appendChild(F);L.appendChild(C);L.appendChild(y);L.appendChild(E);L.appendChild(B);a.editor.cancelFirst?(g.appendChild(e),g.appendChild(G),
+g.appendChild(J),g.appendChild(H),g.appendChild(D)):(g.appendChild(G),g.appendChild(J),g.appendChild(H),g.appendChild(D),g.appendChild(e));d.appendChild(g);d.appendChild(L);d.appendChild(A);this.container=d},DraftDialog=function(a,c,b,d,g,e,k,m){var n=document.createElement("div"),q=document.createElement("div");q.style.marginTop="0px";q.style.whiteSpace="nowrap";q.style.overflow="auto";mxUtils.write(q,c);n.appendChild(q);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 l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,t=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==
+a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==a?u+1:t.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){l.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline=
+"none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);q=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("fit"));q.style.outline="none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);var z=mxUtils.button("",function(){l.zoomActual();l.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(k||mxResources.get("discard"),g);g.className="geBtn";var x=document.createElement("select");x.style.maxWidth="80px";x.style.position="relative";x.style.top="-2px";x.style.verticalAlign="bottom";x.style.marginRight="6px";x.style.display="none";d=mxUtils.button(e||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.width=
+"640px";e.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 a(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,l.getModel());l.maxFitScale=1;l.fit(8);l.center()}}function b(b){null!=b&&(b=
+a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(x,"change",function(a){u=parseInt(x.value);b(v[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");v=[];for(var d=0;d<c.length;d++)v.push(c[d]);0<v.length&&b(v[u]);if(1<v.length)for(x.style.display="",d=0;d<v.length;d++)c=document.createElement("option"),mxUtils.write(c,v[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value",
+d),d==u&&c.setAttribute("selected","selected"),x.appendChild(c)}else a(p)};k.appendChild(x);k.appendChild(c);k.appendChild(b);k.appendChild(z);k.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(e.appendChild(c),null!=m&&e.appendChild(m),e.appendChild(g),e.appendChild(d)):(e.appendChild(d),e.appendChild(g),null!=m&&e.appendChild(m),
+e.appendChild(c));n.appendChild(e);n.appendChild(k);this.container=n},FindWindow=function(a,c,b,d,g){function e(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var d=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,c.length)===c||null!=a&&a.test(d))return!0}}return!1}function k(){var a=n.model.getDescendants(n.model.getRoot()),b=p.value.toLowerCase(),
+c=u.checked?new RegExp(b):null,d=null;q!=b&&(q=b,f=null);var l=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var k=n.view.getState(a[g]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(n.model.isVertex(k.cell)||n.model.isEdge(k.cell))&&(n.isHtmlLabel(k.cell)?(t.innerHTML=n.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([t])):label=n.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||e(c,k.cell,b))||
+null!=c&&(c.test(label)||e(c,k.cell,b))))if(l){d=k;break}else null==d&&(d=k);l=l||k==f}null!=d?(f=d,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d}var m=a.actions.get("find"),n=a.editor.graph,q=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",
mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";l.appendChild(p);mxUtils.br(l);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";l.appendChild(u);mxUtils.write(l,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position=
-"relative";v.style.marginLeft="6px";v.style.top="-1px";l.appendChild(v);var q=document.createElement("div");mxUtils.br(l);v=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";t=f=null;p.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";l.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(z){a.handleError(z)}});v.setAttribute("title",
-mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";l.appendChild(v);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(t!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(D){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"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"),l,c,b,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.fit();this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):n.container.focus()}));this.window.setLocation=function(a,b){var c=window.innerHeight||
-document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var A=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",A);this.destroy=
-function(){mxEvent.removeListener(window,"resize",A);this.window.destroy()}},TagsWindow=function(a,c,b,d,e){var g=a.editor.graph,k="tags",m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var 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 t=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");t.firstChild.style.marginBottom="6px";t.style.marginLeft="6px";m.appendChild(t)}mxEvent.addListener(n,"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()});
-n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(m);t=mxUtils.button(mxResources.get("hide"),function(){var a=g.getCellsForTags(n.value.split(" "),void 0,k,!0);g.setCellsVisible(a,!1)});t.setAttribute("title",mxResources.get("hide"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";m.appendChild(t);t=mxUtils.button(mxResources.get("show"),function(){var a=g.getCellsForTags(n.value.split(" "),void 0,k,!0);g.setCellsVisible(a,!0);if(g.isEnabled()){for(var b=
-[],c=0;c<a.length;c++)(g.model.isVertex(a[c])||g.model.isEdge(a[c]))&&b.push(a[c]);g.setSelectionCells(b)}else for(c=0;c<a.length;c++)g.highlightCell(a[c])});t.setAttribute("title",mxResources.get("show"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";m.appendChild(t);var f=a.actions.get("tags"),t=mxUtils.button(mxResources.get("close"),function(){f.funct()});t.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");t.style.marginTop="8px";t.className="geBtn gePrimaryBtn";
-m.appendChild(t);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||f.funct()});this.window=new mxWindow(mxResources.get("tags"),m,c,b,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.fit();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()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var l=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();
-this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",l);this.destroy=function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(a,c,b,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",m=document.createElement("img");m.setAttribute("border",
-"0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");
-a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){d(n.checked)});k.insertBefore(m,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";e.appendChild(g);e.appendChild(a);e.appendChild(k);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(n),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberMe")),
-b.appendChild(g),e.appendChild(b),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,c,b){b=null!=b?b: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],m={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var t=k.entries[n];m.entries.push({id:t.id,
-title:a.getResource(t.title),desc:a.getResource(t.desc),image:t.preview})}e.push(m)}for(g=0;g<b.length;g++)if(null==a.sidebar.enabledLibraries)e.push(b[g]);else{m={title:b[g].title,entries:[]};for(n=0;n<b[g].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[g].entries[n].id)&&m.entries.push(b[g].entries[n]);0<m.entries.length&&e.push(m)}b=e;if(c){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 f=document.createElement("div"),l=document.createElement("div");f.style.position="absolute";f.style.top="40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height="437px",f.style.marginTop="1px");l.style.position="absolute";l.style.left="202px";l.style.right="0px";l.style.top="40px";l.style.bottom=
-"60px";l.style.overflow="auto";l.style.borderLeft="1px solid rgb(211, 211, 211)";l.style.textAlign="center";mxClient.IS_QUIRKS&&(l.style.width=parseInt(n.style.width)-202+"px",l.style.height=f.style.height,l.style.marginTop=f.style.marginTop);var p=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";for(g=0;g<b.length;g++)(function(b){var c=v.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";
-c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);f.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=v.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";c.setAttribute("title",b.title+" ("+b.id+")");var e=document.createElement("input");e.setAttribute("type","checkbox");e.checked=a.sidebar.isEntryVisible(b.id);e.defaultChecked=e.checked;c.appendChild(e);mxUtils.write(c," "+b.title);f.appendChild(c);var q=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){l.style.textAlign=
-"center";l.style.padding="0px";l.style.color="";l.innerHTML="";if(null!=b.desc){var f=document.createElement("pre");f.style.boxSizing="border-box";f.style.fontFamily="inherit";f.style.margin="20px";f.style.right="0px";f.style.textAlign="left";mxUtils.write(f,b.desc);l.appendChild(f)}null!=b.imageCallback?b.imageCallback(l):null!=b.image?l.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(l.style.padding="20px",l.style.color="rgb(179, 179, 179)",mxUtils.write(l,mxResources.get("noPreview")));
-null!=p&&(p.style.backgroundColor="");p=c;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",q);mxEvent.addListener(c,"dblclick",function(a){e.checked=!e.checked;mxEvent.consume(a)});u.push(function(){return e.checked?b.id:null});0==g&&0==d&&q()})(b.entries[d])})(b[g]);d.style.padding="30px";d.appendChild(n);d.appendChild(f);d.appendChild(l);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
-b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=n.style.width,b.style.paddingTop="12px");var q=document.createElement("input");q.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(q),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),q.checked=!0,q.defaultChecked=
-!0,mxEvent.addListener(n,"click",function(a){mxEvent.getSource(a)!=q&&(q.checked=!q.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(n.style.position="relative",n.style.top="-6px"),b.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),q.checked,!0)});c.className=
-"geBtn gePrimaryBtn"}else{var A=document.createElement("table"),n=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";m=document.createElement("tr");A.style.width="100%";c=document.createElement("td");var e=document.createElement("td"),k=document.createElement("td"),z=mxUtils.bind(this,function(b,c,f){var d=document.createElement("input");d.type="checkbox";A.appendChild(d);d.checked=a.sidebar.isEntryVisible(f);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");
-c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?f:null}});m.appendChild(c);m.appendChild(e);m.appendChild(k);n.appendChild(m);A.appendChild(n);for(var u=[],D=0,g=0;g<b.length;g++)for(n=0;n<b[g].entries.length;n++)D++;for(var y=[c,e,k],B=0,g=0;g<b.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(z(y[Math.floor(B/(D/3))],
-c.title,c.id));B++}})(b[g]);d.appendChild(A);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";q=document.createElement("input");isLocalStorage&&(q.setAttribute("type","checkbox"),q.checked=!0,q.defaultChecked=!0,b.appendChild(q),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),b.appendChild(n),mxEvent.addListener(n,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));d.appendChild(b);n=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});n.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?b.join(";"):"",q.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(n),b.appendChild(c)):(b.appendChild(c),b.appendChild(n));d.appendChild(b);this.container=
-d},PluginsDialog=function(a){function c(){if(0==e.length)d.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{d.innerHTML="";for(var b=0;b<e.length;b++){var l=document.createElement("span");l.style.whiteSpace="nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";l.appendChild(p);mxUtils.write(l,e[b]);d.appendChild(l);mxUtils.br(d);
-mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+e[b]+'"?',function(){e.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),d=document.createElement("div");d.style.height="120px";d.style.overflow="auto";var e=mxSettings.getPlugins().slice();b.appendChild(d);c();var g=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var p=d.split(";"),d=0;d<p.length;d++){var g=App.pluginRegistry[p[d]];null!=
-g&&(b+=g+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){p=a.split(";");for(a=0;a<p.length;a++){var b=p[a],f=App.pluginRegistry[b];null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(e,b)&&e.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-k.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=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});t.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&
-(t.style.display="none");n.appendChild(t);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(g),n.appendChild(m)):(n.appendChild(g),n.appendChild(m),n.appendChild(k));b.appendChild(n);this.container=b},CropImageDialog=function(a,c,b){var d=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"),k=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+
-"...");k.appendChild(m);g.appendChild(k);var k=document.createElement("tr"),n=document.createElement("td"),t=document.createElement("td");e.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()};t.appendChild(f);k.appendChild(n);k.appendChild(t);g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");
-mxUtils.write(n,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";t.appendChild(l);k.appendChild(n);k.appendChild(t);g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";t.appendChild(p);k.appendChild(n);k.appendChild(t);
-g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");t=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";t.appendChild(u);k.appendChild(n);k.appendChild(t);g.appendChild(k);k=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");k.appendChild(n);var v=document.createElement("input");
-v.setAttribute("type","checkbox");t.appendChild(v);k.appendChild(t);g.appendChild(k);e.appendChild(g);d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var q=new Image,A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),d=c.getContext("2d"),e=q.width,g=q.height,k=parseInt(f.value),x=parseInt(l.value),e=Math.max(1,e-k-parseInt(p.value)),g=Math.max(1,g-x-parseInt(u.value));c.width=e;c.height=
-g;v.checked&&(d.fillStyle="#000000",d.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(q,k,x,e,g,0,0,e,g);b(c.toDataURL())});A.className="geBtn gePrimaryBtn";A.setAttribute("disabled","disabled");q.onload=function(){A.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=c;mxEvent.addListener(d,"keypress",function(a){13==a.keyCode&&A.click()});c=document.createElement("div");
-c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(e),c.appendChild(A)):(c.appendChild(A),c.appendChild(e));d.appendChild(c);this.container=d},EditGeometryDialog=function(a,c){var b=a.editor.graph,d=1==c.length?b.getCellGeometry(c[0]):null,e=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),n=document.createElement("td"),t=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(n,
-mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=d&&d.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};t.appendChild(f);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width=
-"100px";l.value=null!=d?d.x:"";t.appendChild(l);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";t.appendChild(p);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=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:"";t.appendChild(u);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d&&null!=d.offset?
-d.offset.y:"";t.appendChild(v);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.width:"";t.appendChild(q);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,
-mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=d?d.height:"";t.appendChild(A);m.appendChild(n);m.appendChild(t);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),
-mxConstants.STYLE_ROTATION,0):"";t.appendChild(z);m.appendChild(n);m.appendChild(t);k.appendChild(m);g.appendChild(k);e.appendChild(g);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var e=b.getCellGeometry(c[d]);null!=e&&(e=e.clone(),b.isCellMovable(c[d])&&(e.relative=f.checked,0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),
-0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(v.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(q.value).length&&(e.width=Number(q.value)),0<mxUtils.trim(A.value).length&&(e.height=Number(A.value))),b.getModel().setGeometry(c[d],e));0<mxUtils.trim(z.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,
-Number(z.value),[c[d]])}}finally{b.getModel().endUpdate()}});D.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&D.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(d),g.appendChild(D)):(g.appendChild(D),g.appendChild(d));e.appendChild(g);this.container=e},LibraryDialog=function(a,c,b,d,e,g){function k(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,l,p,e,g,x,n){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==q[b]){var z=function(){K.innerHTML="";K.style.cursor="pointer";K.style.whiteSpace="nowrap";K.style.textOverflow="ellipsis";mxUtils.write(K,null!=J.title&&0<J.title.length?J.title:mxResources.get("untitled"));K.style.color=null==J.title||0==J.title.length?"#d0d0d0":""};u.style.backgroundImage=
-"";v.style.display="none";var I=p,C=e;if(p>a.maxImageSize||e>a.maxImageSize){var t=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=t;e*=t}I>C?(C=Math.round(100*C/I),I=100):(I=Math.round(100*I/C),C=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 G=document.createElement("img");G.setAttribute("src",y.convert(b));G.style.width=I+"px";G.style.height=C+"px";G.style.margin="10px";G.style.paddingBottom=Math.floor((100-C)/2)+"px";G.style.paddingLeft=Math.floor((100-I)/2)+"px";F.appendChild(G)}else if(null!=g){var H=a.stringToCells(Graph.decompress(g.xml));0<H.length&&(a.sidebar.createThumb(H,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",F.firstChild.style.cursor="")}var E=document.createElement("img");
-E.setAttribute("src",Editor.closeImage);E.setAttribute("border","0");E.setAttribute("title",mxResources.get("delete"));E.setAttribute("align","top");E.style.paddingTop="4px";E.style.position="absolute";E.style.marginLeft="-12px";E.style.zIndex="1";E.style.cursor="pointer";mxEvent.addListener(E,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(E,"click",function(d){q[b]=null;for(var l=0;l<f.length;l++)if(null!=f[l].data&&f[l].data==b||null!=f[l].xml&&null!=c&&f[l].xml==
-c.xml){f.splice(l,1);break}F.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(E,"dblclick",function(a){mxEvent.consume(a)})})(F,b,g);F.appendChild(E);F.style.marginBottom="30px";var K=document.createElement("div");K.style.position="absolute";K.style.boxSizing="border-box";K.style.bottom="-18px";K.style.left="10px";K.style.right="10px";K.style.backgroundColor="#ffffff";K.style.overflow=
-"hidden";K.style.textAlign="center";var J=null;null!=b?(J={data:b,w:p,h:e,title:n},null!=x&&(J.aspect=x),q[b]=G,f.push(J)):null!=g&&(g.aspect="fixed",f.push(g),J=g);mxEvent.addListener(K,"keydown",function(a){13==a.keyCode&&null!=D&&(D(),D=null,mxEvent.consume(a))});z();F.appendChild(K);mxEvent.addListener(K,"mousedown",function(a){"true"!=K.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<
-document.documentMode)){var c=new FilenameDialog(a,J.title||"",mxResources.get("ok"),function(a){null!=a&&(J.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=K.getAttribute("contentEditable")){null!=D&&(D(),D=null);if(null==J.title||0==J.title.length)K.innerHTML="";K.style.textOverflow="";K.style.whiteSpace="";K.style.cursor="text";K.style.color="";K.setAttribute("contentEditable","true");K.focus();document.execCommand("selectAll",
-!1,null);D=function(){K.removeAttribute("contentEditable");K.style.cursor="pointer";J.title=K.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(K,"click",H);mxEvent.addListener(F,"dblclick",H);u.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=g&&(E.style.visibility="hidden",K.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);A=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);E.style.visibility="";K.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==E.style.visibility&&(E.style.visibility="",K.style.visibility="");A=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(I=mxUtils.parseXml(b),"mxlibrary"==I.documentElement.nodeName){C=JSON.parse(mxUtils.getTextContent(I.documentElement));
-if(null!=C&&0<C.length)for(var L=0;L<C.length;L++)null!=C[L].xml?m(null,null,0,0,0,0,C[L]):m(C[L].data,null,0,0,C[L].w,C[L].h,null,"fixed",C[L].title);p=!0}else if("mxfile"==I.documentElement.nodeName){for(var R=I.documentElement.getElementsByTagName("diagram"),L=0;L<R.length;L++){var C=mxUtils.getTextContent(R[L]),H=a.stringToCells(Graph.decompress(C)),X=a.editor.graph.getBoundingBoxFromGeometry(H);m(null,null,0,0,0,0,{xml:C,w:X.width,h:X.height})}p=!0}}catch(ea){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ea){}return null}
-function n(a){a.dataTransfer.dropEffect=null!=A?"move":"copy";a.stopPropagation();a.preventDefault()}function t(b){b.stopPropagation();b.preventDefault();B=!1;z=k(b);if(null!=A)null!=z&&z<u.children.length?(f.splice(z>A?z-1:z,0,f.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(f.push(f.splice(A,1)[0]),u.appendChild(u.children[A]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,F(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 f=[];b=document.createElement("div");b.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="40px";b.appendChild(l);mxUtils.write(l,mxResources.get("filename")+
-":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==e||e.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};l.appendChild(p);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==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";
-mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var q={},A=null,z=null,D=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var y=new mxUrlConverter,B=!1;if(null!=d)for(c=0;c<d.length;c++)l=d[c],m(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var F=function(b){return function(c,f,d,l,p,e,g,q,x){null!=x&&(/(\.vsdx)($|\?)/i.test(x.name)||/(\.vssx)($|\?)/i.test(x.name))?a.importVisio(x,mxUtils.bind(this,function(a){m(a,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.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&&(m(c.responseText,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,f,d,l,p,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",t);mxEvent.addListener(v,"dragover",n);mxEvent.addListener(v,"drop",t);b.appendChild(u);
-d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),c=p.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")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(b){B=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,c,f,d,l,p,e,g,q){null!=x.files&&(F(b)(a,c,f,d,l,p,e,g,q),x.type="",x.type="file",x.value="")});u.scrollTop=
-u.scrollHeight});x.style.display="none";document.body.appendChild(x);a.libDlgFileInputElt=x}l=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);a.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";d.appendChild(l)}l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=D&&(D(),D=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=
-a.substring(0,f)+";base64,"+a.substring(f+1))}m(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";d.appendChild(l);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(p.value,f,e,g)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";d.appendChild(l);a.editor.cancelFirst||d.appendChild(c);b.appendChild(d);
-this.container=b},EditShapeDialog=function(a,c,b,d,e){d=null!=d?d:300;e=null!=e?e:120;var g,k,m=document.createElement("table"),n=document.createElement("tbody");m.style.cellPadding="4px";g=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,b);g.appendChild(k);n.appendChild(g);g=document.createElement("tr");k=document.createElement("td");var t=document.createElement("textarea");t.style.outline="none";t.style.resize="none";
-t.style.width=d-200+"px";t.style.height=e+"px";this.textarea=t;this.init=function(){t.focus();t.scrollTop=0};k.appendChild(t);g.appendChild(k);k=document.createElement("td");b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=e+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);k.appendChild(b);var f=new Graph(b);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);
-f.addCells([l]);b=f.view.getState(l);var p="";null!=b.shape&&null!=b.shape.stencil&&(p=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(t,p||"");b=f.getGraphBounds();e=Math.min(160/b.width,(e-40)/b.height);f.view.scaleAndTranslate(e,20/e-b.x,20/e-b.y);g.appendChild(k);n.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");a.isOffline()||(e=mxUtils.button(mxResources.get("help"),
-function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),e.className="geBtn",k.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&k.appendChild(e);var u=function(b,c,f){var d=t.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
-mxResources.get("ok"));else if(f&&a.hideDialog(),l=!b.model.contains(c),!f||l||d!=p){d=Graph.compress(d);b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[c])}catch(B){throw B;}finally{b.getModel().endUpdate()}l&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}};b=mxUtils.button(mxResources.get("preview"),function(){u(f,l,!1)});b.className="geBtn";k.appendChild(b);
-b=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";k.appendChild(b);a.editor.cancelFirst||k.appendChild(e);g.appendChild(k);n.appendChild(g);m.appendChild(n);this.container=m},CustomDialog=function(a,c,b,d,e,g,k,m){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=k&&c.appendChild(k);a.isOffline()||null==g||(k=mxUtils.button(mxResources.get("help"),
-function(){a.openLink(g)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";m&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);n.appendChild(c);this.cancelBtn=k;this.okButton=e;this.container=n},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>'+
+"relative";v.style.marginLeft="6px";v.style.top="-1px";l.appendChild(v);var t=document.createElement("div");mxUtils.br(l);v=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";q=f=null;p.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";l.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(x){a.handleError(x)}});v.setAttribute("title",
+mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";l.appendChild(v);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(q!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(C){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"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"),l,c,b,d,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.fit();this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):n.container.focus()}));this.window.setLocation=function(a,b){var c=window.innerHeight||
+document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var z=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",z);this.destroy=
+function(){mxEvent.removeListener(window,"resize",z);this.window.destroy()}},FreehandWindow=function(a,c,b,d,g){var e=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){e.freehand.isDrawing()&&e.freehand.stopDrawing();e.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight="4px";k.style.width="160px";
+k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";a.appendChild(k);var m=k.cloneNode(!1);mxUtils.write(m,mxResources.get("stopDrawing"));m.setAttribute("title",mxResources.get("stopDrawing"));m.style.marginTop="4px";mxEvent.addListener(m,"click",function(){e.freehand.stopDrawing()});a.appendChild(m);this.window=new mxWindow(mxResources.get("freehand"),a,c,b,d,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
+this.window.setClosable(!0);e.addListener("freehandStateChanged",mxUtils.bind(this,function(){m.className="geBtn"+(e.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){e.freehand.isDrawing()&&e.freehand.stopDrawing()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",n);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy()}},TagsWindow=
+function(a,c,b,d,g){var e=a.editor.graph,k="tags",m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var 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 q=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");q.firstChild.style.marginBottom="6px";q.style.marginLeft="6px";m.appendChild(q)}mxEvent.addListener(n,"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()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(m);q=mxUtils.button(mxResources.get("hide"),
+function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!1)});q.setAttribute("title",mxResources.get("hide"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";m.appendChild(q);q=mxUtils.button(mxResources.get("show"),function(){var a=e.getCellsForTags(n.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!0);if(e.isEnabled()){for(var b=[],c=0;c<a.length;c++)(e.model.isVertex(a[c])||e.model.isEdge(a[c]))&&b.push(a[c]);e.setSelectionCells(b)}else for(c=
+0;c<a.length;c++)e.highlightCell(a[c])});q.setAttribute("title",mxResources.get("show"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";m.appendChild(q);var f=a.actions.get("tags"),q=mxUtils.button(mxResources.get("close"),function(){f.funct()});q.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");q.style.marginTop="8px";q.className="geBtn gePrimaryBtn";m.appendChild(q);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||f.funct()});this.window=
+new mxWindow(mxResources.get("tags"),m,c,b,d,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.fit();this.window.isVisible()?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):e.container.focus()}));this.window.setLocation=function(a,b){var c=window.innerHeight||
+document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var l=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",l);this.destroy=
+function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(a,c,b,d){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var k="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k=
+mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),m.src=IMAGE_PATH+"/gitlab-logo.svg",m.style.width="32px"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");
+a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){d(n.checked)});k.insertBefore(m,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";g.appendChild(e);g.appendChild(a);g.appendChild(k);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(n),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),
+b.appendChild(e),g.appendChild(b),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var d=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var e=0;e<a.sidebar.customEntries.length;e++){for(var k=a.sidebar.customEntries[e],m={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var q=k.entries[n];m.entries.push({id:q.id,
+title:a.getResource(q.title),desc:a.getResource(q.desc),image:q.preview})}g.push(m)}for(e=0;e<b.length;e++)if(null==a.sidebar.enabledLibraries)g.push(b[e]);else{m={title:b[e].title,entries:[]};for(n=0;n<b[e].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[e].entries[n].id)&&m.entries.push(b[e].entries[n]);0<m.entries.length&&g.push(m)}b=g;if(c){n=mxUtils.bind(this,function(b){for(var c=0;c<b.length;c++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);f.appendChild(d);for(var e=0;e<b.entries.length;e++)(function(b){var d=v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",b.title+" ("+b.id+")");var g=document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(b.id);g.defaultChecked=
+g.checked;d.appendChild(g);mxUtils.write(d," "+b.title);f.appendChild(d);var k=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){l.style.textAlign="center";l.style.padding="0px";l.style.color="";l.innerHTML="";if(null!=b.desc){var c=document.createElement("pre");c.style.boxSizing="border-box";c.style.fontFamily="inherit";c.style.margin="20px";c.style.right="0px";c.style.textAlign="left";mxUtils.write(c,b.desc);l.appendChild(c)}null!=b.imageCallback?b.imageCallback(l):null!=b.image?l.innerHTML+=
+'<img border="0" src="'+b.image+'"/>':null==b.desc&&(l.style.padding="20px",l.style.color="rgb(179, 179, 179)",mxUtils.write(l,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",k);mxEvent.addListener(d,"dblclick",function(a){g.checked=!g.checked;mxEvent.consume(a)});u.push(function(){return g.checked?b.id:null});0==c&&0==e&&k()})(b.entries[e])})(b[c])});e=
+document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var f=document.createElement("div"),l=document.createElement("div");f.style.position="absolute";f.style.top="40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height=
+"437px",f.style.marginTop="1px");l.style.position="absolute";l.style.left="202px";l.style.right="0px";l.style.top="40px";l.style.bottom="60px";l.style.overflow="auto";l.style.borderLeft="1px solid rgb(211, 211, 211)";l.style.textAlign="center";mxClient.IS_QUIRKS&&(l.style.width=parseInt(e.style.width)-202+"px",l.style.height=f.style.height,l.style.marginTop=f.style.marginTop);var p=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";n(b);d.style.padding=
+"30px";d.appendChild(e);d.appendChild(f);d.appendChild(l);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=e.style.width,b.style.paddingTop="12px");var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"),
+e.style.paddingRight="20px",e.appendChild(t),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=t&&(t.checked=!t.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),b.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=
+[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),t.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),e=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";n=document.createElement("tr");z.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),k=document.createElement("td"),x=mxUtils.bind(this,function(b,c,f){var d=document.createElement("input");
+d.type="checkbox";z.appendChild(d);d.checked=a.sidebar.isEntryVisible(f);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?f:null}});n.appendChild(c);n.appendChild(g);n.appendChild(k);e.appendChild(n);z.appendChild(e);for(var u=[],C=0,e=0;e<b.length;e++)for(n=0;n<b[e].entries.length;n++)C++;
+for(var y=[c,g,k],B=0,e=0;e<b.length;e++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(x(y[Math.floor(B/(C/3))],c.title,c.id));B++}})(b[e]);d.appendChild(z);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,b.appendChild(t),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),b.appendChild(e),
+mxEvent.addListener(e,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)}));d.appendChild(b);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?b.join(";"):"",t.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";
+b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(e),b.appendChild(n)):(b.appendChild(n),b.appendChild(e));d.appendChild(b);this.container=d},PluginsDialog=function(a){function c(){if(0==g.length)d.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{d.innerHTML="";for(var b=0;b<g.length;b++){var l=document.createElement("span");l.style.whiteSpace="nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor=
+"pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";l.appendChild(p);mxUtils.write(l,g[b]);d.appendChild(l);mxUtils.br(d);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),d=document.createElement("div");d.style.height="120px";d.style.overflow="auto";var g=mxSettings.getPlugins().slice();b.appendChild(d);c();var e=mxUtils.button(mxResources.get("add"),
+function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var p=d.split(";"),d=0;d<p.length;d++){var e=App.pluginRegistry[p[d]];null!=e&&(b+=e+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){p=a.split(";");for(a=0;a<p.length;a++){var b=p[a],f=App.pluginRegistry[b];null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,
+300,80,!0,!0);b.init()});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
+q.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(e),n.appendChild(m)):(n.appendChild(e),n.appendChild(m),n.appendChild(k));b.appendChild(n);this.container=b},CropImageDialog=function(a,c,b){var d=document.createElement("div"),g=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan",
+"2");mxUtils.write(m,mxResources.get("loading")+"...");k.appendChild(m);e.appendChild(k);var k=document.createElement("tr"),n=document.createElement("td"),q=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()};q.appendChild(f);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");
+n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";q.appendChild(l);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
+p.value="0";q.appendChild(p);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=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";q.appendChild(u);k.appendChild(n);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+
+":");k.appendChild(n);var v=document.createElement("input");v.setAttribute("type","checkbox");q.appendChild(v);k.appendChild(q);e.appendChild(k);g.appendChild(e);d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var t=new Image,z=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),d=c.getContext("2d"),e=t.width,g=t.height,k=parseInt(f.value),A=parseInt(l.value),e=Math.max(1,e-k-parseInt(p.value)),
+g=Math.max(1,g-A-parseInt(u.value));c.width=e;c.height=g;v.checked&&(d.fillStyle="#000000",d.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(t,k,A,e,g,0,0,e,g);b(c.toDataURL())});z.className="geBtn gePrimaryBtn";z.setAttribute("disabled","disabled");t.onload=function(){z.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+t.width+" "+mxResources.get("height")+": "+t.height)};t.src=c;mxEvent.addListener(d,
+"keypress",function(a){13==a.keyCode&&z.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(z)):(c.appendChild(z),c.appendChild(g));d.appendChild(c);this.container=d},EditGeometryDialog=function(a,c){var b=a.editor.graph,d=1==c.length?b.getCellGeometry(c[0]):null,g=document.createElement("div"),e=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),n=document.createElement("td"),
+q=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=d&&d.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};q.appendChild(f);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var l=
+document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d?d.x:"";q.appendChild(l);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";q.appendChild(p);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");
+n=document.createElement("td");q=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:"";q.appendChild(u);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type",
+"text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.y:"";q.appendChild(v);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d?d.width:"";q.appendChild(t);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=
+document.createElement("td");q=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!=d?d.height:"";q.appendChild(z);m.appendChild(n);m.appendChild(q);k.appendChild(m);m=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");
+x.style.width="100px";x.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";q.appendChild(x);m.appendChild(n);m.appendChild(q);k.appendChild(m);e.appendChild(k);g.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var C=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var e=b.getCellGeometry(c[d]);null!=e&&(e=e.clone(),b.isCellMovable(c[d])&&
+(e.relative=f.checked,0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(v.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(t.value).length&&(e.width=Number(t.value)),0<mxUtils.trim(z.value).length&&(e.height=Number(z.value))),b.getModel().setGeometry(c[d],
+e));0<mxUtils.trim(x.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[c[d]])}}finally{b.getModel().endUpdate()}});C.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&C.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(d),e.appendChild(C)):(e.appendChild(C),e.appendChild(d));g.appendChild(e);this.container=g},LibraryDialog=function(a,c,b,d,g,e){function k(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,l,p,e,g,A,n){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==t[b]){var x=function(){K.innerHTML="";K.style.cursor="pointer";K.style.whiteSpace="nowrap";K.style.textOverflow="ellipsis";mxUtils.write(K,null!=J.title&&0<J.title.length?J.title:mxResources.get("untitled"));
+K.style.color=null==J.title||0==J.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var G=p,D=e;if(p>a.maxImageSize||e>a.maxImageSize){var q=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=q;e*=q}G>D?(D=Math.round(100*D/G),G=100):(G=Math.round(100*G/D),D=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";
+mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var I=document.createElement("img");I.setAttribute("src",y.convert(b));I.style.width=G+"px";I.style.height=D+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-D)/2)+"px";I.style.paddingLeft=Math.floor((100-G)/2)+"px";E.appendChild(I)}else if(null!=g){var H=a.stringToCells(Graph.decompress(g.xml));0<H.length&&(a.sidebar.createThumb(H,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?
+"inline":"inline-block",E.firstChild.style.cursor="")}var F=document.createElement("img");F.setAttribute("src",Editor.closeImage);F.setAttribute("border","0");F.setAttribute("title",mxResources.get("delete"));F.setAttribute("align","top");F.style.paddingTop="4px";F.style.position="absolute";F.style.marginLeft="-12px";F.style.zIndex="1";F.style.cursor="pointer";mxEvent.addListener(F,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(F,"click",function(d){t[b]=null;for(var l=
+0;l<f.length;l++)if(null!=f[l].data&&f[l].data==b||null!=f[l].xml&&null!=c&&f[l].xml==c.xml){f.splice(l,1);break}E.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(F,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(F);E.style.marginBottom="30px";var K=document.createElement("div");K.style.position="absolute";K.style.boxSizing="border-box";K.style.bottom="-18px";K.style.left=
+"10px";K.style.right="10px";K.style.backgroundColor="#ffffff";K.style.overflow="hidden";K.style.textAlign="center";var J=null;null!=b?(J={data:b,w:p,h:e,title:n},null!=A&&(J.aspect=A),t[b]=I,f.push(J)):null!=g&&(g.aspect="fixed",f.push(g),J=g);mxEvent.addListener(K,"keydown",function(a){13==a.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(a))});x();E.appendChild(K);mxEvent.addListener(K,"mousedown",function(a){"true"!=K.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(b){if(mxClient.IS_IOS||
+mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,J.title||"",mxResources.get("ok"),function(a){null!=a&&(J.title=a,x())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=K.getAttribute("contentEditable")){null!=C&&(C(),C=null);if(null==J.title||0==J.title.length)K.innerHTML="";K.style.textOverflow="";K.style.whiteSpace="";K.style.cursor="text";K.style.color="";K.setAttribute("contentEditable",
+"true");K.focus();document.execCommand("selectAll",!1,null);C=function(){K.removeAttribute("contentEditable");K.style.cursor="pointer";J.title=K.innerHTML;x()};mxEvent.consume(b)}};mxEvent.addListener(K,"click",H);mxEvent.addListener(E,"dblclick",H);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(F.style.visibility="hidden",K.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);z=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");
+window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);F.style.visibility="";K.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==F.style.visibility&&(F.style.visibility="",K.style.visibility="");z=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){D=
+JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=D&&0<D.length)for(var L=0;L<D.length;L++)null!=D[L].xml?m(null,null,0,0,0,0,D[L]):m(D[L].data,null,0,0,D[L].w,D[L].h,null,"fixed",D[L].title);p=!0}else if("mxfile"==G.documentElement.nodeName){for(var R=G.documentElement.getElementsByTagName("diagram"),L=0;L<R.length;L++){var D=mxUtils.getTextContent(R[L]),H=a.stringToCells(Graph.decompress(D)),X=a.editor.graph.getBoundingBoxFromGeometry(H);m(null,null,0,0,0,0,{xml:D,w:X.width,h:X.height})}p=
+!0}}catch(ea){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ea){}return null}function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function q(b){b.stopPropagation();b.preventDefault();B=!1;x=k(b);if(null!=z)null!=x&&x<u.children.length?(f.splice(x>z?x-1:x,0,f.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[x])):(f.push(f.splice(z,1)[0]),u.appendChild(u.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,
+0,0,a.maxImageSize,E(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 f=[];b=document.createElement("div");b.style.height="100%";var l=document.createElement("div");l.style.whiteSpace=
+"nowrap";l.style.height="40px";b.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",
+!1,null)};l.appendChild(p);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==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top=
+"260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var t={},z=null,x=null,C=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var y=new mxUrlConverter,B=!1;if(null!=d)for(c=0;c<d.length;c++)l=d[c],m(l.data,null,0,0,
+l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var E=function(b){return function(c,f,d,l,p,e,g,k,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(a){m(a,f,d,l,p,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,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,f,d,l,p,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",q);mxEvent.addListener(v,"dragover",n);mxEvent.addListener(v,"drop",q);b.appendChild(u);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),c=p.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")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");mxEvent.addListener(A,"change",function(b){B=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,c,f,d,l,p,
+e,g,k){null!=A.files&&(E(b)(a,c,f,d,l,p,e,g,k),A.type="",A.type="file",A.value="")});u.scrollTop=u.scrollHeight});A.style.display="none";document.body.appendChild(A);a.libDlgFileInputElt=A}l=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);a.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";d.appendChild(l)}l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=C&&(C(),C=null);a.showImageDialog(mxResources.get("addImageUrl"),"",
+function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}m(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";d.appendChild(l);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(p.value,f,g,e)}));l.setAttribute("id","btnSave");
+l.className="geBtn gePrimaryBtn";d.appendChild(l);a.editor.cancelFirst||d.appendChild(c);b.appendChild(d);this.container=b},EditShapeDialog=function(a,c,b,d,g){d=null!=d?d:300;g=null!=g?g:120;var e,k,m=document.createElement("table"),n=document.createElement("tbody");m.style.cellPadding="4px";e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,b);e.appendChild(k);n.appendChild(e);e=document.createElement("tr");k=document.createElement("td");
+var q=document.createElement("textarea");q.style.outline="none";q.style.resize="none";q.style.width=d-200+"px";q.style.height=g+"px";this.textarea=q;this.init=function(){q.focus();q.scrollTop=0};k.appendChild(q);e.appendChild(k);k=document.createElement("td");b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=g+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);k.appendChild(b);
+var f=new Graph(b);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);f.addCells([l]);b=f.view.getState(l);var p="";null!=b.shape&&null!=b.shape.stencil&&(p=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(q,p||"");b=f.getGraphBounds();g=Math.min(160/b.width,(g-40)/b.height);f.view.scaleAndTranslate(g,20/g-b.x,20/g-b.y);e.appendChild(k);n.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace=
+"nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var u=function(b,c,f){var d=q.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");
+if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(f&&a.hideDialog(),l=!b.model.contains(c),!f||l||d!=p){d=Graph.compress(d);b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[c])}catch(B){throw B;}finally{b.getModel().endUpdate()}l&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}};
+b=mxUtils.button(mxResources.get("preview"),function(){u(f,l,!1)});b.className="geBtn";k.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";k.appendChild(b);a.editor.cancelFirst||k.appendChild(g);e.appendChild(k);n.appendChild(e);m.appendChild(n);this.container=m},CustomDialog=function(a,c,b,d,g,e,k,m){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign=
+"center";null!=k&&c.appendChild(k);a.isOffline()||null==e||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink(e)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";m&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);
+n.appendChild(c);this.cancelBtn=k;this.okButton=g;this.container=n},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",
+null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
-var a=window.innerWidth,b=window.innerHeight,d=987,e=712;.9*a<d&&(d=Math.max(.9*a,600),c.style.width=d+"px");.9*b<e&&(e=Math.max(.9*b,300),c.style.height=e+"px");this.width=d;this.height=e;this.container=c};
-TemplatesDialog.prototype.init=function(a,c,b,d,e,g,k,m,n,t){function f(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function l(a,b,c,f,d,l,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";F.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");F.querySelector("."+b).src="/images/"+c+"-sel.svg";F.querySelector("."+d).src="/images/"+
-l+".svg";return!0}function p(a){function b(a){Z.removeChild(f);F.removeChild(c);Z.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";F.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=E){for(var f=E.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}E.className=f.join(" ")}null!=a?(E=a,E.className+=" "+b,G=c,U.className="geTempDlgCreateBtn"):(G=E=null,U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function v(b){if(null!=G){var f=G;G=null;U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?t(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()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function q(a){a=a?"":"none";for(var b=F.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
-a}function A(a,b,c){function f(){U.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));q(!b)}Y.innerHTML="";u();K=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
-mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);Y.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),x=a[l].tooltip||a[l].title,k=a[l].imgUrl,y=mxUtils.htmlEntities(a[l].changedBy||""),B=mxUtils.htmlEntities(a[l].lastModifiedOn||
-"");k||(k=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"&hellip;");if(c){var m=document.createElement("tr"),k=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));k.appendChild(n);x=document.createElement("span");x.className="geTempDlgDiagramTitle";x.innerHTML=e;k.appendChild(x);m.appendChild(k);k=document.createElement("td");
-k.innerHTML=y;m.appendChild(k);k=document.createElement("td");k.innerHTML=B;m.appendChild(k);d.appendChild(m);null==E&&(f(),u(m,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(m,"click",function(){E!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(m,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],m)}else{var z=document.createElement("div");z.className="geTempDlgDiagramTile";z.setAttribute("title",x);null==E&&(f(),u(z,"geTempDlgDiagramTileActive",
-a[l]));y=document.createElement("div");y.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var A=document.createElement("img");A.style.display="none";(function(a,b){A.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};A.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,y);A.src=k;y.appendChild(A);z.appendChild(y);y=document.createElement("div");y.className="geTempDlgDiagramTileLbl";y.innerHTML=null!=e?e:"";z.appendChild(y);
-n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));z.appendChild(n);(function(a,b){mxEvent.addListener(z,"click",function(){E!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(z,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],z);Y.appendChild(z)}}}function z(a,b){da.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=
-!0;var l=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"&hellip;");null==E&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(l,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
-g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(g);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;l.appendChild(e);da.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){E!=b&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}V.style.display=5>a.length?"none":""}function D(a){var b=F.querySelector(".geTemplatesList"),
+var a=window.innerWidth,b=window.innerHeight,d=987,g=712;.9*a<d&&(d=Math.max(.9*a,600),c.style.width=d+"px");.9*b<g&&(g=Math.max(.9*b,300),c.style.height=g+"px");this.width=d;this.height=g;this.container=c};
+TemplatesDialog.prototype.init=function(a,c,b,d,g,e,k,m,n,q){function f(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function l(a,b,c,f,d,l,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";E.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");E.querySelector("."+b).src="/images/"+c+"-sel.svg";E.querySelector("."+d).src="/images/"+
+l+".svg";return!0}function p(a){function b(a){Z.removeChild(f);E.removeChild(c);Z.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";E.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,I=c,U.className="geTempDlgCreateBtn"):(I=F=null,U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function v(b){if(null!=I){var f=I;I=null;U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?q(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()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function t(a){a=a?"":"none";for(var b=E.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
+a}function z(a,b,c){function f(){U.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));t(!b)}Y.innerHTML="";u();K=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
+mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);Y.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),k=a[l].tooltip||a[l].title,A=a[l].imgUrl,y=mxUtils.htmlEntities(a[l].changedBy||""),B=mxUtils.htmlEntities(a[l].lastModifiedOn||
+"");A||(A=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"&hellip;");if(c){var m=document.createElement("tr"),A=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));A.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=e;A.appendChild(k);m.appendChild(A);A=document.createElement("td");
+A.innerHTML=y;m.appendChild(A);A=document.createElement("td");A.innerHTML=B;m.appendChild(A);d.appendChild(m);null==F&&(f(),u(m,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(m,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],m)}else{var x=document.createElement("div");x.className="geTempDlgDiagramTile";x.setAttribute("title",k);null==F&&(f(),u(x,"geTempDlgDiagramTileActive",
+a[l]));y=document.createElement("div");y.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var z=document.createElement("img");z.style.display="none";(function(a,b){z.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};z.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(z,y);z.src=A;y.appendChild(z);x.appendChild(y);y=document.createElement("div");y.className="geTempDlgDiagramTileLbl";y.innerHTML=null!=e?e:"";x.appendChild(y);
+n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));x.appendChild(n);(function(a,b){mxEvent.addListener(x,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(x,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],x);Y.appendChild(x)}}}function x(a,b){da.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=
+!0;var l=document.createElement("div"),e=mxResources.get(d.title);null==e&&(e=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",e);e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");null==F&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(l,"geTempDlgNewDiagramCatItemActive",d));var p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
+g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;p.appendChild(g);l.appendChild(p);p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemLbl";p.innerHTML=e;l.appendChild(p);da.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}V.style.display=5>a.length?"none":""}function C(a){var b=E.querySelector(".geTemplatesList"),
c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+l.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");f.innerHTML=d+" ("+l.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){H!=d&&(null!=H?(H.style.fontWeight="normal",H.style.textDecoration="none"):(fa.style.display="none",ha.style.minHeight=
-"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",Z.scrollTop=0,x&&(I=!0),M.innerHTML=c,W.style.display="none",A(a[b],!0))})})(c,d,f)}}function y(a){k&&(Z.scrollTop=0,Y.innerHTML="",ca.spin(Y),I=!1,x=!0,M.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),R=null,k(N,a?null:g))}function B(a){f();Z.scrollTop=0;Y.innerHTML="";ca.spin(Y);I=!1;x=!0;ba=null;M.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
-mxUtils.htmlEntities(a)+'"';m(a,N,C?null:g);R=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var F=this.container,x=!1,I=!1,H=null,E=null,G=null,J=!1,C=!0,L=!1,K=[],R,V=F.querySelector(".geTempDlgShowAllBtn"),Y=F.querySelector(".geTempDlgDiagramsTiles"),M=F.querySelector(".geTempDlgDiagramsListTitle"),W=F.querySelector(".geTempDlgDiagramsListBtns"),Z=F.querySelector(".geTempDlgContent"),ha=F.querySelector(".geTempDlgDiagramsList"),fa=F.querySelector(".geTempDlgNewDiagramCat"),
-da=F.querySelector(".geTempDlgNewDiagramCatList"),U=F.querySelector(".geTempDlgCreateBtn"),ca=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(F.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();fa.style.display="";ha.style.minHeight="calc(100% - 280px)";y(C)});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg",
-"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(C=!0,null==R?y(C):B(R))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(C=!1,null==R?y(C):B(R))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
-"tiles",!1)&&(L=!0,A(K,!1,L))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(L=!1,A(K,!1,L))});mxEvent.addListener(V,"click",function(){J?(fa.style.height="280px",da.style.height="190px",V.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),z(ea)):(fa.style.height="440px",da.style.height="355px",V.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
-null,"- Show less")),z(ea,!0));J=!J});var Q=!1,aa=!1,X={},ea=[],P=1;mxUtils.get(d,function(a){if(!Q){Q=!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=X[b];null==c&&(P++,c=[],X[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
-a.nextSibling}D(X)}});mxUtils.get(e,function(a){if(!aa){aa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ea.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;z(ea)}});var N=function(a,b){W.style.display="";ca.stop();x=!1;I?I=!1:b?Y.innerHTML=b:0==a.length?Y.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
-A(a,!1,L)};y(C);var ba=null;m&&mxEvent.addListener(F.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ba&&clearTimeout(ba);13==a.keyCode?B(b.value):ba=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(U,"click",v);mxEvent.addListener(F.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(F.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})};
-var BtnDialog=function(a,c,b,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("done"));var k="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
-(k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));b=mxUtils.button(b,d);b.insertBefore(m,b.firstChild);
-b.style.marginTop="6px";b.className="geBigButton";e.appendChild(g);e.appendChild(a);e.appendChild(b);this.container=e};(function(){Editor.prototype.appName="draw.io";Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",Z.scrollTop=0,A&&(G=!0),M.innerHTML=c,W.style.display="none",z(a[b],!0))})})(c,d,f)}}function y(a){k&&(Z.scrollTop=0,Y.innerHTML="",ca.spin(Y),G=!1,A=!0,M.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),R=null,k(N,a?null:e))}function B(a){f();Z.scrollTop=0;Y.innerHTML="";ca.spin(Y);G=!1;A=!0;ba=null;M.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
+mxUtils.htmlEntities(a)+'"';m(a,N,D?null:e);R=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var E=this.container,A=!1,G=!1,H=null,F=null,I=null,J=!1,D=!0,L=!1,K=[],R,V=E.querySelector(".geTempDlgShowAllBtn"),Y=E.querySelector(".geTempDlgDiagramsTiles"),M=E.querySelector(".geTempDlgDiagramsListTitle"),W=E.querySelector(".geTempDlgDiagramsListBtns"),Z=E.querySelector(".geTempDlgContent"),ha=E.querySelector(".geTempDlgDiagramsList"),fa=E.querySelector(".geTempDlgNewDiagramCat"),
+da=E.querySelector(".geTempDlgNewDiagramCatList"),U=E.querySelector(".geTempDlgCreateBtn"),ca=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(E.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();fa.style.display="";ha.style.minHeight="calc(100% - 280px)";y(D)});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg",
+"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(D=!0,null==R?y(D):B(R))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(D=!1,null==R?y(D):B(R))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
+"tiles",!1)&&(L=!0,z(K,!1,L))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(L=!1,z(K,!1,L))});mxEvent.addListener(V,"click",function(){J?(fa.style.height="280px",da.style.height="190px",V.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),x(ea)):(fa.style.height="440px",da.style.height="355px",V.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
+null,"- Show less")),x(ea,!0));J=!J});var Q=!1,aa=!1,X={},ea=[],P=1;mxUtils.get(d,function(a){if(!Q){Q=!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=X[b];null==c&&(P++,c=[],X[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
+a.nextSibling}C(X)}});mxUtils.get(g,function(a){if(!aa){aa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ea.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;x(ea)}});var N=function(a,b){W.style.display="";ca.stop();A=!1;G?G=!1:b?Y.innerHTML=b:0==a.length?Y.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
+z(a,!1,L)};y(D);var ba=null;m&&mxEvent.addListener(E.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ba&&clearTimeout(ba);13==a.keyCode?B(b.value):ba=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(U,"click",v);mxEvent.addListener(E.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(E.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})};
+var BtnDialog=function(a,c,b,d){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("done"));var k="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
+(k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),m.src=IMAGE_PATH+"/gitlab-logo.svg"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));
+b=mxUtils.button(b,d);b.insertBefore(m,b.firstChild);b.style.marginTop="6px";b.className="geBigButton";g.appendChild(e);g.appendChild(a);g.appendChild(b);this.container=g};(function(){Editor.prototype.appName="draw.io";Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
@@ -8317,45 +8326,46 @@ dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"M
dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1}];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## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\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,refs,manager\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. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## 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.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=c&&0<c.length)for(var d=0;d<c.length;d++)if("mxgraph"==c[d].getAttribute("class")){f.push(c[d]);break}0<f.length&&(c=f[0].getAttribute("data-mxgraph"),null!=c?(f=JSON.parse(c),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0]),c=Graph.decompress(c),0<c.length&&
(f=mxUtils.parseXml(c),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),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)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(f=c[Math.max(0,
-Math.min(c.length-1,urlParams.page||0))])),null!=f&&(c=Graph.decompress(mxUtils.getTextContent(f)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,c,d){a=f.substring(a+8,a+8+d);"zTXt"==c?(d=a.indexOf(String.fromCharCode(0)),
-"mxGraphModel"==a.substring(0,d)&&(a=Graph.bytesToString(pako.inflateRaw(a.substring(d+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(G){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};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;
-DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;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 f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}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=
-a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(c,f),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!b)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
-Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var b=[],c=0;c<a;c++)b.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return b.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):
-null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,
-this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.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"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=
-function(a){a=null!=a?a:!0;var b=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");
-if(null!=b&&(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)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(E){}return!1};Editor.prototype.extractGraphModel=function(a,b){return Editor.extractGraphModel.apply(this,arguments)};var b=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();b.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,b){a=null!=a?a:DRAW_MATH_URL+"/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(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};
-Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var 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&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");
-if(null!=f&&0<f.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};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,f,d){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.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?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,
-a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=b.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.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(EditorUi.prototype.svgBrokenImage.src)});else{var c=new Image;EditorUi.prototype.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(J){b(EditorUi.prototype.svgBrokenImage.src)}};c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());
-var d=0,l=c||{};c=mxUtils.bind(this,function(c,p){for(var e=a.getElementsByTagName(c),g=0;g<e.length;g++)mxUtils.bind(this,function(c){var e=f.convert(c.getAttribute(p));if(null!=e&&"data:"!=e.substring(0,5)){var g=l[e];null==g?(d++,this.convertImageToDataUri(e,function(f){null!=f&&(l[e]=f,c.setAttribute(p,f));d--;0==d&&b(a)})):c.setAttribute(p,g)}else null!=e&&c.setAttribute(p,e)})(e[g])});c("image","xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=
-0,f=a.length,d,l,p;c<f;){d=a.charCodeAt(c++)&255;if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&
-15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,l){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
+Math.min(c.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<b.length?(a=Graph.decompress(b),null!=a&&0<a.length&&(c=mxUtils.parseXml(a).documentElement)):(a=mxUtils.getChildNodes(a),0<a.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(a[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=
+function(a){var b=mxUtils.getTextContent(a),c=null;0<b.length?c=Graph.decompress(b):null!=a.firstChild&&(c=mxUtils.getXml(a.firstChild));return c};Editor.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,c,d){a=f.substring(a+8,a+8+d);"zTXt"==c?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=Graph.bytesToString(pako.inflateRaw(a.substring(d+
+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(I){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};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;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;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 f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}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=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=
+a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=
+a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(c,f),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!b)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=
+a?a:Editor.GUID_LENGTH;for(var b=[],c=0;c<a;c++)b.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return b.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");
+if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?
+this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.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"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,arguments);null!=this.graph.currentStyle&&
+"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(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)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(F){}return!1};Editor.prototype.extractGraphModel=function(a,b){return Editor.extractGraphModel.apply(this,arguments)};var b=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();b.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,b){a=null!=a?a:DRAW_MATH_URL+"/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(b||{jax:["input/TeX",
+"input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&
+"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var 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&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var d=document.createElement("script");
+d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};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,f,d){void 0!==
+c?b.push(c.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.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?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==
+a.baseUrl||EditorUi.prototype.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=b.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.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(EditorUi.prototype.svgBrokenImage.src)});
+else{var c=new Image;EditorUi.prototype.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(J){b(EditorUi.prototype.svgBrokenImage.src)}};c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,l=c||{};c=mxUtils.bind(this,function(c,
+e){for(var p=a.getElementsByTagName(c),g=0;g<p.length;g++)mxUtils.bind(this,function(c){var p=f.convert(c.getAttribute(e));if(null!=p&&"data:"!=p.substring(0,5)){var g=l[p];null==g?(d++,this.convertImageToDataUri(p,function(f){null!=f&&(l[p]=f,c.setAttribute(e,f));d--;0==d&&b(a)})):c.setAttribute(e,g)}else null!=p&&c.setAttribute(e,p)})(p[g])});c("image","xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,f=a.length,d,l,p;c<f;){d=a.charCodeAt(c++)&255;
+if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}p=
+a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,l){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=
c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){d&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(K){null!=c&&c(K)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.fontCss.split("url("),f=0,d={},l=mxUtils.bind(this,function(){if(0==f){for(var l=[c[0]],p=1;p<c.length;p++){var e=
-c[p].indexOf(")");l.push('url("');l.push(d[b(c[p].substring(0,e))]);l.push('"'+c[p].substring(e))}this.resolvedFontCss=l.join("");a()}});if(0<c.length)for(var p=1;p<c.length;p++){var e=c[p].indexOf(")"),g=null,q=c[p].indexOf("format(",e);0<q&&(g=b(c[p].substring(q+7,c[p].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var b="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))b=
+c[p].indexOf(")");l.push('url("');l.push(d[b(c[p].substring(0,e))]);l.push('"'+c[p].substring(e))}this.resolvedFontCss=l.join("");a()}});if(0<c.length)for(var p=1;p<c.length;p++){var e=c[p].indexOf(")"),g=null,k=c[p].indexOf("format(",e);0<k&&(g=b(c[p].substring(k+7,c[p].indexOf(")",k))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var b="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))b=
"application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.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){d[a]=b;f--;l()}),mxUtils.bind(this,
function(a){f--;l()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[p].substring(0,e)),g)}}else a()};Editor.prototype.convertMath=function(a,b,c,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,function(){f()}))}),0)):f()};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.graph.mathEnabled&&this.useCanvasForExport};Editor.prototype.exportToCanvas=
-function(a,b,c,f,d,l,p,e,g,q,k,u,y,B){l=null!=l?l:!0;u=null!=u?u:this.graph;y=null!=y?y:0;var x=g?null:u.background;x==mxConstants.NONE&&(x=null);null==x&&(x=f);null==x&&0==g&&(x=this.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(x,null,null,B,null,null!=p?p:!0,null,null,null,q),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));e=null!=
-e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*q),b/g)):b/g);g=Math.ceil(e*g)+2*y;q=Math.ceil(e*q)+2*y;p.setAttribute("width",g);p.setAttribute("height",q);var k=p.getContext("2d");null!=x&&(k.beginPath(),k.rect(0,0,g,q),k.fillStyle=x,k.fill());k.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(f,y/e,y/e);a(p)},0):(k.drawImage(f,y/e,y/e),a(p))}catch(X){null!=d&&d(X)}});f.onerror=function(a){null!=d&&d(a)};try{q&&this.graph.addSvgShadow(c);var p=mxUtils.bind(this,function(){if(null!=
-this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(u,c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(p)}catch(U){null!=d&&d(U)}}),c,k)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<
-8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(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 g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var q=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;
-f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+q);l(a,q);l(a,4)}while(q);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var 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 k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);
+function(a,b,c,f,d,l,p,e,g,k,t,y,u,B){l=null!=l?l:!0;y=null!=y?y:this.graph;u=null!=u?u:0;var m=g?null:y.background;m==mxConstants.NONE&&(m=null);null==m&&(m=f);null==m&&0==g&&(m=this.graph.defaultPageBackgroundColor);this.convertImages(y.getSvg(m,null,null,B,null,null!=p?p:!0,null,null,null,k),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));e=null!=
+e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(e*g)+2*u;k=Math.ceil(e*k)+2*u;p.setAttribute("width",g);p.setAttribute("height",k);var t=p.getContext("2d");null!=m&&(t.beginPath(),t.rect(0,0,g,k),t.fillStyle=m,t.fill());t.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(f,u/e,u/e);a(p)},0):(t.drawImage(f,u/e,u/e),a(p))}catch(X){null!=d&&d(X)}});f.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(c);var p=mxUtils.bind(this,function(){if(null!=
+this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(y,c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(p)}catch(U){null!=d&&d(U)}}),c,t)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<
+8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(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 g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var k=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;
+f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);l(a,k);l(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.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 k=Format.prototype.init;Format.prototype.init=function(){k.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=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},
-destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=t.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},
+destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},
function(a){b.editor.setAutosave(a);b.editor.autosave&&f.isModified()&&f.fileChanged()},{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="5px";a.appendChild(d);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";d.appendChild(l)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,
@@ -8384,19 +8394,19 @@ this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this
b,a))}};var l=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 l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){u.getModel().beginUpdate();try{var d=[],l=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&&
e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<p.length?null!=f?p.splice(f,1):p[c.index]=b:p.push(b);null!=c.size&&p.length>c.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&(u.setCellStyles(c.countProperty,p.length,u.getSelectionCells()),d.push(c.countProperty),l.push(p.length))}u.setCellStyles(a,b,u.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a],
-q=c.dependentPropsVals[a];if(q.length>b)q=q.slice(0,b);else for(var y=q.length;y<b;y++)q.push(g);q=q.join(",");u.setCellStyles(c.dependentProps[a],q,u.getSelectionCells());d.push(c.dependentProps[a]);l.push(q)}if("function"==typeof c.onChange)c.onChange(u,b);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute";
-c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,function(l){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+
-"')":b;f(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,c,d,l,p,e){null!=b&&(b=b.split(","),y.push({name:a,values:b,type:c,defVal:d,countProperty:l,parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(k,function(b){for(var g=p,k=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,k++;else break;var u={type:c,parentRow:p,index:k,isDeletable:!0,
-defVal:d,countProperty:l},k=q(a,"",u,0==k%2,e);f(a,d,u);g.parentNode.insertBefore(k,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,l,p){if(0<d){var e=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)e[g]=null!=b[g]?b[g]:null!=f?f:"";y.push({name:a,values:e,type:c,defVal:f,parentRow:l,flipBkg:p,size:d})}return document.createElement("div")}function g(a,b,c){var d=document.createElement("input");d.type=
-"checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function q(b,c,q,u,y){var m=q.dispName,B=q.type,v=document.createElement("tr");v.className="gePropRow"+(y?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);u=!1;null!=q.index&&(v.setAttribute("data-index",q.index),m=(null!=m?m:"")+"["+q.index+"]",u=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(m,
-null,m));u&&(n.style.textAlign="right");v.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==B)n.appendChild(l(b,c,q));else if("bool"==B||"boolean"==B)n.appendChild(g(b,c,q));else if("enum"==B){var x=q.enumList;for(y=0;y<x.length;y++)if(m=x[y],m.val==c){n.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(k,function(){var l=document.createElement("select");d(n,l);for(var p=0;p<x.length;p++){var e=
-x[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));l.appendChild(g)}l.value=c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);f(b,a,q)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==B?n.appendChild(p(b,c,q.subType,q.subDefVal,q.countProperty,v,y)):"staticArr"==B?n.appendChild(e(b,c,q.subType,q.subDefVal,q.size,
-v,y)):(n.innerHTML=c,mxEvent.addListener(n,"click",mxUtils.bind(k,function(){function l(){var a=p.value,a=0==a.length&&"string"!=B?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",B="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==B?parseInt(a):a)+"");f(b,a,q)}var p=document.createElement("input");d(n,p,!0);p.value=c;p.className="gePropEditor";"int"!=B&&"float"!=B||q.allowAuto||(p.type="number",p.step=
-"int"==B?"1":"any",null!=q.min&&(p.min=parseFloat(q.min)),null!=q.max&&(p.max=parseFloat(q.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));q.isDeletable&&(y=mxUtils.button("-",mxUtils.bind(k,function(a){f(b,"",q,q.index);mxEvent.consume(a)})),y.style.height="16px",y.style.width="25px",y.style["float"]="right",y.className="geColorBtn",n.appendChild(y));v.appendChild(n);return v}var k=this,u=this.editorUi.editor.graph,
-y=[];a.style.position="relative";a.style.padding="0";var B=document.createElement("table");B.style.whiteSpace="nowrap";B.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;v.appendChild(n);mxUtils.write(v,mxResources.get("property"));m.style.cursor="pointer";var x=function(){var b=B.querySelectorAll(".gePropNonHeaderRow"),c;if(k.editorUi.propertiesCollapsed){n.src=
-Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(O){}}else n.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(m,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;x()});m.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");
-m.appendChild(v);B.appendChild(m);var z=!1,A=!1,D;for(D in b)if(m=b[D],"function"!=typeof m.isVisible||m.isVisible(c)){var t=null!=c.style[D]?mxUtils.htmlEntities(c.style[D]+""):m.defVal;if("separator"==m.type)A=!A;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var F=m.dependentProps,I=[],H=[],v=0;v<F.length;v++){var N=c.style[F[v]];H.push(b[F[v]].subDefVal);I.push(null!=N?N.split(","):[])}m.dependentPropsDefVal=
-H;m.dependentPropsVals=I}B.appendChild(q(D,t,m,z,A));z=!z}}for(v=0;v<y.length;v++)for(m=y[v],b=m.parentRow,c=0;c<m.values.length;c++)D=q(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(D,b.nextSibling),b=D;a.appendChild(B);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();
+k=c.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var y=k.length;y<b;y++)k.push(g);k=k.join(",");u.setCellStyles(c.dependentProps[a],k,u.getSelectionCells());d.push(c.dependentProps[a]);l.push(k)}if("function"==typeof c.onChange)c.onChange(u,b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute";
+c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(l){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+
+"')":b;f(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,c,d,l,p,e){null!=b&&(b=b.split(","),y.push({name:a,values:b,type:c,defVal:d,countProperty:l,parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var g=p,t=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,t++;else break;var u={type:c,parentRow:p,index:t,isDeletable:!0,
+defVal:d,countProperty:l},t=k(a,"",u,0==t%2,e);f(a,d,u);g.parentNode.insertBefore(t,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,l,p){if(0<d){var e=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)e[g]=null!=b[g]?b[g]:null!=f?f:"";y.push({name:a,values:e,type:c,defVal:f,parentRow:l,flipBkg:p,size:d})}return document.createElement("div")}function g(a,b,c){var d=document.createElement("input");d.type=
+"checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function k(b,c,k,u,y){var B=k.dispName,m=k.type,v=document.createElement("tr");v.className="gePropRow"+(y?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);u=!1;null!=k.index&&(v.setAttribute("data-index",k.index),B=(null!=B?B:"")+"["+k.index+"]",u=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(B,
+null,B));u&&(n.style.textAlign="right");v.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==m)n.appendChild(l(b,c,k));else if("bool"==m||"boolean"==m)n.appendChild(g(b,c,k));else if("enum"==m){var A=k.enumList;for(y=0;y<A.length;y++)if(B=A[y],B.val==c){n.innerHTML=mxUtils.htmlEntities(mxResources.get(B.dispName,null,B.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(t,function(){var l=document.createElement("select");d(n,l);for(var p=0;p<A.length;p++){var e=
+A[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));l.appendChild(g)}l.value=c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);f(b,a,k)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==m?n.appendChild(p(b,c,k.subType,k.subDefVal,k.countProperty,v,y)):"staticArr"==m?n.appendChild(e(b,c,k.subType,k.subDefVal,k.size,
+v,y)):(n.innerHTML=c,mxEvent.addListener(n,"click",mxUtils.bind(t,function(){function l(){var a=p.value,a=0==a.length&&"string"!=m?0:a;k.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",m="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==m?parseInt(a):a)+"");f(b,a,k)}var p=document.createElement("input");d(n,p,!0);p.value=c;p.className="gePropEditor";"int"!=m&&"float"!=m||k.allowAuto||(p.type="number",p.step=
+"int"==m?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));k.isDeletable&&(y=mxUtils.button("-",mxUtils.bind(t,function(a){f(b,"",k,k.index);mxEvent.consume(a)})),y.style.height="16px",y.style.width="25px",y.style["float"]="right",y.className="geColorBtn",n.appendChild(y));v.appendChild(n);return v}var t=this,u=this.editorUi.editor.graph,
+y=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.style.whiteSpace="nowrap";m.style.width="100%";var B=document.createElement("tr");B.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;v.appendChild(n);mxUtils.write(v,mxResources.get("property"));B.style.cursor="pointer";var A=function(){var b=m.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){n.src=
+Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(O){}}else n.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(B,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});B.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");
+B.appendChild(v);m.appendChild(B);var x=!1,z=!1,C;for(C in b)if(B=b[C],"function"!=typeof B.isVisible||B.isVisible(c)){var E=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):B.defVal;if("separator"==B.type)z=!z;else{if("staticArr"==B.type)B.size=parseInt(c.style[B.sizeProperty]||b[B.sizeProperty].defVal)||0;else if(null!=B.dependentProps){for(var q=B.dependentProps,G=[],H=[],v=0;v<q.length;v++){var N=c.style[q[v]];H.push(b[q[v]].subDefVal);G.push(null!=N?N.split(","):[])}B.dependentPropsDefVal=
+H;B.dependentPropsVals=G}m.appendChild(k(C,E,B,x,z));x=!x}}for(v=0;v<y.length;v++)for(B=y[v],b=B.parentRow,c=0;c<B.values.length;c++)C=k(B.name,B.values[c],{type:B.type,parentRow:B.parentRow,isDeletable:B.isDeletable,index:c,defVal:B.defVal,countProperty:B.countProperty,size:B.size},0==c%2,B.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(m);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();
try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),p=0;p<l.length;p++)d=mxUtils.removeStylename(d,l[p]);var e=f.getModel().isVertex(c[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,
null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.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&&
@@ -8411,234 +8421,235 @@ function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("ti
(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 p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=document.createEventObject(a),b.type=a.type,b.canBubble=a.canBubble,b.cancelable=a.cancelable,b.view=a.view,b.detail=a.detail,b.screenX=a.screenX,b.screenY=a.screenY,b.clientX=a.clientX,b.clientY=a.clientY,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.metaKey=a.metaKey,b.button=
a.button,b.relatedTarget=a.relatedTarget}catch(J){}}p.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));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 f=this.layoutManager.getLayout;
-this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.fill=!0;c.gridSize="undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.allowGaps=b.allowGaps||0;c.resizeParent=!1;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==b.childLayout)return c=new mxTableLayout(this.graph),
-c.rows=b.tableRows||2,c.columns=b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop||0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==
-mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)}};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};var u=Graph.prototype.getSvg;Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&
-"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var b=u.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return b};var v=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return v.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(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}null!=this.globalUrlVars&&(b=this.globalUrlVars[a])}return b};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.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 z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.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++){var c=a.actions[b];if(null!=c.open)if(this.isCustomLink(c.open)){if(!this.customLinkClicked(c.open))return}else this.openLink(c.open)}this.model.beginUpdate();
-try{for(b=0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide,!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c=a.actions[b],f=[];null!=c.select&&this.isEnabled()&&(f=this.getCellsForAction(c.select),this.setSelectionCells(f));null!=c.highlight&&(f=this.getCellsForAction(c.highlight),
-this.highlightCells(f,c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(f=this.getCellsForAction(c.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=
-f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var l=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]=!0,l++);for(e=0;e<b.length;e++)if(f&&this.model.getParent(b[e])==this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||
-""):"",q=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var k=q=0;k<g.length&&q<l;k++)null!=p[g[k]]&&q++;q=q==l}}else q=0==a.length;q&&d.push(b[e])}}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,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,b,d,!1);null!=f&&(l.opacity=f);l.highlight(a);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition",
-"all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",
-this.svgShadowBlur);l.setAttribute("result","blur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",
-this.svgShadowOpacity);l.setAttribute("result","offsetColor");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2",
-"offsetBlur");d.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],null!=b&&(b.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+
-6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
-[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+
-"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=
-[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];
-mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[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.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+
-"/veeam/veeam.xml"];mxStencilRegistry.libraries.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 D=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,l,p,e,g,q){if(null!=c&&null==mxMarker.markers[c]){var k=this.getPackageForType(c);null!=k&&mxStencilRegistry.getStencil(k)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(y.value))));y.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(y.value))))}function f(b){function c(b,c,d){var l=b.getGraphBounds(),
-p=0,e=0,g=ja.get(),q=1/b.pageScale,k=z.checked;if(k)var q=parseInt(S.value),u=parseInt(T.value),q=Math.min(g.height*u/(l.height/b.view.scale),g.width*q/(l.width/b.view.scale));else q=parseInt(n.value)/(100*b.pageScale),isNaN(q)&&(f=1/b.pageScale,n.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*f);g.height=Math.ceil(g.height*f);q*=f;!k&&b.pageVisible?(l=b.getPageLayout(),p-=l.x*g.width,e-=l.y*g.height):k=!0;if(null==c){c=PrintDialog.createPrintPreview(b,q,g,0,p,e,k);c.pageSelector=
-!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var y=c.writeHead;c.writeHead=function(b){y.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var B=c.renderPage;c.renderPage=function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=B.apply(this,arguments);mxClient.NO_FO=
-p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=k;c.appendGraph(b,q,p,e,d,!0)}return c}var f=parseInt(ka.value)/100;isNaN(f)&&(f=1,ka.value="100 %");var f=.75*f,l=y.value,p=m.value,e=!k.checked,q=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;k.checked||(u=parseInt(l)-1,e=parseInt(p)-
-1);for(var B=u;B<=e;B++){var v=a.pages[B],l=v==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=!0,u=!1,A=null,x=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&(p=v.viewState.pageVisible,u=v.viewState.mathEnabled,A=v.viewState.background,x=v.viewState.backgroundImage);l.background=A;l.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;l.pageVisible=p;l.mathEnabled=u;var D=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==
-a?v.getName():"pagenumber"==a?B+1:D.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(v);l.model.setRoot(v.root)}q=c(l,q,B!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else q=c(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(e=q.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="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),q.closeDocument(),!q.mathEnabled&&b&&PrintDialog.printPreview(q))}var d=a.editor.graph,l=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));l.appendChild(p);var e=1,g=1,q=document.createElement("div");q.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");q.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));q.appendChild(p);mxUtils.br(q);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");q.appendChild(u);
-p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");q.appendChild(p);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","1");y.setAttribute("type","number");y.setAttribute("min","1");y.style.width="50px";q.appendChild(y);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));q.appendChild(p);var m=y.cloneNode(!0);q.appendChild(m);mxEvent.addListener(y,"focus",function(){u.checked=!0});mxEvent.addListener(m,
-"focus",function(){u.checked=!0});mxEvent.addListener(y,"change",c);mxEvent.addListener(m,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==a.pages[p]){g=p+1;y.value=g;m.value=g;break}y.setAttribute("max",e);m.setAttribute("max",e);1<e&&l.appendChild(q);var B=document.createElement("div");B.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type",
-"radio");v.setAttribute("name","printZoom");B.appendChild(v);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));B.appendChild(p);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";B.appendChild(n);mxEvent.addListener(n,"focus",function(){v.checked=!0});l.appendChild(B);var q=q.cloneNode(!1),z=v.cloneNode(!0);z.setAttribute("value","fit");v.setAttribute("checked","checked");p=document.createElement("div");
-p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(z);q.appendChild(p);B=document.createElement("table");B.style.display="inline-block";var A=document.createElement("tbody"),x=document.createElement("tr"),D=x.cloneNode(!0),t=document.createElement("td"),F=t.cloneNode(!0),I=t.cloneNode(!0),P=t.cloneNode(!0),N=t.cloneNode(!0),ba=t.cloneNode(!0);t.style.textAlign="right";P.style.textAlign="right";mxUtils.write(t,mxResources.get("fitTo"));var S=document.createElement("input");
-S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";F.appendChild(S);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));I.appendChild(p);mxUtils.write(P,mxResources.get("fitToBy"));var T=S.cloneNode(!0);N.appendChild(T);mxEvent.addListener(S,"focus",function(){z.checked=!0});mxEvent.addListener(T,"focus",function(){z.checked=!0});p=document.createElement("span");mxUtils.write(p,
-mxResources.get("fitToSheetsDown"));ba.appendChild(p);x.appendChild(t);x.appendChild(F);x.appendChild(I);D.appendChild(P);D.appendChild(N);D.appendChild(ba);A.appendChild(x);A.appendChild(D);B.appendChild(A);q.appendChild(B);l.appendChild(q);q=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));q.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ja=PageSetupDialog.addPageFormatPanel(p,
-"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));q.appendChild(p);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";q.appendChild(ka);l.appendChild(q);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-q.className="geBtn";a.editor.cancelFirst&&p.appendChild(q);a.isOffline()||(B=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),B.className="geBtn",p.appendChild(B));PrintDialog.previewEnabled&&(B=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),B.className="geBtn",p.appendChild(B));B=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});B.className=
-"geBtn gePrimaryBtn";p.appendChild(B);a.editor.cancelFirst||p.appendChild(q);l.appendChild(p);this.container=l};var y=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)):(y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};
-Editor.prototype.useCanvasForExport=!1;try{var B=document.createElement("canvas"),F=new Image;F.onload=function(){try{B.getContext("2d").drawImage(F,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(I){}};F.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(x){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.9.8";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml=
+this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.fill=!0;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.allowGaps=b.allowGaps||0;c.resizeParent=!1;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
+b.childLayout)return c=new mxTableLayout(this.graph),c.rows=b.tableRows||2,c.columns=b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop||
+0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)}};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};var u=Graph.prototype.getSvg;
+Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var b=u.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return b};var v=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return v.apply(this,arguments)&&!mxClient.IS_SF};var t=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=
+t.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}null!=this.globalUrlVars&&(b=this.globalUrlVars[a])}return b};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){z.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;
+!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):
+(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var x=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){x.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<
+a.actions.length;b++){var c=a.actions[b];if(null!=c.open)if(this.isCustomLink(c.open)){if(!this.customLinkClicked(c.open))return}else this.openLink(c.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide,!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c=
+a.actions[b],f=[];null!=c.select&&this.isEnabled()&&(f=this.getCellsForAction(c.select),this.setSelectionCells(f));null!=c.highlight&&(f=this.getCellsForAction(c.highlight),this.highlightCells(f,c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(f=this.getCellsForAction(c.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=
+function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var l=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]=!0,l++);for(e=0;e<b.length;e++)if(f&&this.model.getParent(b[e])==
+this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var t=k=0;t<g.length&&k<l;t++)null!=p[g[t]]&&k++;k=k==l}}else k=0==a.length;k&&d.push(b[e])}}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,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,
+b,d,!1);null!=f&&(l.opacity=f);l.highlight(a);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition","all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var l=null!=f.createElementNS?
+f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");d.appendChild(l);l=null!=f.createElementNS?
+f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");d.appendChild(l);
+l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");d.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],null!=b&&(b.setAttribute("filter",
+"url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
+mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
+[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
+[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];
+mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[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.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+
+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.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 C=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,l,p,e,g,k){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return C.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){B.value=Math.max(1,
+Math.min(e,Math.max(parseInt(B.value),parseInt(u.value))));u.value=Math.max(1,Math.min(e,Math.min(parseInt(B.value),parseInt(u.value))))}function f(b){function c(b,c,d){var l=b.getGraphBounds(),p=0,e=0,g=ja.get(),k=1/b.pageScale,t=x.checked;if(t)var k=parseInt(S.value),u=parseInt(T.value),k=Math.min(g.height*u/(l.height/b.view.scale),g.width*k/(l.width/b.view.scale));else k=parseInt(n.value)/(100*b.pageScale),isNaN(k)&&(f=1/b.pageScale,n.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*
+f);g.height=Math.ceil(g.height*f);k*=f;!t&&b.pageVisible?(l=b.getPageLayout(),p-=l.x*g.width,e-=l.y*g.height):t=!0;if(null==c){c=PrintDialog.createPrintPreview(b,k,g,0,p,e,t);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var y=c.writeHead;c.writeHead=function(b){y.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var B=c.renderPage;c.renderPage=
+function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=B.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=t;c.appendGraph(b,k,p,e,d,!0)}return c}var f=parseInt(ka.value)/100;isNaN(f)&&(f=
+1,ka.value="100 %");var f=.75*f,l=u.value,p=B.value,e=!t.checked,k=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var y=0,e=a.pages.length-1;t.checked||(y=parseInt(l)-1,e=parseInt(p)-1);for(var m=y;m<=e;m++){var v=a.pages[m],l=v==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=!0,y=!1,z=null,C=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&(p=v.viewState.pageVisible,y=v.viewState.mathEnabled,z=v.viewState.background,C=
+v.viewState.backgroundImage);l.background=z;l.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;l.pageVisible=p;l.mathEnabled=y;var A=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?m+1:A.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(v);l.model.setRoot(v.root)}k=c(l,k,m!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else k=c(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
+(k.mathEnabled&&(e=k.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="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,
+l=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));l.appendChild(p);var e=1,g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name",
+"pages-printdialog");k.appendChild(t);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));k.appendChild(p);mxUtils.br(k);var y=t.cloneNode(!0);t.setAttribute("checked","checked");y.setAttribute("value","range");k.appendChild(y);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");k.appendChild(p);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min",
+"1");u.style.width="50px";k.appendChild(u);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));k.appendChild(p);var B=u.cloneNode(!0);k.appendChild(B);mxEvent.addListener(u,"focus",function(){y.checked=!0});mxEvent.addListener(B,"focus",function(){y.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(B,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==a.pages[p]){g=p+1;u.value=g;B.value=g;break}u.setAttribute("max",
+e);B.setAttribute("max",e);1<e&&l.appendChild(k);var m=document.createElement("div");m.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");m.appendChild(v);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));m.appendChild(p);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width=
+"50px";m.appendChild(n);mxEvent.addListener(n,"focus",function(){v.checked=!0});l.appendChild(m);var k=k.cloneNode(!1),x=v.cloneNode(!0);x.setAttribute("value","fit");v.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(x);k.appendChild(p);m=document.createElement("table");m.style.display="inline-block";var z=document.createElement("tbody"),C=document.createElement("tr"),A=C.cloneNode(!0),
+q=document.createElement("td"),E=q.cloneNode(!0),G=q.cloneNode(!0),P=q.cloneNode(!0),N=q.cloneNode(!0),ba=q.cloneNode(!0);q.style.textAlign="right";P.style.textAlign="right";mxUtils.write(q,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";E.appendChild(S);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));
+G.appendChild(p);mxUtils.write(P,mxResources.get("fitToBy"));var T=S.cloneNode(!0);N.appendChild(T);mxEvent.addListener(S,"focus",function(){x.checked=!0});mxEvent.addListener(T,"focus",function(){x.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));ba.appendChild(p);C.appendChild(q);C.appendChild(E);C.appendChild(G);A.appendChild(P);A.appendChild(N);A.appendChild(ba);z.appendChild(C);z.appendChild(A);m.appendChild(z);k.appendChild(m);l.appendChild(k);
+k=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));k.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ja=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));k.appendChild(p);var ka=document.createElement("input");
+ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";k.appendChild(ka);l.appendChild(k);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&p.appendChild(k);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),m.className=
+"geBtn",p.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),m.className="geBtn",p.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});m.className="geBtn gePrimaryBtn";p.appendChild(m);a.editor.cancelFirst||p.appendChild(k);l.appendChild(p);this.container=l};var y=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)):(y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=
+this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var B=document.createElement("canvas"),E=new Image;E.onload=function(){try{B.getContext("2d").drawImage(E,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=a&&6<a.length}catch(G){}};E.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(A){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="11.0.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";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.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=
a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+
-encodeURIComponent(e.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:
+encodeURIComponent(e.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:
5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(p){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function f(a,b){var c=l;l+=b;return a.substring(c,
-l)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var p=f(a,4);if(null!=b&&b(l-8,p,c))break;value=f(a,c);f(a,4);if("IEND"==p)break}while(c)}};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml=
-"<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+l)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var p=f(a,4);if(null!=b&&b(l-8,p,c))break;value=f(a,c);f(a,4);if("IEND"==p)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.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.maxTextBytes=5E5;EditorUi.prototype.currentFile=
null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(v){}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(v){}try{b=document.createElement("canvas");b.width=b.height=1;var d=
+0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};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(v){}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(v){}})();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(a){return this.isOfflineApp()||!navigator.onLine||
-!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,l){var p=!1;this.active||(d.call(this,c),this.active=!0,null!=l&&(p=document.createElement("div"),p.style.position="absolute",p.style.whiteSpace="nowrap",p.style.background="#4B4243",p.style.color="white",
-p.style.fontFamily="Helvetica, Arial",p.style.fontSize="9pt",p.style.padding="6px",p.style.paddingLeft="10px",p.style.paddingRight="10px",p.style.zIndex=2E9,p.style.left=Math.max(0,a)+"px",p.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(p.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(p.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&
-(l+="..."),p.innerHTML=l,c.appendChild(p),f.status=p,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(p.style.left=Math.round(Math.max(0,a-p.offsetWidth/2))+"px",p.style.top=Math.round(Math.max(0,b+70-p.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return a}),p=!0);return p};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&(f.status.parentNode.removeChild(f.status),
+!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,l){var e=!1;this.active||(d.call(this,c),this.active=!0,null!=l&&(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"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&
+(l+="..."),e.innerHTML=l,c.appendChild(e),f.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,l)}));this.stop();return a}),e=!0);return e};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&(f.status.parentNode.removeChild(f.status),
f.status=null)};f.pause=function(){return function(){}};return f};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};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==
a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=
-function(b){var c=a.apply(this,arguments);if(null==c)try{var f=b.indexOf("&lt;mxfile ");if(0<=f){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>f&&(c=b.substring(f,d+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(A){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=
+function(b){var c=a.apply(this,arguments);if(null==c)try{var f=b.indexOf("&lt;mxfile ");if(0<=f){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>f&&(c=b.substring(f,d+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(z){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=
a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,f=a.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<f.length||1==f.length&&f[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=f.length-1;0<=d;d--){var e=this.updatePageRoot(new DiagramPage(f[d]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[d+1]));b.model.execute(new ChangePage(this,e,0==d?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(d=0;d<c.length;d++)b.model.execute(new ChangePage(this,c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,m,n,y){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;n=null!=n?n:!0;var f,l=null;null==c||
-c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":l=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){var q=Graph.zapGremlins(mxUtils.getXml(a)),p=Graph.compress(q);if(Graph.decompress(p)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,p);p=a.ownerDocument.createElement("mxfile");p.appendChild(q)}y?(p=p.cloneNode(!0),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),
-p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type"),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("host",window.location.hostname),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&p.setAttribute("type",a));a=mxUtils.getXml(p);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=
-this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,f,l);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,l);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(c=Graph.compressNode(c),mxUtils.setTextContent(this.currentPage.node,c),c=this.fileNode.cloneNode(!1),
-b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){if(this.currentPage!=this.pages[f]&&this.pages[f].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[f].root));this.editor.graph.saveViewState(this.pages[f].viewState,d);mxUtils.setTextContent(this.pages[f].node,Graph.compressNode(d));delete this.pages[f].needsUpdate}c.appendChild(this.pages[f].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],
-f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=
-mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(q){a[EditorUi.DIFF_INSERT][b].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var f in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][f];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];
-if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete d.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][f]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};
-EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+
-"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=
-this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),
-mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,k,m,n){e=null!=e?e:!0;k=null!=k?k: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,l=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==
-a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(l.root)}a=this.createFileData(k,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,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/
-p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(l=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",p)}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?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);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="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){b=EditorUi.drawHost+"/js/viewer.min.js";
-null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==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="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+
-EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=b&&0<b.length)throw a=mxResources.get("invalidOrMissingFile"),b=b[0].getElementsByTagName("div"),0<b.length&&(a=mxUtils.getTextContent(b[0])),Error(a);b=null!=a?this.editor.extractGraphModel(a,
-!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(a=0;a<b.length;a++){null==b[a].getAttribute("id")&&b[a].setAttribute("id",a);var f=new DiagramPage(b[a]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(f);null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(c=f)}this.currentPage=null!=c?
-c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=
-function(a){var 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)||/(\.drawio)$/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,m,n){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),l=f+"."+a;if("xml"==a){var p='<?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(l,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?l=f+
-".png":"jpeg"==a&&(l=f+".jpg"),this.saveRequest(l,a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var l=this.createDownloadRequest(b,a,d,c,k,e,m,n);this.editor.graph.pageVisible=f;return l}catch(K){this.handleError(K)}}));else{var q=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(q)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var z=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(z);this.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=f+".svg",q=this.getFileData(!1,
-!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,m){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var l="",p="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==g&&(p="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=
-0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){l="&from="+g;break}g=this.editor.graph.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");return new mxXmlRequest(EXPORT_URL,"format="+b+l+p+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+(null!=k?"&scale="+k:"")+(null!=m?"&border="+m:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=
-function(a,b,c){var f=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return f};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));
-if(null!=a.update){var l=null!=a.interval?parseInt(a.interval):6E4,e=null,p=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(e);
-e=window.setTimeout(p,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();p()}));g();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var l=a.url;/^https?:\/\//.test(l)&&!this.editor.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));this.loadUrl(l,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||f.warningImage,a.tooltip,
-a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,e=f.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=e.getCell(a.getAttribute("id"));if(null!=k){try{var m=a.getAttribute("value");if(null!=m){var y=mxUtils.parseXml(m).documentElement;if(null!=
-y)if("1"==y.getAttribute("replace-value"))e.setValue(k,y);else for(var B=y.attributes,n=0;n<B.length;n++)f.setAttributeForCell(k,B[n].nodeName,0<B[n].nodeValue.length?B[n].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+k.id+": "+L)}try{var x=a.getAttribute("style");null!=x&&f.model.setStyle(k,x)}catch(L){null!=window.console&&console.log("Error in style for "+k.id+": "+L)}try{var t=a.getAttribute("icon");if(null!=t){var H=0<t.length?JSON.parse(t):null;null!=H&&H.append||
-f.removeCellOverlays(k);null!=H&&f.addCellOverlay(k,b(H))}}catch(L){null!=window.console&&console.log("Error in icon for "+k.id+": "+L)}try{var E=a.getAttribute("geometry");if(null!=E){var E=JSON.parse(E),G=f.getCellGeometry(k);if(null!=G){G=G.clone();for(key in E){var J=parseFloat(E[key]);"dx"==key?G.x+=J:"dy"==key?G.y+=J:"dw"==key?G.width+=J:"dh"==key?G.height+=J:G[key]=parseFloat(E[key])}f.model.setGeometry(k,G)}}}catch(L){null!=window.console&&console.log("Error in icon for "+k.id+": "+L)}}}else if("model"==
-a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=
-a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}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 l=new Date,f=l.getFullYear(),e=l.getMonth()+1,g=l.getDate(),k=l.getHours(),y=l.getMinutes(),l=l.getSeconds(),c=c+(" "+(f+"-"+e+"-"+g+"-"+k+"-"+y+"-"+l));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=
-function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&
-0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);
-a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||
-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":
-"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(A){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(A){}}catch(A){this.fileLoadedError=A;null!=window.console&&console.log("error in fileLoaded:",a,A);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!=A&&null!=A.message?":err:"+encodeURIComponent(A.message):"")+(null!=A&&null!=A.stack?"&stack="+encodeURIComponent(A.stack):"")}catch(z){}var l=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):f()});b?l():this.handleError(A,mxResources.get("errorLoadingFile"),
-l,!0)}else f();return d};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var l=0;l<a.length;l++){this.updatePageRoot(a[l]);var e=a[l].node.cloneNode(!1);e.removeAttribute("name");d.root=a[l].root;var g=f.encode(d);this.editor.graph.saveViewState(a[l].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");e.appendChild(g);null!=b&&(b.eltCount+=e.getElementsByTagName("*").length,
-b.nodeCount+=e.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(e,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?d&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,
-b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var l=a.attributes[f].name,e=null!=b?b(a,l,a.attributes[f].value,!0):a.attributes[f].value;null!=e&&(d^=this.hashValue(l,b,c)+this.hashValue(e,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<
-0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};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"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var l=0;l<b.length;l++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=
-a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,
-a.title||"",!0,!1,!0)}))})(b[l]);c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var p=g.parentNode.previousSibling;c=p.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||
-(k.style.backgroundColor="inherit");p.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});
-null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var x=this.editor.graph,t=null,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=m.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",
-mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",k.insertBefore(t,k.firstChild),p.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),p.style.paddingRight=18*k.childNodes.length+"px")})):null==n&&(n=m.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),k.insertBefore(n,k.firstChild),
-mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(p.style.paddingRight=18*k.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(c)})),p.style.paddingRight=18*k.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var p=x.getCellGeometry(a[l]);null!=p&&
-p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);E(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;G(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="hidden",g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",x.panningManager.stop(),
-x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,
-function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",g.style.backgroundColor="",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){g.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,l,p,k,q,y,m,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,k,q),c)],c[0].vertex=!0,G(c,new mxRectangle(0,
-0,k,q),a,mxEvent.isAltDown(a)?null:y.substring(0,y.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,B=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(l.documentElement));e(p,g);b=b.concat(p);E(a);this.spinner.stop();u=!0}catch(N){}else if("mxfile"==l.documentElement.nodeName)try{for(var k=l.documentElement.getElementsByTagName("diagram"),
-l=0;l<k.length;l++){var p=mxUtils.getTextContent(k[l]),q=this.stringToCells(Graph.decompress(p)),y=this.editor.graph.getBoundingBoxFromGeometry(q);G(q,new mxRectangle(0,0,y.width,y.height),a)}u=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}}u||(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!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?
-this.importVisio(n,function(a){B(a,"text/xml")},null,y):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,y)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?B(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",
-function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",H);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&H(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,
-"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}p.appendChild(k);p.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
-function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(l+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
-function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
-"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
-"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",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 b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);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 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,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=
-c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#188038";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';
-mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=a&&null!=a.error?a.error:a;if(null!=l||null!=
-b){var g=mxUtils.htmlEntities(mxResources.get("unknownError")),p=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=l)if(null!=l.retry&&(p=mxResources.get("cancel"),k=function(){f();l.retry()}),404==l.code||404==l.status||403==l.code){var g=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=e?e:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+
-", "+this.drive.user.email+")":"")),m=window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==l.code||404==l.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,g,mxResources.get("openInNewWindow"),
-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,d,e)}),k,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else null!=l.message?g=mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?
-g=mxUtils.htmlEntities(l.response.error):"undefined"!==window.App&&(l.code==App.ERROR_TIMEOUT?g=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY&&(g=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,g,p,c,k,null,null,null,null,null,null,null,d?c:null)}else null!=c&&c()};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,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e);this.showDialog(a.container,340,90,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return 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(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.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));
-c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,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{var f=document.createElement("a"),l=!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]+)\./),l=65==(g?parseInt(g[2],10):!1)?!1:l;if(l||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));l?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(D){}}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),
-l=0;l<f;++l){for(var g=1024*l,k=Math.min(g+1024,d),y=Array(k-g),m=0;g<k;++m,++g)y[m]=c[g].charCodeAt(0);e[l]=new Uint8Array(y)}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(F){this.handleError(F)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,4<e&&(!g||6>e)?3:4,
-a,c,d);this.showDialog(b.container,420,1==e?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||null==d.document?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&&null!=d.document||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,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,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(x){this.handleError(x)}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(x){this.handleError(x)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,1==f?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,
-m,n,y){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 l=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==y?"_blank":"self"==y?"_top":null);d&&this.editor.graph.addSvgShadow(l);var p=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(p,"svg",d,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,q,this.thumbImageCache)):q(l)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,k,m){g=null!=g?g:!0;var f=document.createElement("input");
-f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=k;null!=m&&f.setAttribute("name",m);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(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(){g.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",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();g.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);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,m){var f=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&l.push("edit="+encodeURIComponent(e)),g&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),m||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,
-null,null,null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,m,n,y,B){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=[];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);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=y&&0<y.length&&(f.edit=y);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):"";B(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+
-"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,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 g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText=
-"margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");e=l.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(l);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var k=this.getCurrentFile();
-null==c&&null!=k&&k.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),g.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));e.setAttribute("checked","checked");null==c&&l.setAttribute("disabled","disabled");f.appendChild(g);var m=this.addLinkSection(f),n=this.addCheckbox(f,
-mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");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="100%";f.appendChild(u);var t=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(f,mxResources.get("allPages"),g,!g),E=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("lightbox"),
-!0),J=this.addEditButton(f,G),C=J.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&G.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(l.checked?c:null,n.checked,u.value,m.getTarget(),m.getColor(),t.checked,H.checked,E.checked,G.checked,J.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 l=document.createElement("h3");mxUtils.write(l,a||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var p=this.getCurrentFile(),l="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=p&&p.constructor==window.DriveFile&&
-!b){a=80;var l="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));k.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(p.getId())}));q.style.marginTop=
-"12px";q.className="geBtn";k.appendChild(q);f.appendChild(k);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));k.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,
-mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,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 u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==p||p.constructor!=window.DriveFile||b)t=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var v=this.addCheckbox(f,mxResources.get("lightbox"),!0),G=this.addEditButton(f,v),J=G.getEditInput(),C=this.addCheckbox(f,mxResources.get("layers"),
-!0);C.style.marginLeft=J.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(C.removeAttribute("disabled"),J.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&v.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==t?
-!0:t.checked,v.checked,G.getLink(),C.checked,null!=m?m.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),l);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)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,
-mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(e?"10":"4")+"px";f.appendChild(g);if(e){mxUtils.write(f,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";f.appendChild(l);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 k=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,n=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=n&&(n.style.marginBottom="16px");a=
-new CustomDialog(this,f,mxUtils.bind(this,function(){var a=parseInt(l.value)/100||1,b=parseInt(p.value)||0;c(!k.checked,null!=m?m.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(e?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,k,m){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,p="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-f.appendChild(q);mxUtils.write(f,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";f.appendChild(n);mxUtils.write(f,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
-"0";f.appendChild(u);mxUtils.br(f);var t=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");g&&(f.appendChild(z),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(v,"change",function(){v.checked?
-z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));l.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var A=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(f.appendChild(C),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(d=0;d<c.length;d++)b.model.execute(new ChangePage(this,c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,m,n,y,B){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;n=null!=n?n:!0;var f,l=null;null==
+c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":l=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(B){var t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());t.appendChild(a)}else{t=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(t);if(Graph.decompress(p)!=t)return t;t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(t)}y?
+(p=p.cloneNode(!0),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type"),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("host",window.location.hostname),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,
+null!=a&&p.setAttribute("type",a),B&&p.setAttribute("compressed","false"));B=B?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))B=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,f,l);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,b,d,null,m,n,l);return B};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=
+b?b:!1;var f=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(c?(EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(f)):(f=Graph.compressNode(f),mxUtils.setTextContent(this.currentPage.node,f)),f=this.fileNode.cloneNode(!1),b)f.appendChild(this.currentPage.node);else for(b=0;b<this.pages.length;b++)this.currentPage!=this.pages[b]&&(this.pages[b].needsUpdate?(a=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root)),
+this.editor.graph.saveViewState(this.pages[b].viewState,a),c?(EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a)):mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(a)),delete this.pages[b].needsUpdate):c&&(a=Editor.parseDiagramNode(this.pages[b].node),EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a))),f.appendChild(this.pages[b].node);return f};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=
+a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);
+null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(t){a[EditorUi.DIFF_INSERT][b].data=t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var f in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][f];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),
+null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete d.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][f]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,
+b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&
+c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?
+this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,
+!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,k,m,n,y){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1,y);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,l=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);
+g.model.setRoot(l.root)}a=this.createFileData(k,g,n,window.location.href,a,b,c,d,e,m,y);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,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),
+0<b.length&&(l=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",p)}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?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);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="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){b=EditorUi.drawHost+"/js/viewer.min.js";null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
+toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==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="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=
+this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=b&&0<b.length)throw a=mxResources.get("invalidOrMissingFile"),b=b[0].getElementsByTagName("div"),0<b.length&&(a=mxUtils.getTextContent(b[0])),Error(a);b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||
+1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(a=0;a<b.length;a++){null==b[a].getAttribute("id")&&b[a].setAttribute("id",a);var f=new DiagramPage(b[a]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(f);null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(c=f)}this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&
+null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(a){var 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)||/(\.drawio)$/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,m,n){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),l=f+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+
+this.getFileData(!0,null,null,null,d,e,null,null,null,b);this.saveData(l,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?l=f+".png":"jpeg"==a&&(l=f+".jpg"),this.saveRequest(l,a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var l=this.createDownloadRequest(b,
+a,d,c,k,e,m,n);this.editor.graph.pageVisible=f;return l}catch(K){this.handleError(K)}}));else{var t=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var x=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(x);
+this.convertImages(x,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=f+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,m){var f=this.editor.graph.getGraphBounds();
+c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var l="",p="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==g&&(p="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){l="&from="+g;break}g=this.editor.graph.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");return new mxXmlRequest(EXPORT_URL,
+"format="+b+l+p+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+(null!=k?"&scale="+k:"")+(null!=m?"&border="+m:""))};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,l=null,p=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(l);l=window.setTimeout(p,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();p()}));g();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
+!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.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||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:
+null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,e=f.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=e.getCell(a.getAttribute("id"));if(null!=k){try{var m=a.getAttribute("value");if(null!=m){var y=mxUtils.parseXml(m).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))e.setValue(k,y);else for(var B=y.attributes,n=0;n<B.length;n++)f.setAttributeForCell(k,B[n].nodeName,0<B[n].nodeValue.length?B[n].nodeValue:null)}}catch(L){null!=
+window.console&&console.log("Error in value for "+k.id+": "+L)}try{var A=a.getAttribute("style");null!=A&&f.model.setStyle(k,A)}catch(L){null!=window.console&&console.log("Error in style for "+k.id+": "+L)}try{var q=a.getAttribute("icon");if(null!=q){var H=0<q.length?JSON.parse(q):null;null!=H&&H.append||f.removeCellOverlays(k);null!=H&&f.addCellOverlay(k,b(H))}}catch(L){null!=window.console&&console.log("Error in icon for "+k.id+": "+L)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),
+I=f.getCellGeometry(k);if(null!=I){I=I.clone();for(key in F){var J=parseFloat(F[key]);"dx"==key?I.x+=J:"dy"==key?I.y+=J:"dw"==key?I.width+=J:"dh"==key?I.height+=J:I[key]=parseFloat(F[key])}f.model.setGeometry(k,I)}}}catch(L){null!=window.console&&console.log("Error in icon for "+k.id+": "+L)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}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(),l=e.getMonth()+1,g=e.getDate(),k=e.getHours(),y=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(f+"-"+l+"-"+g+"-"+k+"-"+y+"-"+e));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");
+this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();
+a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();
+this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
+1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError=z;null!=window.console&&(console.error(z),console.log("error in fileLoaded:",a,z));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!=z&&null!=z.message?":err:"+encodeURIComponent(z.message):"")+(null!=z&&null!=z.stack?"&stack="+encodeURIComponent(z.stack):
+"")}catch(x){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):f()});b?e():this.handleError(z,mxResources.get("errorLoadingFile"),e,!0)}else f();return d};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);
+var l=a[e].node.cloneNode(!1);l.removeAttribute("name");d.root=a[e].root;var g=f.encode(d);this.editor.graph.saveViewState(a[e].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");l.appendChild(g);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?d&&"mxCell"==a.nodeName&&
+"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,l=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=l&&(d^=this.hashValue(e,
+b,c)+this.hashValue(l,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};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"),f.className="geDropTarget",
+mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var l=0;l<b.length;l++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||
+"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[l]);c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var p=g.parentNode.previousSibling;c=p.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&
+p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");p.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin=
+"0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var q=this.editor.graph,G=null,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,
+b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=G&&null!=G.parentNode&&G.parentNode.removeChild(G),G=m.cloneNode(!1),G.setAttribute("src",Editor.spinImage),G.setAttribute("title",mxResources.get("saving")),G.style.cursor="default",G.style.marginRight="2px",G.style.marginTop="-2px",k.insertBefore(G,k.firstChild),p.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=G&&null!=
+G.parentNode&&(G.parentNode.removeChild(G),p.style.paddingRight=18*k.childNodes.length+"px")})):null==n&&(n=m.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),k.insertBefore(n,k.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(p.style.paddingRight=18*k.childNodes.length+"px",n.parentNode.removeChild(n),
+n=null)});mxEvent.consume(c)})),p.style.paddingRight=18*k.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var p=q.getCellGeometry(a[l]);null!=p&&p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);F(d);null!=
+f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=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 b=q.getSelectionCells(),c=q.view.getBounds(b),d=q.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=q.view.translate.x;c.y-=q.view.translate.y;I(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,
+function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",g.style.backgroundColor="#f1f3f4",g.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&&
+(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",g.style.backgroundColor="",g.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&
+(q.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){g.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
+function(c,d,l,p,k,t,y,m,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,k,t),c)],c[0].vertex=!0,I(c,new mxRectangle(0,0,k,t),a,mxEvent.isAltDown(a)?null:y.substring(0,y.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var B=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var l=
+mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(l.documentElement));e(p,g);b=b.concat(p);F(a);this.spinner.stop();B=!0}catch(N){}else if("mxfile"==l.documentElement.nodeName)try{for(var k=l.documentElement.getElementsByTagName("diagram"),l=0;l<k.length;l++){var t=this.stringToCells(Editor.getDiagramNodeXml(k[l])),y=this.editor.graph.getBoundingBoxFromGeometry(t);I(t,new mxRectangle(0,0,y.width,y.height),a)}B=!0}catch(N){null!=window.console&&
+console.log("error in drop handler:",N)}}B||(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!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?this.importVisio(n,function(a){u(a,"text/xml")},null,y):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,y)&&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(g,"dragleave",function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,
+k.firstChild);mxEvent.addListener(m,"click",H);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&H(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",
+mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}p.appendChild(k);p.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");
+b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=
+64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=
+38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor=
+"#cccccc",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 b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);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 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,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==
+this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";
+var b=document.createElement("a");b.className="geTitle";b.style.color="#188038";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);
+return a};EditorUi.prototype.handleError=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=a&&null!=a.error?a.error:a;if(null!=l||null!=b){var g=mxUtils.htmlEntities(mxResources.get("unknownError")),p=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=l)if(null!=l.retry&&(p=mxResources.get("cancel"),k=function(){f();l.retry()}),404==l.code||404==l.status||403==l.code){var g=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):
+mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=e?e:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),m=window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&
+"fileAccess"==a.error.data[0].reason)||404==l.code||404==l.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,g,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,d,e)}),k,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),
+mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else null!=l.message?g=mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?g=mxUtils.htmlEntities(l.response.error):"undefined"!==window.App&&(l.code==App.ERROR_TIMEOUT?g=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY&&(g=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,g,p,c,k,null,null,null,null,null,null,null,d?c:null)}else null!=c&&c()};
+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,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e);this.showDialog(a.container,340,90,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);
+this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return 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(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.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,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{var f=document.createElement("a"),l=!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]+)\./),l=65==(g?parseInt(g[2],10):!1)?!1:l;if(l||this.isOffline()){f.href=
+URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));l?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(C){}}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),l=0;l<f;++l){for(var g=1024*l,k=Math.min(g+1024,d),y=Array(k-g),m=0;g<k;++m,++g)y[m]=c[g].charCodeAt(0);e[l]=new Uint8Array(y)}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("<pre>"+mxUtils.htmlEntities(a,!1)+"<pre>"),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(E){this.handleError(E)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,4<e&&(!g||6>e)?3:4,a,c,d);this.showDialog(b.container,420,1==e?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||null==d.document?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&&null!=d.document||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,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,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(A){this.handleError(A)}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(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,1==f?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,m,n,y){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 l=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==y?"_blank":
+"self"==y?"_top":null);d&&this.editor.graph.addSvgShadow(l);var p=this.getBaseFilename()+".svg",t=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(p,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,t,this.thumbImageCache)):
+t(l)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,k,m){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=k;null!=m&&f.setAttribute("name",m);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),
+c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(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(){g.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",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);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,m){var f=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&l.push("edit="+encodeURIComponent(e)),g&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());
+a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),m||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
+"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,m,n,y,B){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=[];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);
+m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=y&&0<y.length&&(f.edit=y);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):"";B(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,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 g=document.createElement("div");
+g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");e=l.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(l);
+k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var p=this.getCurrentFile();null==c&&null!=p&&p.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")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));e.setAttribute("checked",
+"checked");null==c&&l.setAttribute("disabled","disabled");f.appendChild(g);var m=this.addLinkSection(f),n=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");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="100%";f.appendChild(u);var q=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(f,mxResources.get("allPages"),
+g,!g),F=this.addCheckbox(f,mxResources.get("layers"),!0),I=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,I),D=J.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&I.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(l.checked?c:null,n.checked,
+u.value,m.getTarget(),m.getColor(),q.checked,H.checked,F.checked,I.checked,J.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 l=document.createElement("h3");mxUtils.write(l,a||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var k=this.getCurrentFile(),l="https://desk.draw.io/support/solutions/articles/16000051941";
+a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var l="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));p.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));
+m.style.marginTop="12px";m.className="geBtn";p.appendChild(m);f.appendChild(p);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check"));p.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
+null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,t=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",f.appendChild(n),mxUtils.write(f,mxResources.get("height")+
+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=d+"px",f.appendChild(t),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var q=null;if(null==k||k.constructor!=window.DriveFile||b)q=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var v=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,v),J=I.getEditInput(),D=this.addCheckbox(f,mxResources.get("layers"),
+!0);D.style.marginLeft=J.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(D.removeAttribute("disabled"),J.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&v.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==q?
+!0:q.checked,v.checked,I.getLink(),D.checked,null!=n?n.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),l);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,
+mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(e?"10":"4")+"px";f.appendChild(g);if(e){mxUtils.write(f,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";f.appendChild(l);mxUtils.write(f,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type",
+"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";f.appendChild(k);mxUtils.br(f)}var p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,n=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=n&&(n.style.marginBottom="16px");a=
+new CustomDialog(this,f,mxUtils.bind(this,function(){var a=parseInt(l.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=m?m.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(e?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,k,m){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,p="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 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 u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
+"0";f.appendChild(u);mxUtils.br(f);var q=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");g&&(f.appendChild(x),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(v,"change",function(){v.checked?
+x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));l.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var z=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(f.appendChild(D),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=
26);var L=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),K=null!=this.pages&&1<this.pages.length,R=this.addCheckbox(f,K?mxResources.get("allPages"):"",K,!K,null,"jpeg"!=m);R.style.marginLeft="24px";R.style.marginBottom="16px";K||(R.style.display="none");mxEvent.addListener(L,"change",function(){L.checked&&K?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")});k&&K||R.setAttribute("disabled","disabled");var V=document.createElement("select");V.style.maxWidth=
"260px";V.style.marginLeft="8px";V.style.marginRight="10px";V.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));V.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));V.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));V.appendChild(a);"svg"==m&&(mxUtils.write(f,
-mxResources.get("links")+":"),f.appendChild(V),mxUtils.br(f),mxUtils.br(f),p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;e(n.value,t.checked,!v.checked,A.checked,L.checked,C.checked,u.value,z.checked,!R.checked,V.value)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,null,null,null,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.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 g=this.editor.graph;if(null!=b){var l=document.createElement("h3");mxUtils.write(l,b);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(l)}var p=this.addCheckbox(f,mxResources.get("fit"),!0),k=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),
-!0),u=this.addEditButton(f,n),t=u.getEditInput(),v=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),v,!v);E.style.marginLeft=t.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(v&&E.removeAttribute("disabled"),t.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled",
-"disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(p.checked,k.checked,m.checked,n.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,m){function f(b){var f=" ",p="";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('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var q="";c&&(q=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');k('<img src="'+b+'"'+q+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");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),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(),l=f.getElementsByTagName("a");if(null!=l)for(var p=0;p<l.length;p++){var q=l[p].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==l[p].getAttribute("target")&&l[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var m=" ",n="";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('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+m+"/>")}))}else n="",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('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=n&&f.setAttribute("style",n),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");
+mxResources.get("links")+":"),f.appendChild(V),mxUtils.br(f),mxUtils.br(f),p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;e(t.value,q.checked,!v.checked,z.checked,L.checked,D.checked,u.value,x.checked,!R.checked,V.value)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",
+!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var l=document.createElement("h3");mxUtils.write(l,b);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(l)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),
+!0),u=this.addEditButton(f,n),q=u.getEditInput(),v=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=q.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(v&&F.removeAttribute("disabled"),q.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled",
+"disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,n.checked,u.getLink(),F.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,m){function f(b){var f=" ",p="";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('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');k('<img src="'+b+'"'+m+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");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),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&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,k){var f=this.editor.graph.getSvg(),l=f.getElementsByTagName("a");if(null!=l)for(var p=0;p<l.length;p++){var m=l[p].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==l[p].getAttribute("target")&&l[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var n=" ",t="";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('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",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('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=t&&f.setAttribute("style",t),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=Graph.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(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{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,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)}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(Graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(y){null!=
-b&&b(y)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(z){null!=b&&b(z)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,k){k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=e)this.convertImages(g,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')+
+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&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=
+d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{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,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)}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(Graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(y){null!=b&&b(y)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&
+b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(x){null!=b&&b(x)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,k){k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=e)this.convertImages(g,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(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,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(F){"Invalid image"==F.message?this.downloadFile(n):this.handleError(F)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k)}catch(B){this.spinner.stop(),this.handleError(B)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,n)}catch(E){"Invalid image"==E.message?this.downloadFile(n):this.handleError(E)}}),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(B){this.spinner.stop(),this.handleError(B)}}};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 l=c[g].indexOf(")");e.push('url("');e.push(f[b(c[g].substring(0,l))]);e.push('"'+c[g].substring(l))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var k=c[g].indexOf(")"),m=null,n=c[g].indexOf("format(",k);0<n&&(m=b(c[g].substring(n+7,c[g].indexOf(")",n))));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.editor.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)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,y,B,t,x,I){g=null!=g?g:!0;t=null!=t?t:this.editor.graph;x=null!=x?x:0;var f=n?null:t.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==
-f&&0==n&&(f="#ffffff");this.convertImages(t.getSvg(f,null,null,I,null,null!=k?k:!0,null,null,null,y),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*k),b/p)):b/p);p=Math.ceil(m*p)+2*x;k=Math.ceil(m*k)+2*x;l.setAttribute("width",p);l.setAttribute("height",k);var q=l.getContext("2d");null!=f&&(q.beginPath(),
-q.rect(0,0,p,k),q.fillStyle=f,q.fill());q.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(d,x/m,x/m);a(l)},0):(q.drawImage(d,x/m,x/m),a(l))}catch(V){null!=e&&e(V)}});d.onerror=function(a){null!=e&&e(a)};try{y&&this.editor.graph.addSvgShadow(c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,
-c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(l)}catch(C){null!=e&&e(C)}}),c,B)};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.editor.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 l=a.getElementsByTagName(c),p=0;p<l.length;p++)mxUtils.bind(this,function(c){try{if(null!=c){var l=d.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var p=e[l];null==p?(f++,this.convertImageToDataUri(l,function(d){null!=d&&
-(e[l]=d,c.setAttribute(g,d));f--;0==f&&b(a)})):c.setAttribute(g,p)}else null!=l&&c.setAttribute(g,l)}}catch(I){}})(l[p])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==
+a;/^https?:\/\//.test(c)&&!this.editor.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)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,y,B,q,A,G){g=null!=g?g:!0;q=null!=q?q:this.editor.graph;A=null!=A?A:0;var f=n?null:q.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==
+f&&0==n&&(f="#ffffff");this.convertImages(q.getSvg(f,null,null,G,null,null!=k?k:!0,null,null,null,y),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),p=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*p),b/k)):b/k);k=Math.ceil(m*k)+2*A;p=Math.ceil(m*p)+2*A;l.setAttribute("width",k);l.setAttribute("height",p);var n=l.getContext("2d");null!=f&&(n.beginPath(),
+n.rect(0,0,k,p),n.fillStyle=f,n.fill());n.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(d,A/m,A/m);a(l)},0):(n.drawImage(d,A/m,A/m),a(l))}catch(V){null!=e&&e(V)}});d.onerror=function(a){null!=e&&e(a)};try{y&&this.editor.graph.addSvgShadow(c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(q,
+c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(l)}catch(D){null!=e&&e(D)}}),c,B)};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.editor.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 l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=d.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=e[l];null==k?(f++,this.convertImageToDataUri(l,function(d){null!=d&&
+(e[l]=d,c.setAttribute(g,d));f--;0==f&&b(a)})):c.setAttribute(g,k)}else null!=l&&c.setAttribute(g,l)}}catch(G){}})(l[k])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,k){try{var f=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));e=null!=e?e:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(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({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&&null!=
c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(y){null!=c&&c(y)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&
-b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(D){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(A){b(this.svgBrokenImage.src)}};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){g.model.beginUpdate();try{var l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){a={};var l=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(p[0]))).documentElement,
-d=!1,m=1);for(;m<p.length;m++){var n=p[m].getAttribute("id");p[m].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[m]));a[n]=p[m].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,u,u,t,!0));l.push(u)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(H){if(e)throw H;this.handleError(H)}return f};EditorUi.prototype.updatePageLinks=
-function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),g=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[l].setAttribute("href",
+b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(C){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(z){b(this.svgBrokenImage.src)}};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){g.model.beginUpdate();try{var l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]);else if(1<p.length){a={};var l=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=Editor.parseDiagramNode(p[0]),d=!1,m=1);for(;m<p.length;m++){var n=
+p[m].getAttribute("id");p[m].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[m]));a[n]=p[m].getAttribute("id");var q=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,u,u,q,!0));l.push(u)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(H){if(e)throw H;this.handleError(H)}return f};EditorUi.prototype.updatePageLinks=function(a,
+b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),g=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[l].setAttribute("href",
this.updatePageLink(a,f)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(l=0;l<d.model.getChildCount(b);l++)this.updatePageLinksForCell(a,d.model.getChildAt(b,l))};EditorUi.prototype.updatePageLink=function(a,b){var c=a[b.substring(b.indexOf(",")+1)];return null!=c?"data:page/id,"+c:null};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{this.doImportVisio(e.response,b,c,d)}catch(z){c(z)}else c({})});e.send(f)}else try{this.doImportVisio(a,b,
-c,d)}catch(z){c(z)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(v){c(v)}else this.spinner.stop(),
+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{this.doImportVisio(e.response,b,c,d)}catch(x){c(x)}else c({})});e.send(f)}else try{this.doImportVisio(a,b,
+c,d)}catch(x){c(x)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(v){c(v)}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(v){c(v)}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?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};
@@ -8656,44 +8667,44 @@ a,k)):b=this.importXml(a,c,d,y);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,
a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,p)):null!=n&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(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?p(a.responseText):null!=m&&m(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||
(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,y));f||null==m||m(l);return l};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,k,m,n,y,B,t){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var f=null!=b&&null!=c,l=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=B||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>q){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;
-e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,l,k,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,d,e,g,l,k,p,f,t)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,x=[],v=mxUtils.bind(this,function(a,b){x[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(x);else{var c=[];p.getModel().beginUpdate();
-try{for(var d=0;d<x.length;d++){var f=x[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),z=0;z<q;z++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.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 m=a.target.result,q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+1)))),x=mxUtils.parseXml(u),u=x.getElementsByTagName("svg");if(0<u.length){var u=u[0],
-z=t?null:u.getAttribute("content");null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var l=a[0],k=parseFloat(l.getAttribute("width")),y=parseFloat(l.getAttribute("height")),B=l.getAttribute("viewBox");if(null==
-B||0==B.length)l.setAttribute("viewBox","0 0 "+k+" "+y);else if(isNaN(k)||isNaN(y)){var t=B.split(" ");3<t.length&&(k=parseFloat(t[2]),y=parseFloat(t[3]))}m=this.createSvgDataUri(mxUtils.getXml(l));var u=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,y)),v=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(k*u)),Math.max(1,Math.round(y*u)),g.name);if(isNaN(k)||isNaN(y)){var z=new Image;z.onload=mxUtils.bind(this,function(){k=Math.max(1,z.width);y=Math.max(1,z.height);v[0].geometry.width=k;v[0].geometry.height=
-y;l.setAttribute("viewBox","0 0 "+k+" "+y);m=this.createSvgDataUri(mxUtils.getXml(l));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[v[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(l))}return v}}}catch(ga){}return null})):v(f,mxUtils.bind(this,function(){return e(z,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var F=t?null:this.extractGraphModelFromPng(a.target.result);
-if(null!=F&&0<F.length){var A=new Image;A.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*n,c+f*n,A.width,A.height,g.name)}));u=!0}}u||(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,p,m){v(f,mxUtils.bind(this,function(){if(null!=k&&k.length<y){var q=l&&this.isResampleImage(a.target.result,B)?Math.min(1,Math.min(d/p,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*q),Math.round(m*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,B)}),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){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*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(z)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){l=a;v()},n)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,m,n,y,B,q){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var f=null!=b&&null!=c,l=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var t=B||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>t){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;
+e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,l,p,f,q)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,u=t,v=[],A=mxUtils.bind(this,function(a,b){v[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(v);else{var c=[];p.getModel().beginUpdate();
+try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),x=0;x<t;x++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.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 m=a.target.result,t=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(t+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],
+x=q?null:u.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)?A(f,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=parseFloat(k.getAttribute("width")),y=parseFloat(k.getAttribute("height")),B=k.getAttribute("viewBox");if(null==
+B||0==B.length)k.setAttribute("viewBox","0 0 "+l+" "+y);else if(isNaN(l)||isNaN(y)){var q=B.split(" ");3<q.length&&(l=parseFloat(q[2]),y=parseFloat(q[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var u=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,y)),x=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(l*u)),Math.max(1,Math.round(y*u)),g.name);if(isNaN(l)||isNaN(y)){var A=new Image;A.onload=mxUtils.bind(this,function(){l=Math.max(1,A.width);y=Math.max(1,A.height);x[0].geometry.width=l;x[0].geometry.height=
+y;k.setAttribute("viewBox","0 0 "+l+" "+y);m=this.createSvgDataUri(mxUtils.getXml(k));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[x[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(k))}return x}}}catch(ga){}return null})):A(f,mxUtils.bind(this,function(){return e(x,"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else A(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var E=q?null:this.extractGraphModelFromPng(a.target.result);
+if(null!=E&&0<E.length){var C=new Image;C.src=a.target.result;A(f,mxUtils.bind(this,function(){return e(E,"text/xml",b+f*n,c+f*n,C.width,C.height,g.name)}));u=!0}}u||(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,p,m){A(f,mxUtils.bind(this,function(){if(null!=k&&k.length<y){var t=l&&this.isResampleImage(a.target.result,B)?Math.min(1,Math.min(d/p,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*t),Math.round(m*t),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,B)}),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){A(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){A(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(x)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){l=a;v()},n)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,
340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,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),
-l=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var k=Math.max(f/e,l/e);if(1<k){var p=Math.round(f/k),m=Math.round(l/k),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var q=n.toDataURL();if(q.length<b.length){var t=document.createElement("canvas");t.width=p;t.height=m;var u=t.toDataURL();q!==u&&(b=q,f=p,l=m)}}}catch(E){}c(b,f,l)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var e=d,g=0;8>g;g++)e=1==(e&1)?3988292384^e>>>1:e>>>
-1,EditorUi.prototype.crcTable[d]=e;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(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 l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(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 p=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+=l(c.length)+b+c+l(d^4294967295);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a}catch(v){if(null!=
-c)c(v);else throw v;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(C){a.handleError(C)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,
+k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(f/e,k/e);if(1<l){var p=Math.round(f/l),m=Math.round(k/l),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var t=n.toDataURL();if(t.length<b.length){var q=document.createElement("canvas");q.width=p;q.height=m;var u=q.toDataURL();t!==u&&(b=t,f=p,k=m)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var g=d,e=0;8>e;e++)g=1==(g&1)?3988292384^g>>>1:g>>>
+1,EditorUi.prototype.crcTable[d]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(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=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(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,l);do{var p=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-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+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a}catch(v){if(null!=
+c)c(v);else throw v;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(D){a.handleError(D)}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)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=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:g.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var n=this.actions.get("print");n.setEnabled(!mxClient.IS_IOS||!navigator.standalone);n.visible=n.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){y.innerHTML="&nbsp;";
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var n=this.actions.get("print");n.setEnabled(!mxClient.IS_IOS||!navigator.standalone);n.visible=n.isEnabled();if(!this.editor.chromeless||this.editor.editable){var q=function(){window.setTimeout(function(){y.innerHTML="&nbsp;";
y.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var g=e[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,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 l=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],l.x,l.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(M){}}),!1);var y=document.createElement("div");y.style.position="absolute";y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.display="block";y.contentEditable=!0;mxUtils.setOpacity(y,0);y.style.width="1px";y.style.height="1px";y.innerHTML="&nbsp;";var B=!1;this.keyHandler.bindControlKey(88,null);
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(M){}}),!1);var y=document.createElement("div");y.style.position="absolute";y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.display="block";y.contentEditable=!0;mxUtils.setOpacity(y,0);y.style.width="1px";y.style.height="1px";y.innerHTML="&nbsp;";var B=!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)||B||(y.style.left=b.container.scrollLeft+10+"px",y.style.top=b.container.scrollTop+10+"px",b.container.appendChild(y),
B=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){y.focus();document.execCommand("selectAll",!1,null)},0):(y.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(){!B||224!=c&&17!=c&&91!=c||(B=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),y.parentNode.removeChild(y),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(y,
-"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(y),t()}catch(J){this.handleError(J)}}));mxEvent.addListener(y,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(y,!0),t()}catch(J){this.handleError(J)}}));mxEvent.addListener(y,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y.innerHTML="&nbsp;",y.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,
-y);y.innerHTML="&nbsp;"}),0))}),!0);var F=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==y?!0:F.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",
+"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(y),q()}catch(J){this.handleError(J)}}));mxEvent.addListener(y,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(y,!0),q()}catch(J){this.handleError(J)}}));mxEvent.addListener(y,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y.innerHTML="&nbsp;",y.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,
+y);y.innerHTML="&nbsp;"}),0))}),!0);var E=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==y?!0:E.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",
function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,
e,g){b.insertImage(a,e,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 f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,
a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){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 x=document.createElement("div");x.style.position="absolute";x.style.top="125px";x.style.left="220px";x.style.width="30px";x.style.height="1000px";x.style.background="whiteSmoke";document.body.appendChild(x);var I=document.createElement("div");I.style.position="absolute";I.style.top="95px";I.style.left="220px";I.style.width=
-"30px";I.style.height="30px";I.style.background="whiteSmoke";document.body.appendChild(I);this.vRuler=new mxRuler(this.editor.graph,x,!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=
+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 A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var G=document.createElement("div");G.style.position="absolute";G.style.top="95px";G.style.left="220px";G.style.width=
+"30px";G.style.height="30px";G.style.background="whiteSmoke";document.body.appendChild(G);this.vRuler=new mxRuler(this.editor.graph,A,!0);this.hRuler=new mxRuler(this.editor.graph,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(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),
-E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var p=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(p=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,e,g,!0,p,null,m))});p&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=
-a;n()},mxEvent.isControlDown(a)):n()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,
+"";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 F=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
+F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var p=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(p=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,p,null,m))});p&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=
+a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,
e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==
urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",
@@ -8702,70 +8713,70 @@ this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFo
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())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,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){var b=this.editor.graph;b.setSelectionCells(this.importXml(a,0,0));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):
-b.textContent),e=!1;try{var g=f.lastIndexOf("%3E");0<=g&&g<f.length-3&&(f=f.substring(0,g+3))}catch(D){}try{var c=b.getElementsByTagName("span"),l=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(e=!0,f=l)}catch(D){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),
-d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.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(D){}}}}};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.textContent),e=!1;try{var g=f.lastIndexOf("%3E");0<=g&&g<f.length-3&&(f=f.substring(0,g+3))}catch(C){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(e=!0,f=k)}catch(C){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),
+d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.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(C){}}}}};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)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,f;if(null==a){f=document.body;
var e=document.documentElement;d=(f.clientWidth||e.clientWidth)-3;f=Math.max(f.clientHeight||0,e.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;e=document.createElement("div");e.style.zIndex=mxPopupMenu.prototype.zIndex+2;e.style.border="3px dotted rgb(254, 137, 12)";e.style.pointerEvents="none";e.style.position="absolute";e.style.top=b+"px";e.style.left=c+"px";e.style.width=Math.max(0,d-3)+"px";e.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?
this.editor.graph.container.appendChild(e):document.body.appendChild(e);return e};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){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,
-f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();
-this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(y){this.handleError(y)}});
-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,c){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=
-function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=
+0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
+b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(B){this.handleError(B,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(/(\.*<graphml )/.test(d))this.importGraphML(d,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)+".drawio"),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(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}}catch(y){this.handleError(y)}});
+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,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.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!=d&&d.isModified()?
+this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);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])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),
this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&
(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=
-function(a){var b=null,c=!1,d=!1,f=null,e=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,e);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var k=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&
+function(a){var b=null,c=!1,d=!1,e=null,f=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,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&
"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(R){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(K){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):
k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);
-l.init();return}if("draft"==k.action){var p=l(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?
-mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(K){g.postMessage(JSON.stringify({event:"draft",error:K.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var l=1==k.enableRecent,p=1==k.enableSearch,m=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,
-mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,p?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,
-"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,m?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){l=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:l,
+l.init();return}if("draft"==k.action){var m=l(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?
+mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(K){g.postMessage(JSON.stringify({event:"draft",error:K.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var l=1==k.enableRecent,m=1==k.enableSearch,p=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,
+mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.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,l?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,m?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,
+"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){l=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:l,
message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var n=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==
-k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var q=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var t=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(q);g.postMessage(JSON.stringify(b),"*")}),v=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(Graph.compress(q))));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var t=this.createTemporaryGraph(t.getStylesheet()),z=t.getGlobalVariable,C=this.pages[0];t.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:z.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,
-function(a){v(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){v(null)}),null,null,k.scale,null,null,null,t)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=k.scale?"&scale="+k.scale:"")+"&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()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=k.xml&&0<k.xml.length&&
-this.setFileData(k.xml);n=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=k.format;else if("html"==k.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&
+k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var t=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(t);g.postMessage(JSON.stringify(b),"*")}),x=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(Graph.compress(t))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),v=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.root)}this.exportToCanvas(mxUtils.bind(this,
+function(a){x(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){x(null)}),null,null,k.scale,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(t)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):x(null)}),mxUtils.bind(this,function(){x(null)}))}}else{null!=k.xml&&0<k.xml.length&&
+this.setFileData(k.xml);n=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=k.format;else if("html"==k.format)t=this.editor.getGraphXml(),n.data=this.getHtml(t,this.editor.graph),n.xml=mxUtils.getXml(t),n.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&
(l=null);n.xml=this.getFileData(!0);n.format="svg";if(k.embedImages||null==k.embedImages){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==k.format?this.getEmbeddedSvg(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);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l),
mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=
-k.modified),null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(p),this.embedFilenameSpan=p),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}var A=mxUtils.bind(this,function(e,k){c=!0;try{a(e,k)}catch(Y){this.handleError(Y)}c=!1;null!=urlParams.modified&&
-this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",
+k.modified),null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}var z=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(Y){this.handleError(Y)}c=!1;null!=urlParams.modified&&
+this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();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||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});
-null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){A(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==
-a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&A(a.responseText,e)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){A(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=l(k),A(k,e))}}));var g=window.opener||window.parent,e="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(e,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){z(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{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!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){z(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=l(k),z(k,f))}}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.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,null,null,null,null,!0);
-this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,m=null,n=null,t=null,x=null,I=
-null,H=null,E="",G="auto",J="auto",C=null,L=null,K=40,R=40,V=100,Y=0,M=this.editor.graph;M.getGraphBounds();for(var W=function(){null!=b?b(la):(M.setSelectionCells(la),M.scrollCellToVisible(M.getSelectionCell()))},Z=M.getFreeInsertPoint(),ha=Z.x,fa=Z.y,Z=fa,da=null,U="auto",H=null,ca=[],Q=null,aa=null,X=0;X<c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),X++;if("#"!=a.charAt(1)){var ea=
-a.indexOf(":");if(0<ea){var P=mxUtils.trim(a.substring(1,ea)),N=mxUtils.trim(a.substring(ea+1));"label"==P?da=M.sanitizeHtml(N):"labelname"==P&&0<N.length&&"-"!=N?n=N:"labels"==P&&0<N.length&&"-"!=N?t=JSON.parse(N):"style"==P?k=N:"parentstyle"==P?x=N:"stylename"==P&&0<N.length&&"-"!=N?m=N:"styles"==P&&0<N.length&&"-"!=N?l=JSON.parse(N):"identity"==P&&0<N.length&&"-"!=N?I=N:"parent"==P&&0<N.length&&"-"!=N?H=N:"namespace"==P&&0<N.length&&"-"!=N?E=N:"width"==P?G=N:"height"==P?J=N:"left"==P&&0<N.length?
-C=N:"top"==P&&0<N.length?L=N:"ignore"==P?aa=N.split(","):"connect"==P?ca.push(JSON.parse(N)):"link"==P?Q=N:"padding"==P?Y=parseFloat(N):"edgespacing"==P?K=parseFloat(N):"nodespacing"==P?R=parseFloat(N):"levelspacing"==P?V=parseFloat(N):"layout"==P&&(U=N)}}}if(null==c[X])throw Error(mxResources.get("invalidOrMissingFile"));var ba=this.editor.csvToArray(c[X]),P=ea=null;if(null!=I||null!=H)for(var S=0;S<ba.length;S++)I==ba[S]&&(ea=S),H==ba[S]&&(P=S);null==da&&(da="%"+ba[0]+"%");if(null!=ca)for(var T=
-0;T<ca.length;T++)null==g[ca[T].to]&&(g[ca[T].to]={});M.model.beginUpdate();try{for(S=X+1;S<c.length;S++){var ja=this.editor.csvToArray(c[S]);if(null==ja){var ka=40<c[S].length?c[S].substring(0,40)+"...":c[S];throw Error(S+" ("+ka+") "+mxResources.get("containsValidationErrors"));}if(ja.length==ba.length){var O=null,ma=null!=ea?E+ja[ea]:null;null!=ma&&(O=M.model.getCell(ma));var I=null!=O,ga=new mxCell(da,new mxGeometry(ha,Z,0,0),k||"whiteSpace=wrap;html=1;");ga.vertex=!0;ga.id=ma;for(var ia=0;ia<
-ja.length;ia++)M.setAttributeForCell(ga,ba[ia],ja[ia]);if(null!=n&&null!=t){var ua=t[ga.getAttribute(n)];null!=ua&&M.labelChanged(ga,ua)}if(null!=m&&null!=l){var va=l[ga.getAttribute(m)];null!=va&&(ga.style=va)}M.setAttributeForCell(ga,"placeholders","1");ga.style=M.replacePlaceholders(ga,ga.style);I&&(M.model.setGeometry(O,ga.geometry),M.model.setStyle(O,ga.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ga;if(!I)for(T=0;T<ca.length;T++)g[ca[T].to][O.getAttribute(ca[T].to)]=O;null!=Q&&"link"!=Q&&(M.setLinkForCell(O,
-O.getAttribute(Q)),M.setAttributeForCell(O,Q,null));M.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var wa=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=C&&null!=O.getAttribute(C)&&(O.geometry.x=ha+parseFloat(O.getAttribute(C))),null!=L&&null!=O.getAttribute(L)&&(O.geometry.y=fa+parseFloat(O.getAttribute(L))),"@"==G.charAt(0)&&null!=O.getAttribute(G.substring(1))?O.geometry.width=parseFloat(O.getAttribute(G.substring(1))):O.geometry.width="auto"==G?wa.width+Y:parseFloat(G),
-"@"==J.charAt(0)&&null!=O.getAttribute(J.substring(1))?O.geometry.height=parseFloat(O.getAttribute(J.substring(1))):O.geometry.height="auto"==J?wa.height+Y:parseFloat(J),Z+=O.geometry.height+R);I?(null==f[ma]&&(f[ma]=[]),f[ma].push(O)):(H=null!=P?M.model.getCell(E+ja[P]):null,d.push(O),null!=H?(H.style=M.replacePlaceholders(H,x),M.addCell(O,H)):e.push(M.addCell(O)))}}for(var na=e.slice(),la=e.slice(),T=0;T<ca.length;T++)for(var xa=ca[T],S=0;S<e.length;S++){var O=e[S],ya=mxUtils.bind(this,function(a,
-b,c){var d=b.getAttribute(c.from);if(null!=d){M.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));la.push(M.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,c.style||M.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,na)}}}});ya(O,O,xa);if(null!=f[O.id])for(ia=0;ia<f[O.id].length;ia++)ya(O,
-f[O.id][ia],xa)}if(null!=aa)for(S=0;S<d.length;S++)for(O=d[S],ia=0;ia<aa.length;ia++)M.setAttributeForCell(O,mxUtils.trim(aa[ia]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(M);oa.spacing=K;var ta=function(){0<oa.spacing&&oa.execute(M.getDefaultParent());for(var a=0;a<e.length;a++){var b=M.getCellGeometry(e[a]);b.x=Math.round(M.snap(b.x));b.y=Math.round(M.snap(b.y));"auto"==G&&(b.width=Math.round(M.snap(b.width)));"auto"==J&&(b.height=Math.round(M.snap(b.height)))}};if("["==U.charAt(0)){var za=
-W;M.view.validate();this.executeLayoutList(JSON.parse(U),function(){ta();za()});W=null}else if("circle"==U){var ra=new mxCircleLayout(M);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(M.getDefaultParent());ta()},!0,W);W=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&la.length==2*e.length-1&&1==na.length){M.view.validate();var sa=new mxCompactTreeLayout(M,"horizontaltree"==
-U);sa.levelDistance=R;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(M.getDefaultParent(),0<na.length?na[0]:null)},!0,W);W=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==na.length){M.view.validate();var pa=new mxHierarchicalLayout(M,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=R;pa.parallelEdgeSpacing=K;pa.interRankCellSpacing=V;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(M.getDefaultParent(),
+a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,
+l=null,m=null,n=null,q=null,A=null,G=null,H=null,F="",I="auto",J="auto",D=null,L=null,K=40,R=40,V=100,Y=0,M=this.editor.graph;M.getGraphBounds();for(var W=function(){null!=b?b(la):(M.setSelectionCells(la),M.scrollCellToVisible(M.getSelectionCell()))},Z=M.getFreeInsertPoint(),ha=Z.x,fa=Z.y,Z=fa,da=null,U="auto",H=null,ca=[],Q=null,aa=null,X=0;X<c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),
+X++;if("#"!=a.charAt(1)){var ea=a.indexOf(":");if(0<ea){var P=mxUtils.trim(a.substring(1,ea)),N=mxUtils.trim(a.substring(ea+1));"label"==P?da=M.sanitizeHtml(N):"labelname"==P&&0<N.length&&"-"!=N?n=N:"labels"==P&&0<N.length&&"-"!=N?q=JSON.parse(N):"style"==P?k=N:"parentstyle"==P?A=N:"stylename"==P&&0<N.length&&"-"!=N?m=N:"styles"==P&&0<N.length&&"-"!=N?l=JSON.parse(N):"identity"==P&&0<N.length&&"-"!=N?G=N:"parent"==P&&0<N.length&&"-"!=N?H=N:"namespace"==P&&0<N.length&&"-"!=N?F=N:"width"==P?I=N:"height"==
+P?J=N:"left"==P&&0<N.length?D=N:"top"==P&&0<N.length?L=N:"ignore"==P?aa=N.split(","):"connect"==P?ca.push(JSON.parse(N)):"link"==P?Q=N:"padding"==P?Y=parseFloat(N):"edgespacing"==P?K=parseFloat(N):"nodespacing"==P?R=parseFloat(N):"levelspacing"==P?V=parseFloat(N):"layout"==P&&(U=N)}}}if(null==c[X])throw Error(mxResources.get("invalidOrMissingFile"));var ba=this.editor.csvToArray(c[X]),P=ea=null;if(null!=G||null!=H)for(var S=0;S<ba.length;S++)G==ba[S]&&(ea=S),H==ba[S]&&(P=S);null==da&&(da="%"+ba[0]+
+"%");if(null!=ca)for(var T=0;T<ca.length;T++)null==g[ca[T].to]&&(g[ca[T].to]={});M.model.beginUpdate();try{for(S=X+1;S<c.length;S++){var ja=this.editor.csvToArray(c[S]);if(null==ja){var ka=40<c[S].length?c[S].substring(0,40)+"...":c[S];throw Error(S+" ("+ka+") "+mxResources.get("containsValidationErrors"));}if(ja.length==ba.length){var O=null,ma=null!=ea?F+ja[ea]:null;null!=ma&&(O=M.model.getCell(ma));var G=null!=O,ga=new mxCell(da,new mxGeometry(ha,Z,0,0),k||"whiteSpace=wrap;html=1;");ga.vertex=
+!0;ga.id=ma;for(var ia=0;ia<ja.length;ia++)M.setAttributeForCell(ga,ba[ia],ja[ia]);if(null!=n&&null!=q){var ua=q[ga.getAttribute(n)];null!=ua&&M.labelChanged(ga,ua)}if(null!=m&&null!=l){var va=l[ga.getAttribute(m)];null!=va&&(ga.style=va)}M.setAttributeForCell(ga,"placeholders","1");ga.style=M.replacePlaceholders(ga,ga.style);G&&(M.model.setGeometry(O,ga.geometry),M.model.setStyle(O,ga.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ga;if(!G)for(T=0;T<ca.length;T++)g[ca[T].to][O.getAttribute(ca[T].to)]=
+O;null!=Q&&"link"!=Q&&(M.setLinkForCell(O,O.getAttribute(Q)),M.setAttributeForCell(O,Q,null));M.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var wa=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=D&&null!=O.getAttribute(D)&&(O.geometry.x=ha+parseFloat(O.getAttribute(D))),null!=L&&null!=O.getAttribute(L)&&(O.geometry.y=fa+parseFloat(O.getAttribute(L))),"@"==I.charAt(0)&&null!=O.getAttribute(I.substring(1))?O.geometry.width=parseFloat(O.getAttribute(I.substring(1))):O.geometry.width=
+"auto"==I?wa.width+Y:parseFloat(I),"@"==J.charAt(0)&&null!=O.getAttribute(J.substring(1))?O.geometry.height=parseFloat(O.getAttribute(J.substring(1))):O.geometry.height="auto"==J?wa.height+Y:parseFloat(J),Z+=O.geometry.height+R);G?(null==f[ma]&&(f[ma]=[]),f[ma].push(O)):(H=null!=P?M.model.getCell(F+ja[P]):null,d.push(O),null!=H?(H.style=M.replacePlaceholders(H,A),M.addCell(O,H)):e.push(M.addCell(O)))}}for(var na=e.slice(),la=e.slice(),T=0;T<ca.length;T++)for(var xa=ca[T],S=0;S<e.length;S++){var O=
+e[S],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){M.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));la.push(M.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,c.style||M.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,na)}}}});ya(O,O,xa);if(null!=f[O.id])for(ia=
+0;ia<f[O.id].length;ia++)ya(O,f[O.id][ia],xa)}if(null!=aa)for(S=0;S<d.length;S++)for(O=d[S],ia=0;ia<aa.length;ia++)M.setAttributeForCell(O,mxUtils.trim(aa[ia]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(M);oa.spacing=K;var ta=function(){0<oa.spacing&&oa.execute(M.getDefaultParent());for(var a=0;a<e.length;a++){var b=M.getCellGeometry(e[a]);b.x=Math.round(M.snap(b.x));b.y=Math.round(M.snap(b.y));"auto"==I&&(b.width=Math.round(M.snap(b.width)));"auto"==J&&(b.height=Math.round(M.snap(b.height)))}};
+if("["==U.charAt(0)){var za=W;M.view.validate();this.executeLayoutList(JSON.parse(U),function(){ta();za()});W=null}else if("circle"==U){var ra=new mxCircleLayout(M);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(M.getDefaultParent());ta()},!0,W);W=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&la.length==2*e.length-1&&1==na.length){M.view.validate();var sa=
+new mxCompactTreeLayout(M,"horizontaltree"==U);sa.levelDistance=R;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(M.getDefaultParent(),0<na.length?na[0]:null)},!0,W);W=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==na.length){M.view.validate();var pa=new mxHierarchicalLayout(M,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=R;pa.parallelEdgeSpacing=K;pa.interRankCellSpacing=V;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(M.getDefaultParent(),
la);M.moveCells(la,ha,fa)},!0,W);W=null}else if("organic"==U||"auto"==U&&la.length>e.length){M.view.validate();var qa=new mxFastOrganicLayout(M);qa.forceConstant=3*R;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,a)};oa=new mxParallelEdgeLayout(M);oa.spacing=K;this.executeLayout(function(){qa.execute(M.getDefaultParent());ta()},!0,W);W=null}}this.hideDialog()}finally{M.model.endUpdate()}null!=W&&W()}}catch(Ca){this.handleError(Ca)}};
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 m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.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;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||
-c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
+e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||
+c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var d=applicationCache;if(null!=d&&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=
@@ -8776,73 +8787,74 @@ function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.protot
this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));
this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};
-var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),
+var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.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 k=a.getFileData(!0,null,null,null,null,!0),l=f.getGraphBounds(),m=Math.floor(l.width*e/f.view.scale),n=Math.floor(l.height*e/f.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()?a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+
c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(k))}):"png"==c?a.exportImage(e,null==d||"none"==d,!0,!1,!1,g,!0,!1):a.exportImage(e,!1,!0,!1,!1,g,!0,!1,"jpeg")):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=
d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==c){a.contains(f.previous)&&(d=f.child);break}}return d};EditorUi.prototype.getDiagramTextContent=
function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";
-var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<img src="/images/spin.gif">';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var m=JSON.parse(decodeURIComponent(k.substring(1)));f[m[0]]={id:m[0],
-title:m[1],downloadUrl:m[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},function(){this.handleError(null,
-mxResources.get("errorLoadingFile"))});c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;
-0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=
-function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,e){c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:d,error:e});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];
-if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var f=this[c].apply(this,e);b([f])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(A){b(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};
-EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)}})();
-var CommentsWindow=function(a,c,b,d,e,g){function k(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;y.style.display=0==b?"block":"none"}function m(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}q={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();q=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);q=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var m=JSON.parse(decodeURIComponent(k.substring(1)));
+f[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,
+function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],
+null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,
+340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];
+a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,e){var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);f&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,
+error:e});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===
+typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var f=this[c].apply(this,e);b([f])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(z){b(null,"Invalid Call: An error occured, "+z.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=
+function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();
+return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();
+null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)}})();
+var CommentsWindow=function(a,c,b,d,g,e){function k(){for(var a=C.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==C&&b++;y.style.display=0==b?"block":"none"}function m(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}t={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();t=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);t=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";l.focus()}function n(b,c){c.innerHTML="";var d=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[d],"{1} ago"))}function t(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src="/images/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className="geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,
-"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function F(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=C;a(b);return{pdiv:d,replies:c}}function z(c,d,g,k,n){function q(){t(u);b.addReply(x,function(a){x.id=a;b.replies.push(x);l(u);g&&g()},function(b){y();f(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function y(){m(x,
-u,function(a){q()},!0)}var B=F().pdiv,x=a.newComment(c,a.getCurrentUser());x.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=p(x,b.replies,B,e+1);d?y():q()}if(g||!b.isResolved){y.style.display="none";var C=document.createElement("div");C.className="geCommentContainer";C.setAttribute("data-commentId",b.id);C.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(C.style.backgroundColor="ghostWhite");var A=document.createElement("div");A.className="geCommentHeader";var I=document.createElement("img");
-I.className="geCommentUserImg";I.src=b.user.pictureUrl||Editor.userImage;A.appendChild(I);I=document.createElement("div");I.className="geCommentHeaderTxt";A.appendChild(I);var E=document.createElement("div");E.className="geCommentUsername";mxUtils.write(E,b.user.displayName||"");I.appendChild(E);E=document.createElement("div");E.className="geCommentDate";E.setAttribute("data-commentId",b.id);n(b,E);I.appendChild(E);C.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,
-b.content||"");C.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";A.appendChild(G);u||0!=e&&!v||B(mxResources.get("reply"),function(){z("",!0)},b.isResolved);I=a.getCurrentUser();null==I||I.id!=b.user.id||u||(B(mxResources.get("edit"),function(){function c(){m(b,C,function(){t(C);b.editComment(b.content,function(){l(C)},function(b){f(C);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}
-c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(C);b.deleteComment(function(){for(var a=F(b).replies,d=0;d<a.length;d++)D.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}y.style.display=0==D.getElementsByTagName("div").length?"block":"none"},function(b){f(C);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||B(b.isResolved?mxResources.get("reopen"):
-mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=F(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);x||(e[g].style.display="none")}k()}
-b.isResolved?z(mxResources.get("reOpened")+": ",!0,c,!1,!0):z(mxResources.get("markedAsResolved"),!1,c,!0)});C.appendChild(A);null!=d?D.insertBefore(C,d.nextSibling):D.appendChild(C);for(d=0;null!=b.replies&&d<b.replies.length;d++)A=b.replies[d],A.isResolved=b.isResolved,p(A,b.replies,null,e+1,g);null!=q&&(q.comment.id==b.id?(g=b.content,b.content=q.comment.content,m(b,C,q.saveCallback,q.deleteOnCancel),b.content=g):null==q.comment.id&&q.comment.pCommentId==b.id&&(D.appendChild(q.div),m(q.comment,
-q.div,q.saveCallback,q.deleteOnCancel)));return C}}var u=!a.canComment(),v=a.canReplyToReplies(),q=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;D.style.bottom=parseInt(z)+7+"px";A.appendChild(D);var y=document.createElement("span");
-y.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(y,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=z;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter=
-"none");if(!u){var F=z.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function c(){m(d,e,function(b){t(e);a.addComment(b,function(a){b.id=a;I.push(b);l(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,I,null,0);c();b.preventDefault();
-mxEvent.consume(b)});B.appendChild(F)}F=z.cloneNode();F.innerHTML='<img src="/images/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var x=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(x=!x)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});B.appendChild(F);a.commentsRefreshNeeded()&&(F=z.cloneNode(),F.innerHTML='<img src="/images/update16.png" style="width: 16px; padding: 2px;">',
-F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),B.appendChild(F));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="/images/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){g();a.preventDefault();mxEvent.consume(a)}),
-B.appendChild(z));A.appendChild(B);var I=[],H=mxUtils.bind(this,function(){if(null!=q){q.div=q.div.cloneNode(!0);var b=q.div.querySelector(".geCommentEditTxtArea"),c=q.div.querySelector(".geCommentEditBtns");q.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="/images/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=a.canReplyToReplies();a.commentsSupported()?
-a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});D.innerHTML="";D.appendChild(y);y.style.display="block";I=a;for(a=0;a<I.length;a++)b(I[a].replies),p(I[a],I,null,0,x);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(D.appendChild(q.div),m(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},
-function(){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=D.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<I.length;d++)a(I[d])}});setInterval(B,6E4);
-this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),A,c,b,d,e,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
-a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var E=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",E);this.destroy=function(){mxEvent.removeListener(window,"resize",E);this.window.destroy()}},
-ConfirmDialog=function(a,c,b,d,e,g,k,m,n,t){var f=document.createElement("div");f.style.textAlign="center";var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight="44px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);f.appendChild(l);null!=t&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",t),l.appendChild(c),f.appendChild(l));t=document.createElement("div");
-t.style.textAlign="center";t.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(p.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&&t.appendChild(g);var u=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=b&&
-b(p.checked)});t.appendChild(u);null!=k?(u.innerHTML=k+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||t.appendChild(g);f.appendChild(t);n?(t.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(p),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),l.appendChild(e),f.appendChild(l),
-mxEvent.addListener(e,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):t.style.marginTop="12px";this.init=function(){u.focus()};this.container=f};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,c,b,d,e){var g={},k=[],m={},n={},t={},f={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var l in d[EditorUi.DIFF_UPDATE])g[l]=d[EditorUi.DIFF_UPDATE][l];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)n[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)m[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(l in c[EditorUi.DIFF_UPDATE])d=
-c[EditorUi.DIFF_UPDATE][l],null!=d.previous&&(f[d.previous]=l);if(null!=a){var p="";for(d=0;d<a.length;d++){var u=a[d].getId();t[u]=a[d];null!=f[p]||n[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var v={},q=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!v[d]){v[d]=!0;k.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
-null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,g[a.getId()],e),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=f[d];null!=a&&(delete f[d],q(t[a]));a=m[d];null!=a&&(delete m[d],A(a))}),A=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=t[a.getId()];null==c?q(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});q();for(l in f)q(t[f[l]]),
-delete f[l];for(l in m)A(m[l]),delete m[l];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
-EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=d[a];null==b&&(b={inserted:[],moved:{}},d[a]=b);return b}var d={};if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++){var g=c[EditorUi.DIFF_INSERT][e],k=null!=g.parent?g.parent:"",m=null!=g.previous?g.previous:"";b(k).inserted[m]=g}if(null!=c[EditorUi.DIFF_UPDATE])for(var n in c[EditorUi.DIFF_UPDATE])g=c[EditorUi.DIFF_UPDATE][n],null!=g.previous&&(k=g.parent,null==k&&(e=a.getCell(n),null!=e&&(e=
-a.getParent(e),null!=e&&(k=e.getId()))),null!=k&&(b(k).moved[g.previous]=n));return d};
-EditorUi.prototype.patchPage=function(a,c,b,d){var e=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),g=this.createParentLookup(e,c);e.beginUpdate();try{var k=e.updateEdgeParent,m=new mxDictionary,n=[];e.updateEdgeParent=function(a,b){!m.get(a)&&d&&(m.put(a,!0),n.push(a))};var t=g[""],f=null!=t&&null!=t.inserted?t.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var p=null!=t&&null!=t.moved?t.moved[""]:null;null!=p&&(l=e.getCell(p))}null!=l&&(e.setRoot(l),
-a.root=l);this.patchCellRecursive(a,e,e.root,g,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=e.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&e.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var q=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(e,e.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=q?q[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u],
-v=e.getCell(f.id),null!=v&&(e.setTerminal(v,e.getCell(f.source),!0),e.setTerminal(v,e.getCell(f.target),!1));e.updateEdgeParent=k;if(d&&0<n.length)for(u=0;u<n.length;u++)e.contains(n[u])&&e.updateEdgeParent(n[u])}finally{e.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,c,b,d,e){if(null!=b){for(var g=d[b.getId()],k=null!=g&&null!=g.inserted?g.inserted:{},g=null!=g&&null!=g.moved?g.moved:{},m=0,n=c.getChildCount(b),t="",f=0;f<n;f++){var l=c.getChildAt(b,f).getId();null==g[t]&&(null==e[EditorUi.DIFF_UPDATE]||null==e[EditorUi.DIFF_UPDATE][l]||null==e[EditorUi.DIFF_UPDATE][l].previous&&null==e[EditorUi.DIFF_UPDATE][l].parent)&&(g[t]=l);t=l}n=mxUtils.bind(this,function(f,g){var k=null!=f?f.getId():"";if(null!=f&&g){var l=
-c.getCell(k);null!=l&&l!=f&&(f=null)}null!=f&&(c.getChildAt(b,m)!=f&&c.add(b,f,m),this.patchCellRecursive(a,c,f,d,e),m++);return k});for(t=[null];0<t.length;)if(f=t.shift(),f=n(null!=f?f.child:null,null!=f?f.insert:!1),l=g[f],null!=l&&(delete g[f],t.push({child:c.getCell(l)})),l=k[f],null!=l&&(delete k[f],t.push({child:this.getCellForJson(l),insert:!0})),0==t.length){for(f in g)t.push({child:c.getCell(g[f])}),delete g[f];for(f in k)t.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}};
+[d],"{1} ago"))}function q(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src="/images/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className="geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,
+"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});H.appendChild(e);d&&(e.style.display="none")}function E(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=D;a(b);return{pdiv:d,replies:c}}function x(c,d,g,k,n){function y(){q(A);b.addReply(u,function(a){u.id=a;b.replies.push(u);l(A);g&&g()},function(b){t();f(A);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function t(){m(u,
+A,function(a){y()},!0)}var B=E().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var A=p(u,b.replies,B,e+1);d?t():y()}if(g||!b.isResolved){y.style.display="none";var D=document.createElement("div");D.className="geCommentContainer";D.setAttribute("data-commentId",b.id);D.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(D.style.backgroundColor="ghostWhite");var z=document.createElement("div");z.className="geCommentHeader";var G=document.createElement("img");
+G.className="geCommentUserImg";G.src=b.user.pictureUrl||Editor.userImage;z.appendChild(G);G=document.createElement("div");G.className="geCommentHeaderTxt";z.appendChild(G);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");G.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);n(b,F);G.appendChild(F);D.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,
+b.content||"");D.appendChild(z);z=document.createElement("div");z.className="geCommentActions";var H=document.createElement("ul");H.className="geCommentActionsList";z.appendChild(H);u||0!=e&&!v||B(mxResources.get("reply"),function(){x("",!0)},b.isResolved);G=a.getCurrentUser();null==G||G.id!=b.user.id||u||(B(mxResources.get("edit"),function(){function c(){m(b,D,function(){q(D);b.editComment(b.content,function(){l(D)},function(b){f(D);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}
+c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){q(D);b.deleteComment(function(){for(var a=E(b).replies,d=0;d<a.length;d++)C.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}y.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){f(D);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||B(b.isResolved?mxResources.get("reopen"):
+mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=E(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);A||(e[g].style.display="none")}k()}
+b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});D.appendChild(z);null!=d?C.insertBefore(D,d.nextSibling):C.appendChild(D);for(d=0;null!=b.replies&&d<b.replies.length;d++)z=b.replies[d],z.isResolved=b.isResolved,p(z,b.replies,null,e+1,g);null!=t&&(t.comment.id==b.id?(g=b.content,b.content=t.comment.content,m(b,D,t.saveCallback,t.deleteOnCancel),b.content=g):null==t.comment.id&&t.comment.pCommentId==b.id&&(C.appendChild(t.div),m(t.comment,
+t.div,t.saveCallback,t.deleteOnCancel)));return D}}var u=!a.canComment(),v=a.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;C.style.bottom=parseInt(x)+7+"px";z.appendChild(C);var y=document.createElement("span");
+y.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(y,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=x;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");x=document.createElement("a");x.className="geButton";mxClient.IS_QUIRKS&&(x.style.filter=
+"none");if(!u){var E=x.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){m(d,e,function(b){q(e);a.addComment(b,function(a){b.id=a;G.push(b);l(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,G,null,0);c();b.preventDefault();
+mxEvent.consume(b)});B.appendChild(E)}E=x.cloneNode();E.innerHTML='<img src="/images/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var A=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(A=!A)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});B.appendChild(E);a.commentsRefreshNeeded()&&(E=x.cloneNode(),E.innerHTML='<img src="/images/update16.png" style="width: 16px; padding: 2px;">',
+E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),B.appendChild(E));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="/images/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){e();a.preventDefault();mxEvent.consume(a)}),
+B.appendChild(x));z.appendChild(B);var G=[],H=mxUtils.bind(this,function(){if(null!=t){t.div=t.div.cloneNode(!0);var b=t.div.querySelector(".geCommentEditTxtArea"),c=t.div.querySelector(".geCommentEditBtns");t.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="/images/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=a.canReplyToReplies();a.commentsSupported()?
+a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});C.innerHTML="";C.appendChild(y);y.style.display="block";G=a;for(a=0;a<G.length;a++)b(G[a].replies),p(G[a],G,null,0,A);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(C.appendChild(t.div),m(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},
+function(){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<G.length;d++)a(G[d])}});setInterval(B,6E4);
+this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),z,c,b,d,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
+a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}},
+ConfirmDialog=function(a,c,b,d,g,e,k,m,n,q){var f=document.createElement("div");f.style.textAlign="center";var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight="44px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);f.appendChild(l);null!=q&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",q),l.appendChild(c),f.appendChild(l));q=document.createElement("div");
+q.style.textAlign="center";q.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(p.checked)});e.className="geBtn";null!=m&&(e.innerHTML=m+"<br>"+e.innerHTML,e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&q.appendChild(e);var u=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&
+b(p.checked)});q.appendChild(u);null!=k?(u.innerHTML=k+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||q.appendChild(e);f.appendChild(q);n?(q.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(p),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),l.appendChild(g),f.appendChild(l),
+mxEvent.addListener(g,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):q.style.marginTop="12px";this.init=function(){u.focus()};this.container=f};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+EditorUi.prototype.patchPages=function(a,c,b,d,g){var e={},k=[],m={},n={},q={},f={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var l in d[EditorUi.DIFF_UPDATE])e[l]=d[EditorUi.DIFF_UPDATE][l];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)n[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)m[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(l in c[EditorUi.DIFF_UPDATE])d=
+c[EditorUi.DIFF_UPDATE][l],null!=d.previous&&(f[d.previous]=l);if(null!=a){var p="";for(d=0;d<a.length;d++){var u=a[d].getId();q[u]=a[d];null!=f[p]||n[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var v={},t=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!v[d]){v[d]=!0;k.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
+null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,e[a.getId()],g),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=f[d];null!=a&&(delete f[d],t(q[a]));a=m[d];null!=a&&(delete m[d],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=q[a.getId()];null==c?t(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});t();for(l in f)t(q[f[l]]),
+delete f[l];for(l in m)z(m[l]),delete m[l];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
+EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=d[a];null==b&&(b={inserted:[],moved:{}},d[a]=b);return b}var d={};if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++){var e=c[EditorUi.DIFF_INSERT][g],k=null!=e.parent?e.parent:"",m=null!=e.previous?e.previous:"";b(k).inserted[m]=e}if(null!=c[EditorUi.DIFF_UPDATE])for(var n in c[EditorUi.DIFF_UPDATE])e=c[EditorUi.DIFF_UPDATE][n],null!=e.previous&&(k=e.parent,null==k&&(g=a.getCell(n),null!=g&&(g=
+a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(b(k).moved[e.previous]=n));return d};
+EditorUi.prototype.patchPage=function(a,c,b,d){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),e=this.createParentLookup(g,c);g.beginUpdate();try{var k=g.updateEdgeParent,m=new mxDictionary,n=[];g.updateEdgeParent=function(a,b){!m.get(a)&&d&&(m.put(a,!0),n.push(a))};var q=e[""],f=null!=q&&null!=q.inserted?q.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var p=null!=q&&null!=q.moved?q.moved[""]:null;null!=p&&(l=g.getCell(p))}null!=l&&(g.setRoot(l),
+a.root=l);this.patchCellRecursive(a,g,g.root,e,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var t=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=t?t[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u],
+v=g.getCell(f.id),null!=v&&(g.setTerminal(v,g.getCell(f.source),!0),g.setTerminal(v,g.getCell(f.target),!1));g.updateEdgeParent=k;if(d&&0<n.length)for(u=0;u<n.length;u++)g.contains(n[u])&&g.updateEdgeParent(n[u])}finally{g.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,c,b,d,g){if(null!=b){for(var e=d[b.getId()],k=null!=e&&null!=e.inserted?e.inserted:{},e=null!=e&&null!=e.moved?e.moved:{},m=0,n=c.getChildCount(b),q="",f=0;f<n;f++){var l=c.getChildAt(b,f).getId();null==e[q]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][l]||null==g[EditorUi.DIFF_UPDATE][l].previous&&null==g[EditorUi.DIFF_UPDATE][l].parent)&&(e[q]=l);q=l}n=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var l=
+c.getCell(k);null!=l&&l!=e&&(e=null)}null!=e&&(c.getChildAt(b,m)!=e&&c.add(b,e,m),this.patchCellRecursive(a,c,e,d,g),m++);return k});for(q=[null];0<q.length;)if(f=q.shift(),f=n(null!=f?f.child:null,null!=f?f.insert:!1),l=e[f],null!=l&&(delete e[f],q.push({child:c.getCell(l)})),l=k[f],null!=l&&(delete k[f],q.push({child:this.getCellForJson(l),insert:!0})),0==q.length){for(f in e)q.push({child:c.getCell(e[f])}),delete e[f];for(f in k)q.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}};
EditorUi.prototype.patchCell=function(a,c,b,d){if(null!=c&&null!=b){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in b?a.setValue(c,b.value):null!=b.xmlValue&&a.setValue(c,mxUtils.parseXml(b.xmlValue).documentElement);null!=d&&null!=d.style||null==b.style||a.setStyle(c,b.style);null!=b.visible&&a.setVisible(c,1==b.visible);null!=b.collapsed&&a.setCollapsed(c,1==b.collapsed);null!=b.vertex&&(c.vertex=1==b.vertex);null!=b.edge&&(c.edge=1==b.edge);null!=b.connectable&&(c.connectable=
-1==b.connectable);null!=b.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(c,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(c,a.getCell(b.target),!1);for(var e in b)this.cellProperties[e]||(c[e]=b[e])}};
-EditorUi.prototype.getPagesForNode=function(a,c){var b=this.editor.extractGraphModel(a,!0);null!=b&&(a=b);var b=a.getElementsByTagName(c||"diagram"),d=[];if(0<b.length)for(var e=0;e<b.length;e++){var g=new DiagramPage(b[e]);this.updatePageRoot(g);d.push(g)}else"mxGraphModel"==a.nodeName&&(g=new DiagramPage(a.ownerDocument.createElement("diagram")),g.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(g.node,Graph.compressNode(a)),d.push(g));return d};
-EditorUi.prototype.diffPages=function(a,c){for(var b=[],d=[],e={},g={},k={},m=null,n=0;n<c.length;n++)g[c[n].getId()]={page:c[n],prev:m},m=c[n];m=null;for(n=0;n<a.length;n++){var t=a[n].getId(),f=g[t];if(null==f)d.push(t);else{var l=this.diffPage(a[n],f.page),p={};0<Object.keys(l).length&&(p.cells=l);l=this.diffViewState(a[n],f.page);0<Object.keys(l).length&&(p.view=l);if((null!=f.prev?null==m:null!=m)||null!=m&&null!=f.prev&&m.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!=
-f.page.getName()&&a[n].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[t]=p)}delete g[a[n].getId()];m=a[n]}for(t in g)f=g[t],b.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(e[EditorUi.DIFF_UPDATE]=k);0<d.length&&(e[EditorUi.DIFF_REMOVE]=d);0<b.length&&(e[EditorUi.DIFF_INSERT]=b);return e};
-EditorUi.prototype.createCellLookup=function(a,c,b){b=null!=b?b:{};b[a.getId()]={cell:a,prev:c};var d=a.getChildCount();c=null;for(var e=0;e<d;e++){var g=a.getChildAt(e);this.createCellLookup(g,c,b);c=g}return b};
-EditorUi.prototype.diffCellRecursive=function(a,c,b,d,e){d=null!=d?d:{};var g=b[a.getId()];delete b[a.getId()];if(null==g)e.push(a.getId());else{var k=this.diffCell(a,g.cell);if(null!=k.parent||(null!=g.prev?null==c:null!=c)||null!=c&&null!=g.prev&&c.getId()!=g.prev.getId())k.previous=null!=g.prev?g.prev.getId():"";0<Object.keys(k).length&&(d[a.getId()]=k)}g=a.getChildCount();c=null;for(k=0;k<g;k++){var m=a.getChildAt(k);this.diffCellRecursive(m,c,b,d,e);c=m}return d};
-EditorUi.prototype.diffPage=function(a,c){var b=[],d=[],e={};this.updatePageRoot(a);this.updatePageRoot(c);var g=this.createCellLookup(c.root),k=this.diffCellRecursive(a.root,null,g,k,d),m;for(m in g){var n=g[m];b.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(k).length&&(e[EditorUi.DIFF_UPDATE]=k);0<d.length&&(e[EditorUi.DIFF_REMOVE]=d);0<b.length&&(e[EditorUi.DIFF_INSERT]=b);return e};
-EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,d=c.viewState,e={};c==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=b&&null!=d)for(var g in this.viewStateProperties){var k=JSON.stringify(b[g]),m=JSON.stringify(d[g]);k!=m&&(e[g]=m)}return e};
+1==b.connectable);null!=b.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(c,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(c,a.getCell(b.target),!1);for(var g in b)this.cellProperties[g]||(c[g]=b[g])}};
+EditorUi.prototype.getPagesForNode=function(a,c){var b=this.editor.extractGraphModel(a,!0);null!=b&&(a=b);var b=a.getElementsByTagName(c||"diagram"),d=[];if(0<b.length)for(var g=0;g<b.length;g++){var e=new DiagramPage(b[g]);this.updatePageRoot(e);d.push(e)}else"mxGraphModel"==a.nodeName&&(e=new DiagramPage(a.ownerDocument.createElement("diagram")),e.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(e.node,Graph.compressNode(a)),d.push(e));return d};
+EditorUi.prototype.diffPages=function(a,c){for(var b=[],d=[],g={},e={},k={},m=null,n=0;n<c.length;n++)e[c[n].getId()]={page:c[n],prev:m},m=c[n];m=null;for(n=0;n<a.length;n++){var q=a[n].getId(),f=e[q];if(null==f)d.push(q);else{var l=this.diffPage(a[n],f.page),p={};0<Object.keys(l).length&&(p.cells=l);l=this.diffViewState(a[n],f.page);0<Object.keys(l).length&&(p.view=l);if((null!=f.prev?null==m:null!=m)||null!=m&&null!=f.prev&&m.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!=
+f.page.getName()&&a[n].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[q]=p)}delete e[a[n].getId()];m=a[n]}for(q in e)f=e[q],b.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<d.length&&(g[EditorUi.DIFF_REMOVE]=d);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g};
+EditorUi.prototype.createCellLookup=function(a,c,b){b=null!=b?b:{};b[a.getId()]={cell:a,prev:c};var d=a.getChildCount();c=null;for(var g=0;g<d;g++){var e=a.getChildAt(g);this.createCellLookup(e,c,b);c=e}return b};
+EditorUi.prototype.diffCellRecursive=function(a,c,b,d,g){d=null!=d?d:{};var e=b[a.getId()];delete b[a.getId()];if(null==e)g.push(a.getId());else{var k=this.diffCell(a,e.cell);if(null!=k.parent||(null!=e.prev?null==c:null!=c)||null!=c&&null!=e.prev&&c.getId()!=e.prev.getId())k.previous=null!=e.prev?e.prev.getId():"";0<Object.keys(k).length&&(d[a.getId()]=k)}e=a.getChildCount();c=null;for(k=0;k<e;k++){var m=a.getChildAt(k);this.diffCellRecursive(m,c,b,d,g);c=m}return d};
+EditorUi.prototype.diffPage=function(a,c){var b=[],d=[],g={};this.updatePageRoot(a);this.updatePageRoot(c);var e=this.createCellLookup(c.root),k=this.diffCellRecursive(a.root,null,e,k,d),m;for(m in e){var n=e[m];b.push(this.getJsonForCell(n.cell,n.prev))}0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<d.length&&(g[EditorUi.DIFF_REMOVE]=d);0<b.length&&(g[EditorUi.DIFF_INSERT]=b);return g};
+EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,d=c.viewState,g={};c==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=b&&null!=d)for(var e in this.viewStateProperties){var k=JSON.stringify(b[e]),m=JSON.stringify(d[e]);k!=m&&(g[e]=m)}return g};
EditorUi.prototype.getCellForJson=function(a){var c=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,b=a.value;null!=a.xmlValue&&(b=mxUtils.parseXml(a.xmlValue).documentElement);c=new mxCell(b,c,a.style);c.connectable=0!=a.connectable;c.collapsed=1==a.collapsed;c.visible=0!=a.visible;c.vertex=1==a.vertex;c.edge=1==a.edge;c.id=a.id;for(var d in a)this.cellProperties[d]||(c[d]=a[d]);return c};
EditorUi.prototype.getJsonForCell=function(a,c){var b={id:a.getId()};a.vertex&&(b.vertex=1);a.edge&&(b.edge=1);a.connectable||(b.connectable=0);null!=a.parent&&(b.parent=a.parent.getId());null!=c&&(b.previous=c.getId());null!=a.source&&(b.source=a.source.getId());null!=a.target&&(b.target=a.target.getId());null!=a.style&&(b.style=a.style);null!=a.geometry&&(b.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(b.collapsed=1);a.visible||(b.visible=0);null!=a.value&&("object"===typeof a.value&&
"number"===typeof a.value.nodeType&&"string"===typeof a.value.nodeName&&"function"===typeof a.value.getAttribute?b.xmlValue=mxUtils.getXml(a.value):b.value=a.value);for(var d in a)this.cellProperties[d]||"function"===typeof a[d]||(b[d]=a[d]);return b};
EditorUi.prototype.diffCell=function(a,c){function b(a){return null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute}var d={};a.vertex!=c.vertex&&(d.vertex=c.vertex?1:0);a.edge!=c.edge&&(d.edge=c.edge?1:0);a.connectable!=c.connectable&&(d.connectable=c.connectable?1:0);if((null!=a.parent?null==c.parent:null!=c.parent)||null!=a.parent&&null!=c.parent&&a.parent.getId()!=c.parent.getId())d.parent=null!=c.parent?c.parent.getId():"";
if((null!=a.source?null==c.source:null!=c.source)||null!=a.source&&null!=c.source&&a.source.getId()!=c.source.getId())d.source=null!=c.source?c.source.getId():"";if((null!=a.target?null==c.target:null!=c.target)||null!=a.target&&null!=c.target&&a.target.getId()!=c.target.getId())d.target=null!=c.target?c.target.getId():"";b(a.value)&&b(c.value)?a.value.isEqualNode(c.value)||(d.xmlValue=mxUtils.getXml(c.value)):a.value!=c.value&&(b(c.value)?d.xmlValue=mxUtils.getXml(c.value):d.value=null!=c.value?
-c.value:null);a.style!=c.style&&(d.style=c.style);a.visible!=c.visible&&(d.visible=c.visible?1:0);a.collapsed!=c.collapsed&&(d.collapsed=c.collapsed?1:0);if(!this.isObjectEqual(a.geometry,c.geometry,new mxGeometry)){var e=this.codec.encode(c.geometry);null!=e&&(d.geometry=mxUtils.getXml(e))}for(var g in a)this.cellProperties[g]||"function"===typeof a[g]||"function"===typeof c[g]||a[g]==c[g]||(d[g]=void 0===c[g]?null:c[g]);for(g in c)g in a||this.cellProperties[g]||"function"===typeof a[g]||"function"===
-typeof c[g]||a[g]==c[g]||(d[g]=void 0===c[g]?null:c[g]);return d};EditorUi.prototype.isObjectEqual=function(a,c,b){if(null==a&&null==c)return!0;if(null!=a?null==c:null!=c)return!1;var d=function(a,c){return null==b||b[a]!=c?!0===c?1:c:void 0};return JSON.stringify(a,d)==JSON.stringify(c,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
+c.value:null);a.style!=c.style&&(d.style=c.style);a.visible!=c.visible&&(d.visible=c.visible?1:0);a.collapsed!=c.collapsed&&(d.collapsed=c.collapsed?1:0);if(!this.isObjectEqual(a.geometry,c.geometry,new mxGeometry)){var g=this.codec.encode(c.geometry);null!=g&&(d.geometry=mxUtils.getXml(g))}for(var e in a)this.cellProperties[e]||"function"===typeof a[e]||"function"===typeof c[e]||a[e]==c[e]||(d[e]=void 0===c[e]?null:c[e]);for(e in c)e in a||this.cellProperties[e]||"function"===typeof a[e]||"function"===
+typeof c[e]||a[e]==c[e]||(d[e]=void 0===c[e]?null:c[e]);return d};EditorUi.prototype.isObjectEqual=function(a,c,b){if(null==a&&null==c)return!0;if(null!=a?null==c:null!=c)return!1;var d=function(a,c){return null==b||b[a]!=c?!0===c?1:c:void 0};return JSON.stringify(a,d)==JSON.stringify(c,d)};var mxSettings={currentVersion:18,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},setCustomFonts:function(a){mxSettings.settings.customFonts=a},getCustomFonts:function(a){return mxSettings.settings.customFonts},
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=
@@ -8874,64 +8886,64 @@ DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()
DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else var a=this.fileChanged(mxUtils.bind(this,function(a){this.updateStatus()}),mxUtils.bind(this,function(a){this.file.handleFileError(a)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=a}))};
DrawioFileSync.prototype.fileChanged=function(a,c,b){var d=window.setTimeout(mxUtils.bind(this,function(){null!=b&&b()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(d){null!=b&&b()||(this.isValidState()?this.catchup(d,a,c,b):null!=c&&c())}),c):null!=c&&c())}),0);return this.notifyThread=d};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorEtag(a,this.file.getCurrentEtag()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(a,c,b,d){if(null==d||!d()){var e=this.file.getDescriptorSecret(a),g=this.file.getDescriptorEtag(a),k=this.file.getCurrentEtag();if(k==g)null!=c&&c();else if(this.isValidState()){var m=0,n=!1,t=mxUtils.bind(this,function(){if(null==d||!d())if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(c,b,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+
-"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(g)+(null!=e?"&secret="+encodeURIComponent(e):""),mxUtils.bind(this,function(e){this.file.stats.bytesReceived+=e.getText().length;window.clearTimeout(l);if(f&&(null==d||!d()))if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var g=null,p=[];if(200<=e.getStatus()&&299>=e.getStatus()&&0<e.getText().length)try{var q=JSON.parse(e.getText());if(null!=q&&0<q.length)for(var A=0;A<q.length;A++){var z=this.stringToObject(q[A]);
-if(z.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(z.v===DrawioFileSync.PROTOCOL&&null!=z.d)g=z.d.checksum,p.push(z.d.patch);else{n=!0;p=[];break}}}catch(D){p=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,g,a,c,b,d)):m<=this.maxCacheReadyRetries&&!n&&401!=e.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(t,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,b,d))}catch(D){null!=b&&b(D)}}else null!=
-b&&b()}))}else null!=b&&b()});window.setTimeout(t,this.cacheReadyDelay)}else null!=b&&b()}};DrawioFileSync.prototype.reload=function(a,c,b,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b,d)};
-DrawioFileSync.prototype.merge=function(a,c,b,d,e,g){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var k=this.file.ignorePatches(a),m=this.file.getDescriptorEtag(b);if(!k){for(g=0;g<a.length;g++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[g]);var n=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",m,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==n,c);if(null!=c&&c!=n){var t=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m);this.file.checksumError(e,a,"From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+n,m,"merge");return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?
-this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.backupPatch=null;null!=d&&d()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=e&&e(u);try{if(this.file.errorReportsEnabled)t=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m),this.file.sendErrorReport("Error in merge","From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,
+DrawioFileSync.prototype.catchup=function(a,c,b,d){if(null==d||!d()){var g=this.file.getDescriptorSecret(a),e=this.file.getDescriptorEtag(a),k=this.file.getCurrentEtag();if(k==e)null!=c&&c();else if(this.isValidState()){var m=0,n=!1,q=mxUtils.bind(this,function(){if(null==d||!d())if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(c,b,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+
+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(e)+(null!=g?"&secret="+encodeURIComponent(g):""),mxUtils.bind(this,function(e){this.file.stats.bytesReceived+=e.getText().length;window.clearTimeout(l);if(f&&(null==d||!d()))if(k!=this.file.getCurrentEtag())null!=c&&c();else if(this.isValidState()){var g=null,p=[];if(200<=e.getStatus()&&299>=e.getStatus()&&0<e.getText().length)try{var t=JSON.parse(e.getText());if(null!=t&&0<t.length)for(var z=0;z<t.length;z++){var x=this.stringToObject(t[z]);
+if(x.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)g=x.d.checksum,p.push(x.d.patch);else{n=!0;p=[];break}}}catch(C){p=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,g,a,c,b,d)):m<=this.maxCacheReadyRetries&&!n&&401!=e.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(q,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,b,d))}catch(C){null!=b&&b(C)}}else null!=
+b&&b()}))}else null!=b&&b()});window.setTimeout(q,this.cacheReadyDelay)}else null!=b&&b()}};DrawioFileSync.prototype.reload=function(a,c,b,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b,d)};
+DrawioFileSync.prototype.merge=function(a,c,b,d,g,e){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var k=this.file.ignorePatches(a),m=this.file.getDescriptorEtag(b);if(!k){for(e=0;e<a.length;e++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
+a[e]);var n=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",m,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==n,c);if(null!=c&&c!=n){var q=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m);this.file.checksumError(g,a,"From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+n,m,"merge");return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?
+this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.backupPatch=null;null!=d&&d()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)q=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m),this.file.sendErrorReport("Error in merge","From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,
null,2)),u);else{var l=this.file.getCurrentUser(),p=null!=l?l.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(v){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
-DrawioFileSync.prototype.fileSaved=function(a,c,b,d){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var e=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.ui.getHashValueForPages(a);e=this.ui.diffPages(e,a);c=this.file.getDescriptorEtag(c);
-var g=this.file.getCurrentEtag(),k=this.objectToString(this.createMessage({patch:e,checksum:d})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),n=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=k.length;this.file.stats.msgSent++;mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(g)+"&msg="+encodeURIComponent(m)+(null!=n?"&secret="+encodeURIComponent(n):"")+(k.length<this.maxCacheEntrySize?
-"&data="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",g,k.length,"bytes","diff",e,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};
+DrawioFileSync.prototype.fileSaved=function(a,c,b,d){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.ui.getHashValueForPages(a);g=this.ui.diffPages(g,a);c=this.file.getDescriptorEtag(c);
+var e=this.file.getCurrentEtag(),k=this.objectToString(this.createMessage({patch:g,checksum:d})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),n=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=k.length;this.file.stats.msgSent++;mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(m)+(null!=n?"&secret="+encodeURIComponent(n):"")+(k.length<this.maxCacheEntrySize?
+"&data="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",e,k.length,"bytes","diff",g,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};
DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};DrawioFileSync.prototype.fileConflict=function(a,c,b){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,c,b):this.fileChanged(c,b)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=b&&b({message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),c={a:"leave"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),
this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),
mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="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;function mxAsyncCanvas(a){mxAbstractCanvas2D.call(this);this.htmlCanvas=a;a.images=a.images||[];a.subCanvas=a.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
-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,c,b,d,e){};
+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,c,b,d,g){};
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,c,b,d){};mxAsyncCanvas.prototype.roundrect=function(a,c,b,d,e,g){};mxAsyncCanvas.prototype.ellipse=function(a,c,b,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,c,b,d,e,g,k,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,c,b,d,e,g,k,m,n,t,f,l){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==n&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=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,b,d,e){return b+b+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++};
+mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,c,b,d){};mxAsyncCanvas.prototype.roundrect=function(a,c,b,d,g,e){};mxAsyncCanvas.prototype.ellipse=function(a,c,b,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,c,b,d,g,e,k,m){g=this.rewriteImageSource(g);a=this.htmlCanvas.images[g];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[g]=a,a.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,c,b,d,g,e,k,m,n,q,f,l){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==n&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=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,b,d,g){return b+b+d+d+g+g});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,c){this.state.dx+=a;this.state.dy+=c;this.ctx.translate(a,c)};
-mxJsCanvas.prototype.rotate=function(a,c,b,d,e){d-=this.state.dx;e-=this.state.dy;this.ctx.translate(d,e);(c||b)&&this.ctx.scale(c?-1:1,b?-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,c,b,d,e,g,k,m,n){b=this.ctx.createLinearGradient(0,d,0,d+g);d=this.state;d.fillColor=a;d.fillAlpha=null!=m?m:1;d.gradientColor=c;d.gradientAlpha=null!=n?n:1;d.gradientDirection=k;a=this.hexToRgb(a);c=this.hexToRgb(c);null!=a&&b.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+d.fillAlpha+")");null!=c&&b.addColorStop(1,"rgba("+c.r+","+c.g+","+c.b+","+d.gradientAlpha+")");this.ctx.fillStyle=b};
+mxJsCanvas.prototype.rotate=function(a,c,b,d,g){d-=this.state.dx;g-=this.state.dy;this.ctx.translate(d,g);(c||b)&&this.ctx.scale(c?-1:1,b?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-d,-g)};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,c,b,d,g,e,k,m,n){b=this.ctx.createLinearGradient(0,d,0,d+e);d=this.state;d.fillColor=a;d.fillAlpha=null!=m?m:1;d.gradientColor=c;d.gradientAlpha=null!=n?n:1;d.gradientDirection=k;a=this.hexToRgb(a);c=this.hexToRgb(c);null!=a&&b.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+d.fillAlpha+")");null!=c&&b.addColorStop(1,"rgba("+c.r+","+c.g+","+c.b+","+d.gradientAlpha+")");this.ctx.fillStyle=b};
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 c=0;c<a.length;c++)a[c]=parseInt(a[c],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(c){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var c=0;c<a.length;c++)a[c]=parseInt(a[c],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 c=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+c+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(a,c){this.state.shadowDx=a;this.state.shadowDy=c;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=c)};mxJsCanvas.prototype.moveTo=function(a,c){this.ctx.moveTo(a,c);this.lastMoveX=a;this.lastMoveY=c};mxJsCanvas.prototype.lineTo=function(a,c){this.ctx.lineTo(a,c);this.lastMoveX=a;this.lastMoveY=c};mxJsCanvas.prototype.quadTo=function(a,c,b,d){this.ctx.quadraticCurveTo(a,c,b,d);this.lastMoveX=b;this.lastMoveY=d};
-mxJsCanvas.prototype.arcTo=function(a,c,b,d,e,g,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,c,b,d,e,g,k);if(null!=a)for(c=0;c<a.length;c+=6)this.curveTo(a[c],a[c+1],a[c+2],a[c+3],a[c+4],a[c+5])};mxJsCanvas.prototype.curveTo=function(a,c,b,d,e,g){this.ctx.bezierCurveTo(a,c,b,d,e,g);this.lastMoveX=e;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(a,c,b,d){this.begin();this.moveTo(a,c);this.lineTo(a+b,c);this.lineTo(a+b,c+d);this.lineTo(a,c+d);this.close()};
-mxJsCanvas.prototype.roundrect=function(a,c,b,d,e,g){this.begin();this.moveTo(a+e,c);this.lineTo(a+b-e,c);this.quadTo(a+b,c,a+b,c+g);this.lineTo(a+b,c+d-g);this.quadTo(a+b,c+d,a+b-e,c+d);this.lineTo(a+e,c+d);this.quadTo(a,c+d,a,c+d-g);this.lineTo(a,c+g);this.quadTo(a,c,a+e,c)};mxJsCanvas.prototype.ellipse=function(a,c,b,d){this.ctx.save();this.ctx.translate(a+b/2,c+d/2);this.ctx.scale(b/2,d/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.arcTo=function(a,c,b,d,g,e,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,c,b,d,g,e,k);if(null!=a)for(c=0;c<a.length;c+=6)this.curveTo(a[c],a[c+1],a[c+2],a[c+3],a[c+4],a[c+5])};mxJsCanvas.prototype.curveTo=function(a,c,b,d,g,e){this.ctx.bezierCurveTo(a,c,b,d,g,e);this.lastMoveX=g;this.lastMoveY=e};mxJsCanvas.prototype.rect=function(a,c,b,d){this.begin();this.moveTo(a,c);this.lineTo(a+b,c);this.lineTo(a+b,c+d);this.lineTo(a,c+d);this.close()};
+mxJsCanvas.prototype.roundrect=function(a,c,b,d,g,e){this.begin();this.moveTo(a+g,c);this.lineTo(a+b-g,c);this.quadTo(a+b,c,a+b,c+e);this.lineTo(a+b,c+d-e);this.quadTo(a+b,c+d,a+b-g,c+d);this.lineTo(a+g,c+d);this.quadTo(a,c+d,a,c+d-e);this.lineTo(a,c+e);this.quadTo(a,c,a+g,c)};mxJsCanvas.prototype.ellipse=function(a,c,b,d){this.ctx.save();this.ctx.translate(a+b/2,c+d/2);this.ctx.scale(b/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,c,b,d,e,g,k,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 t=e.height,f=Math.min(b/g,d/t);a+=(b-g*f)/2;c+=(d-t*f)/2;b=g*f;d=t*f}k&&(n.translate(2*a+b,0),n.scale(-1,1));m&&(n.translate(0,2*c+d),n.scale(1,-1));n.drawImage(e,a,c,b,d);n.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,c,b,d,g,e,k,m){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var n=this.ctx;n.save();if(e){e=g.width;var q=g.height,f=Math.min(b/e,d/q);a+=(b-e*f)/2;c+=(d-q*f)/2;b=e*f;d=q*f}k&&(n.translate(2*a+b,0),n.scale(-1,1));m&&(n.translate(0,2*c+d),n.scale(1,-1));n.drawImage(g,a,c,b,d);n.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,c=this.ctx.shadowOffsetX,b=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=c;this.ctx.shadowOffsetY=b}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,c,b,d,e,g,k,m,n,t,f,l){if(null!=e&&0!=e.length){b=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==n){e=this.subCanvas[this.canvasIndex++];n=e.height;l=e.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=n/2/b;break;case mxConstants.ALIGN_BOTTOM:c-=n/b}switch(g){case mxConstants.ALIGN_CENTER:a-=l/2/b;break;case mxConstants.ALIGN_RIGHT:a-=l/b}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(c)-.5,Math.round(e.width/b),Math.round(e.height/b))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(e.width/b),Math.round(e.height/b)));this.ctx.scale(1/b,1/b);this.ctx.drawImage(e,
-Math.round(a*b),Math.round(c*b))}else{this.ctx.save();this.updateFont();l=document.createElement("div");l.innerHTML=e;l.style.position="absolute";l.style.top="-9999px";l.style.left="-9999px";l.style.fontFamily=this.state.fontFamily;l.style.fontWeight="bold";l.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(l);n=[l.offsetWidth,l.offsetHeight];document.body.removeChild(l);e=e.split("\n");l=n[1];this.ctx.textBaseline="top";n=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";c-=(e.length-1)*l/2;n=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=l*(e.length-1),n=c-this.state.fontSize}k=[];l=[];for(b=0;b<e.length;b++)l[b]=a,k[b]=this.ctx.measureText(e[b]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(l[b]-=k[b],g==mxConstants.ALIGN_CENTER&&(l[b]+=k[b]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=l[0];g=k[0];for(b=1;b<e.length;b++)a=Math.min(a,l[b]),g=Math.max(g,k[b]);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(b=0;b<e.length;b++)this.ctx.fillText(e[b],l[b],c),c+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.text=function(a,c,b,d,g,e,k,m,n,q,f,l){if(null!=g&&0!=g.length){b=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==n){g=this.subCanvas[this.canvasIndex++];n=g.height;l=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=n/2/b;break;case mxConstants.ALIGN_BOTTOM:c-=n/b}switch(e){case mxConstants.ALIGN_CENTER:a-=l/2/b;break;case mxConstants.ALIGN_RIGHT:a-=l/b}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(c)-.5,Math.round(g.width/b),Math.round(g.height/b))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(c)-.5,Math.round(g.width/b),Math.round(g.height/b)));this.ctx.scale(1/b,1/b);this.ctx.drawImage(g,
+Math.round(a*b),Math.round(c*b))}else{this.ctx.save();this.updateFont();l=document.createElement("div");l.innerHTML=g;l.style.position="absolute";l.style.top="-9999px";l.style.left="-9999px";l.style.fontFamily=this.state.fontFamily;l.style.fontWeight="bold";l.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(l);n=[l.offsetWidth,l.offsetHeight];document.body.removeChild(l);g=g.split("\n");l=n[1];this.ctx.textBaseline="top";n=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";c-=(g.length-1)*l/2;n=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=l*(g.length-1),n=c-this.state.fontSize}k=[];l=[];for(b=0;b<g.length;b++)l[b]=a,k[b]=this.ctx.measureText(g[b]).width,null!=e&&e!=mxConstants.ALIGN_LEFT&&(l[b]-=k[b],e==mxConstants.ALIGN_CENTER&&(l[b]+=k[b]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=l[0];e=k[0];for(b=1;b<g.length;b++)a=Math.min(a,l[b]),e=Math.max(e,k[b]);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,e,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,n,e,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));this.ctx.restore()}for(b=0;b<g.length;b++)this.ctx.fillText(g[b],l[b],c),c+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,c){mxEventSource.call(this);this.ui=a;this.cookieName=c;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(a){var c=null;isLocalStorage&&(c=localStorage.getItem("."+this.cookieName),null==c&&a&&(c=sessionStorage.getItem("."+this.cookieName)));if(null==c&&"undefined"!=typeof Storage){var b=document.cookie;a=this.cookieName+"=";var d=b.indexOf(a);0<=d&&(d+=a.length,c=b.indexOf(";",d),0>c?c=b.length:postCookie=b.substring(c),c=b.substring(d,c),c=0<c.length?c:null,null!=c&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie=a+"; expires="+
-b.toUTCString(),localStorage.setItem("."+this.cookieName,c)))}return c};DrawioClient.prototype.setPersistentToken=function(a,c){if(null!=a)if(isLocalStorage)c?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+10);b=this.cookieName+"="+a+"; path=/"+(c?"":"; expires="+b.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()};DrawioUser=function(a,c,b,d,e){this.id=a;this.email=c;this.displayName=b;this.pictureUrl=d;this.locale=e};DriveFile=function(a,c,b){DrawioFile.call(this,a,c);this.desc=b};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
+b.toUTCString(),localStorage.setItem("."+this.cookieName,c)))}return c};DrawioClient.prototype.setPersistentToken=function(a,c){if(null!=a)if(isLocalStorage)c?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+10);b=this.cookieName+"="+a+"; path=/"+(c?"":"; expires="+b.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()};DrawioUser=function(a,c,b,d,g){this.id=a;this.email=c;this.displayName=b;this.pictureUrl=d;this.locale=g};DriveFile=function(a,c,b){DrawioFile.call(this,a,c);this.desc=b};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(a){gapi.client.drive.permissions.list({fileId:this.desc.id}).execute(mxUtils.bind(this,function(c){if(null!=c&&null!=c.items)for(var b=0;b<c.items.length;b++)if("anyoneWithLink"===c.items[b].id||"anyone"===c.items[b].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};
-DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.save=function(a,c,b,d,e){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,c,b,d,e)}),b,d,e])};
-DriveFile.prototype.saveFile=function(a,c,b,d,e,g){try{if(!this.isEditable())null!=b&&b();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,g){var m=null,f=null;try{m=this.isModified;f=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var l=this.desc;this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,this.isModified=m,0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
+DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.save=function(a,c,b,d,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,c,b,d,g)}),b,d,g])};
+DriveFile.prototype.saveFile=function(a,c,b,d,g,e){try{if(!this.isEditable())null!=b&&b();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,e){var m=null,f=null;try{m=this.isModified;f=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var l=this.desc;this.ui.drive.saveFile(this,e,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,this.isModified=m,0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(e,l,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),d)):(this.setModified(f||this.isModified()),null!=d&&d(a))}catch(v){if(this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}),mxUtils.bind(this,function(b,c){try{this.savingFile=!1,this.isModified=m,this.setModified(f||this.isModified()),this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=
-!0,this.savingFileTime=new Date,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d()):null!=d&&d(b)}catch(v){if(this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}),e,e,a)}catch(p){if(this.savingFile=!1,null!=m&&(this.isModified=m),null!=f&&this.setModified(f||this.isModified()),null!=d)d(p);else throw p;
-}});k(g,c)}}catch(m){if(null!=d)d(m);else throw m;}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(b){c(b)}}),c,!0)};
+!0,this.savingFileTime=new Date,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d()):null!=d&&d(b)}catch(v){if(this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=m&&(this.isModified=m),null!=f&&this.setModified(f||this.isModified()),null!=d)d(p);else throw p;
+}});k(e,c)}}catch(m){if(null!=d)d(m);else throw m;}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(b){c(b)}}),c,!0)};
DriveFile.prototype.makeCopy=function(a,c,b){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,b),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=c&&c()}))};DriveFile.prototype.saveAs=function(a,c,b){this.ui.drive.copyFile(this.getId(),a,c,b)};
-DriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(e){this.hasSameExtension(a,this.getTitle())?(this.desc=e,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(e)):(this.desc=e,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
+DriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
DriveFile.prototype.move=function(a,c,b){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=c&&c(a)}),b)};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(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};
DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
DriveFile.prototype.getRevisions=function(a,c){this.ui.drive.executeRequest(gapi.client.drive.revisions.list({fileId:this.getId()}),mxUtils.bind(this,function(b){for(var c=0;c<b.items.length;c++)mxUtils.bind(this,function(a){a.title=a.originalFilename;a.getXml=mxUtils.bind(this,function(b,c){this.ui.drive.getXmlFile(a,mxUtils.bind(this,function(a){b(a.getData())}),c)});a.getUrl=mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+a.id+"&chrome=0&nav=1&layers=1&edit=_blank"+
@@ -8940,10 +8952,10 @@ DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototy
DriveFile.prototype.loadPatchDescriptor=function(a,c){this.ui.drive.executeRequest(gapi.client.drive.files.get({fileId:this.getId(),fields:this.ui.drive.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(b){a(b)}),c)};DriveFile.prototype.patchDescriptor=function(a,c){DrawioFile.prototype.patchDescriptor.apply(this,arguments);a.headRevisionId=c.headRevisionId;a.modifiedDate=c.modifiedDate};DriveFile.prototype.loadDescriptor=function(a,c){this.ui.drive.loadDescriptor(this.getId(),a,c)};
DriveFile.prototype.commentsSupported=function(){return!0};
DriveFile.prototype.getComments=function(a,c){function b(a,c,k){if(c.deleted)return null;k=new DriveComment(a,c.commentId||c.replyId,c.content,c.modifiedDate,c.createdDate,"resolved"==c.status,c.author.isAuthenticatedUser?d:new DrawioUser(c.author.permissionId,c.author.emailAddress,c.author.displayName,c.author.picture.url),k);for(var e=0;null!=c.replies&&e<c.replies.length;e++)k.addReplyDirect(b(a,c.replies[e],c.commentId));return k}var d=this.ui.getCurrentUser();this.ui.drive.executeRequest(gapi.client.drive.comments.list({fileId:this.getId()}),
-mxUtils.bind(this,function(c){for(var d=[],e=0;e<c.items.length;e++){var m=b(this,c.items[e]);null!=m&&d.push(m)}a(d)}),c)};DriveFile.prototype.addComment=function(a,c,b){a={content:a.content};this.ui.drive.executeRequest(gapi.client.drive.comments.insert({fileId:this.getId(),resource:a}),mxUtils.bind(this,function(a){c(a.commentId)}),b)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
-DriveFile.prototype.newComment=function(a,c){return new DriveComment(this,null,a,Date.now(),Date.now(),!1,c)};DriveLibrary=function(a,c,b){DriveFile.call(this,a,c,b)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,c,b){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=c&&c(a)}),b)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";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,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;
+mxUtils.bind(this,function(c){for(var d=[],g=0;g<c.items.length;g++){var m=b(this,c.items[g]);null!=m&&d.push(m)}a(d)}),c)};DriveFile.prototype.addComment=function(a,c,b){a={content:a.content};this.ui.drive.executeRequest(gapi.client.drive.comments.insert({fileId:this.getId(),resource:a}),mxUtils.bind(this,function(a){c(a.commentId)}),b)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.newComment=function(a,c){return new DriveComment(this,null,a,Date.now(),Date.now(),!1,c)};DriveLibrary=function(a,c,b){DriveFile.call(this,a,c,b)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,c,b){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=c&&c(a)}),b)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";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";
+"1"==urlParams.photos&&this.scopes.push("https://www.googleapis.com/auth/photos.upload")};mxUtils.extend(DriveClient,mxEventSource);DriveClient.prototype.scopes=["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,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";
+DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";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=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.coolOff=1E3;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};
@@ -8951,151 +8963,152 @@ DriveClient.prototype.setUserId=function(a,c){if(c)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 c=document.cookie.split(";"),b=0;b<c.length;b++){var d=mxUtils.trim(c[b]);if("GUID="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="GUID=; expires="+c.toUTCString(),localStorage.setItem(".guid",a))}return a};
DriveClient.prototype.execute=function(a){var c=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,c)};
-DriveClient.prototype.executeRequest=function(a,c,b){try{var d=!0,e=null,g=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null,this.currentRequest=a,null!=e&&window.clearTimeout(e),e=window.setTimeout(mxUtils.bind(this,function(){d=!1;null!=b&&b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout),a.execute(mxUtils.bind(this,function(m){try{if(window.clearTimeout(e),d)if(null!=m&&null==
-m.error)null!=c&&c(m);else{var n=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,t=null!=n&&0<n.length?n[0].reason:null;null==b||null==m||null==m.error||-1!=m.error.code&&(403!=m.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=t)?403==m.error.code&&null!=this.user||401==m.error.code&&null!=this.user&&"authError"==t?null!=b&&b(m):this.execute(k):
-null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.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))*this.coolOff))):null!=b&&b(m):b(m)}}catch(f){if(null!=b)b(f);else throw f;}}))}catch(m){if(null!=b)b(m);else throw m;}});null==gapi.auth.getToken()?this.execute(k):k()}catch(m){if(null!=b)b(m);else throw m;}};
-DriveClient.prototype.authorize=function(a,c,b,d){try{var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=b&&b();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){try{null!=g&&null==g.error?null!=this.user&&a&&this.user.id==e?null!=c&&c():this.updateUser(c,b,d):null!=b&&b(g),this.resetTokenRefresh(g)}catch(m){if(null!=
+DriveClient.prototype.executeRequest=function(a,c,b){try{var d=!0,g=null,e=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null,this.currentRequest=a,null!=g&&window.clearTimeout(g),g=window.setTimeout(mxUtils.bind(this,function(){d=!1;null!=b&&b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout),a.execute(mxUtils.bind(this,function(m){try{if(window.clearTimeout(g),d)if(null!=m&&null==
+m.error)null!=c&&c(m);else{var n=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,q=null!=n&&0<n.length?n[0].reason:null;null==b||null==m||null==m.error||-1!=m.error.code&&(403!=m.error.code||"domainPolicy"!=q&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=q)?403==m.error.code&&null!=this.user||401==m.error.code&&null!=this.user&&"authError"==q?null!=b&&b(m):this.execute(k):
+null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==a&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=b&&b(m):b(m)}}catch(f){if(null!=b)b(f);else throw f;}}))}catch(m){if(null!=b)b(m);else throw m;}});null==gapi.auth.getToken()?this.execute(k):k()}catch(m){if(null!=b)b(m);else throw m;}};
+DriveClient.prototype.authorize=function(a,c,b,d){try{var g=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(g=this.ui.stateArg.userId);if(a&&null==g)null!=b&&b();else{var e={scope:this.scopes,client_id:this.clientId};a&&null!=g?(e.immediate=!0,e.user_id=g):(e.immediate=!1,e.authuser=-1);gapi.auth.authorize(e,mxUtils.bind(this,function(e){try{null!=e&&null==e.error?null!=this.user&&a&&this.user.id==g?null!=c&&c():this.updateUser(c,b,d):null!=b&&b(e),this.resetTokenRefresh(e)}catch(m){if(null!=
b)b(m);else throw m;}}))}}catch(k){if(null!=b)b(k);else throw k;}};
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 c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();c&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
DriveClient.prototype.updateUser=function(a,c,b){try{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(c){var d=mxResources.get("notAvailable"),g=d,k=null;null!=c&&null!=c.user&&(d=c.user.emailAddress,g=c.user.displayName,k=null!=c.user.picture?c.user.picture.url:null);this.setUser(new DrawioUser(e.id,
-d,g,k,e.locale));this.setUserId(e.id,b);null!=a&&a()}),c)}),c)}catch(e){if(null!=c)c(e);else throw e;}};DriveClient.prototype.copyFile=function(a,c,b,d){null!=a&&null!=c&&this.executeRequest(gapi.client.drive.files.copy({fileId:a,fields:this.allFields,supportsTeamDrives:!0,resource:{title:c,properties:[{key:"channel",value:Editor.guid()}]}}),b,d)};DriveClient.prototype.renameFile=function(a,c,b,d){null!=a&&null!=c&&this.executeRequest(this.createDriveRequest(a,{title:c}),b,d)};
+d,g,k,e.locale));this.setUserId(e.id,b);null!=a&&a()}),c)}),c)}catch(g){if(null!=c)c(g);else throw g;}};DriveClient.prototype.copyFile=function(a,c,b,d){null!=a&&null!=c&&this.executeRequest(gapi.client.drive.files.copy({fileId:a,fields:this.allFields,supportsTeamDrives:!0,resource:{title:c,properties:[{key:"channel",value:Editor.guid()}]}}),b,d)};DriveClient.prototype.renameFile=function(a,c,b,d){null!=a&&null!=c&&this.executeRequest(this.createDriveRequest(a,{title:c}),b,d)};
DriveClient.prototype.moveFile=function(a,c,b,d){null!=a&&null!=c&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:c}]}),b,d)};DriveClient.prototype.createDriveRequest=function(a,c){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(c)})};DriveClient.prototype.getLibrary=function(a,c,b){return this.getFile(a,c,b,!0,!0)};
-DriveClient.prototype.loadDescriptor=function(a,c,b,d){this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:null!=d?d:this.allFields,supportsTeamDrives:!0}),c,b)};DriveClient.prototype.getCustomProperty=function(a,c){var b=a.properties,d=null;if(null!=b)for(var e=0;e<b.length;e++)if(b[e].key==c){d=b[e].value;break}return d};
-DriveClient.prototype.getFile=function(a,c,b,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(d){d.title=d.originalFilename;d.headRevisionId=d.id;d.id=a;this.getXmlFile(d,c,b)}),b):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var g=/\.png$/i.test(a.title);if(/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
-g){var m=a.downloadUrl+"&access_token="+gapi.auth.getToken().access_token;this.ui.convertFile(m,a.title,a.mimeType,this.extension,c,b)}else d||e||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,c,b,!0,e):this.isGoogleRealtimeMimeType(a.mimeType)?this.convertRealtimeFile(a,c,b):this.getXmlFile(a,c,b)}else b({message:mxResources.get("loggedOut")})}catch(n){if(null!=b)b(n);else throw n;}}),b)};
+DriveClient.prototype.loadDescriptor=function(a,c,b,d){this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:null!=d?d:this.allFields,supportsTeamDrives:!0}),c,b)};DriveClient.prototype.getCustomProperty=function(a,c){var b=a.properties,d=null;if(null!=b)for(var g=0;g<b.length;g++)if(b[g].key==c){d=b[g].value;break}return d};
+DriveClient.prototype.getFile=function(a,c,b,d,g){d=null!=d?d:!1;g=null!=g?g:!1;null!=urlParams.rev?this.executeRequest(gapi.client.drive.revisions.get({fileId:a,revisionId:urlParams.rev,supportsTeamDrives:!0}),mxUtils.bind(this,function(d){d.title=d.originalFilename;d.headRevisionId=d.id;d.id=a;this.getXmlFile(d,c,b)}),b):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var e=/\.png$/i.test(a.title);if(/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
+e){var m=a.downloadUrl+"&access_token="+gapi.auth.getToken().access_token;this.ui.convertFile(m,a.title,a.mimeType,this.extension,c,b)}else d||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,c,b,!0,g):this.isGoogleRealtimeMimeType(a.mimeType)?this.convertRealtimeFile(a,c,b):this.getXmlFile(a,c,b)}else b({message:mxResources.get("loggedOut")})}catch(n){if(null!=b)b(n);else throw n;}}),b)};
DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
-DriveClient.prototype.getRealtimeData=function(a,c,b,d){this.executeRequest(gapi.client.drive.realtime.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(d){d=null!=d.result?d.result.data:null;null!=d&&null!=d.value&&null!=d.value.diagrams?c(d):null!=b&&b({message:"realtime.get returned invalid data for "+a})}),mxUtils.bind(this,function(e){null==d&&(d=0);3>d?window.setTimeout(mxUtils.bind(this,function(){this.getRealtimeData(a,c,b,d+1)}),100*(d+1)):null!=b&&b({message:"realtime.get failed for "+
-a})}))};DriveClient.prototype.loadRealtime=function(a,c,b){"1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType?c():this.redirectToNewApp(b,a.id)};
-DriveClient.prototype.getXmlFile=function(a,c,b,d,e){try{var g=gapi.auth.getToken().access_token,k=a.downloadUrl+"&access_token="+g;this.ui.loadUrl(k,mxUtils.bind(this,function(d){try{if(null==d)b({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||e)a.mimeType!=this.libraryMimeType||e?c(new DriveLibrary(this.ui,d,a)):b({message:mxResources.get("notADiagramFile")});else{var g=!1;if(/\.png$/i.test(a.title)){var m=d.lastIndexOf(",");if(0<m){var f=this.ui.extractGraphModelFromPng(d.substring(m+
-1));if(null!=f&&0<f.length)d=f;else try{var f=d.substring(m+1),l=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(f):atob(f),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?g=!0:d=l}catch(u){g=!0}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(l=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,
-k)?this.ui.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(d){try{4==d.readyState&&(200<=d.status&&299>=d.status?c(new LocalFile(this.ui,d.responseText,a.title+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(v){if(null!=b)b(v);else throw v;}}),a.title):c(g?new LocalFile(this.ui,d,a.title,!0):new DriveFile(this.ui,d,a))}}catch(u){if(null!=b)b(u);else throw u;}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=
+DriveClient.prototype.getRealtimeData=function(a,c,b,d){0>App.GOOGLE_REALTIME_EOL-Date.now()?b({message:"Google Realtime API export endpoint no longer available"}):this.executeRequest(gapi.client.drive.realtime.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(d){d=null!=d.result?d.result.data:null;null!=d&&null!=d.value&&null!=d.value.diagrams?c(d):null!=b&&b({message:"realtime.get returned invalid data for "+a})}),mxUtils.bind(this,function(g){null==d&&(d=0);3>d?window.setTimeout(mxUtils.bind(this,
+function(){this.getRealtimeData(a,c,b,d+1)}),100*(d+1)):null!=b&&b({message:"realtime.get failed for "+a})}))};DriveClient.prototype.loadRealtime=function(a,c,b){"1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType?c():this.redirectToNewApp(b,a.id)};
+DriveClient.prototype.getXmlFile=function(a,c,b,d,g){try{var e=gapi.auth.getToken().access_token,k=a.downloadUrl+"&access_token="+e;this.ui.loadUrl(k,mxUtils.bind(this,function(d){try{if(null==d)b({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,d,a)):b({message:mxResources.get("notADiagramFile")});else{var e=!1;if(/\.png$/i.test(a.title)){var m=d.lastIndexOf(",");if(0<m){var f=this.ui.extractGraphModelFromPng(d.substring(m+
+1));if(null!=f&&0<f.length)d=f;else try{var f=d.substring(m+1),l=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(f):atob(f),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?e=!0:d=l}catch(u){e=!0}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(l=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,
+k)?this.ui.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(d){try{4==d.readyState&&(200<=d.status&&299>=d.status?c(new LocalFile(this.ui,d.responseText,a.title+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(v){if(null!=b)b(v);else throw v;}}),a.title):c(e?new LocalFile(this.ui,d,a.title,!0):new DriveFile(this.ui,d,a))}}catch(u){if(null!=b)b(u);else throw u;}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=
a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}catch(m){if(null!=b)b(m);else throw m;}};
-DriveClient.prototype.saveFile=function(a,c,b,d,e,g,k,m){try{a.saveLevel=1;var n=mxUtils.bind(this,function(b){a.saveLevel=null;if(null!=d)d(b);else throw b;try{if(!a.isConflict(b)){var c="error_"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code_"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
-(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:c,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(y){}}),t=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+
-"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(D){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),l=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;g=null!=g?g:!1;var q=mxUtils.bind(this,function(d,e,q){try{a.saveLevel=3;var y=null,F=!1,
-x={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)?(x.mimeType=this.xmlMimeType,y=a.desc,F=c=!0):"application/octet-stream"==x.mimeType&&(x.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));q||(null!=d||g||(d=this.placeholderThumbnail,e=this.placeholderMimeType),
-null!=d&&null!=e&&(x.thumbnail={image:d,mimeType:e}));var z=a.getData(),A=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||l==d.etag||c&&u==d.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");l==d.etag&&g.push("stale etag");c&&u==d.headRevisionId&&g.push("stale revision");var k=g.join(", ");n({message:mxResources.get("errorSavingFile")+": "+k},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+
+DriveClient.prototype.saveFile=function(a,c,b,d,g,e,k,m){try{a.saveLevel=1;var n=mxUtils.bind(this,function(b){a.saveLevel=null;if(null!=d)d(b);else throw b;try{if(!a.isConflict(b)){var c="error_"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code_"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:c,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(y){}}),q=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+
+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(C){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),l=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());g=null!=g?g:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;e=null!=e?e:!1;var t=mxUtils.bind(this,function(d,g,y){try{a.saveLevel=3;var t=null,E=!1,
+A={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)?(A.mimeType=this.xmlMimeType,t=a.desc,E=c=!0):"application/octet-stream"==A.mimeType&&(A.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));y||(null!=d||e||(d=this.placeholderThumbnail,g=this.placeholderMimeType),
+null!=d&&null!=g&&(A.thumbnail={image:d,mimeType:g}));var x=a.getData(),z=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||l==d.etag||c&&u==d.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");l==d.etag&&g.push("stale etag");c&&u==d.headRevisionId&&g.push("stale revision");var k=g.join(", ");n({message:mxResources.get("errorSavingFile")+": "+k},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+
(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+" "+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nErrors="+k+"\nOld="+u+" "+p+" etag-hash="+this.ui.hashValue(l)+"\nNew="+d.headRevisionId+" "+d.modifiedDate+" etag-hash="+this.ui.hashValue(d.etag)),EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(l)+"-to-"+d.headRevisionId+"."+d.modifiedDate+
-"-"+this.ui.hashValue(d.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else{a.saveLevel=null;b(d,z);if(null!=y){this.executeRequest(gapi.client.drive.revisions.get({fileId:y.id,revisionId:y.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:y.id,revisionId:y.headRevisionId,resource:a}))})));
-try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+y.id+"."+y.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+a.getHash()+"-rev0_"+u+"-mod0_"+p,action:"rev-"+d.headRevisionId+"-mod_"+d.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
-(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(K){}}}catch(K){t(K)}}),D=mxUtils.bind(this,function(b,e){a.saveLevel=4;try{null!=m&&(x.properties=m);var f=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(d){a.saveLevel=
-5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),4*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||k,e,d?null:f,F),mxUtils.bind(this,function(a){window.clearTimeout(p);m&&A(a)}),mxUtils.bind(this,function(b){window.clearTimeout(p);if(m){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),
-fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(l,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{l(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(fa){}}else n(b,c)}catch(fa){t(fa)}}),mxUtils.bind(this,function(){n(b)})):
-n(b)}catch(ha){t(ha)}}}))}catch(Z){t(Z)}});if(v&&null==d){a.saveLevel=8;var p=new Image;p.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/p.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(p.height*a);b.getContext("2d").drawImage(p,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");x.thumbnail={image:c,mimeType:"image/png"};l(!1)}catch(W){l(!1)}});p.src="data:image/png;base64,"+b}else l(!1)}catch(V){t(V)}});
-v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),n,this.ui.getCurrentFile()!=a?z:null):D(z,!1)}catch(G){t(G)}}),A=mxUtils.bind(this,function(){try{if(a.saveLevel=2,g||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=
-c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(y){c=null}q(c,"image/png")}catch(y){t(y)}})))a.thumbTime=null,q(null,null,a.constructor!=DriveLibrary)}catch(z){t(z)}});e||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(z){t(z)}};
-DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(b||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(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!=
+"-"+this.ui.hashValue(d.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else{a.saveLevel=null;b(d,x);if(null!=t){this.executeRequest(gapi.client.drive.revisions.get({fileId:t.id,revisionId:t.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:t.id,revisionId:t.headRevisionId,resource:a}))})));
+try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+t.id+"."+t.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+a.getHash()+"-rev0_"+u+"-mod0_"+p,action:"rev-"+d.headRevisionId+"-mod_"+d.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(K){}}}catch(K){q(K)}}),C=mxUtils.bind(this,function(b,e){a.saveLevel=4;try{null!=m&&(A.properties=m);var f=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(d){a.saveLevel=
+5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),4*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),A,b,c||d||k,e,d?null:f,E),mxUtils.bind(this,function(a){window.clearTimeout(p);m&&z(a)}),mxUtils.bind(this,function(b){window.clearTimeout(p);if(m){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),
+fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(l,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{l(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(fa){}}else n(b,c)}catch(fa){q(fa)}}),mxUtils.bind(this,function(){n(b)})):
+n(b)}catch(ha){q(ha)}}}))}catch(Z){q(Z)}});if(v&&null==d){a.saveLevel=8;var p=new Image;p.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/p.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(p.height*a);b.getContext("2d").drawImage(p,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");A.thumbnail={image:c,mimeType:"image/png"};l(!1)}catch(W){l(!1)}});p.src="data:image/png;base64,"+b}else l(!1)}catch(V){q(V)}});
+v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){C(a,!0)}),n,this.ui.getCurrentFile()!=a?x:null):C(x,!1)}catch(I){q(I)}}),z=mxUtils.bind(this,function(){try{if(a.saveLevel=2,e||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=
+c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(y){c=null}t(c,"image/png")}catch(y){q(y)}})))a.thumbTime=null,t(null,null,a.constructor!=DriveLibrary)}catch(x){q(x)}});g||!c?z():this.verifyMimeType(a.getId(),z,!0)}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(x){q(x)}};
+DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var g=(new Date).getTime();if(b||g-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=g,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!=
c&&c()})))};
DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#G"+c,d=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),d,mxUtils.bind(this,function(){this.redirectDialogShowing=
-!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),d)}};DriveClient.prototype.insertFile=function(a,c,b,d,e,g,k){g=null!=g?g:this.xmlMimeType;a={mimeType:g,title:a};null!=b&&(a.parents=[{kind:"drive#fileLink",id:b}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,k),mxUtils.bind(this,function(a){g==this.libraryMimeType?d(new DriveLibrary(this.ui,c,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):d(new DriveFile(this.ui,c,a))}),e)};
-DriveClient.prototype.createUploadRequest=function(a,c,b,d,e,g,k){e=null!=e?e:!1;var m={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=g&&(m["If-Match"]=g);a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:m,body:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+
-(null!=b?e?b:Base64.encode(b):"")+"\r\n---------314159265358979323846--"};d||(a.params.newRevision=!1);k&&(a.params.pinned=!0);a.params.supportsTeamDrives=!0;a.params.fields=this.allFields;return gapi.client.request(a)};
-DriveClient.prototype.pickFile=function(a,c){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(){try{this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=c?"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 g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),k=(new google.picker.DocsView).setIncludeFolders(!0),m=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(g.setMimeTypes("*/*"),k.setMimeTypes("*/*"),m.setMimeTypes("*/*")):
-(g.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes),m.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(g).addView(k).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n).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)}catch(t){this.ui.spinner.stop(),this.ui.handleError(t)}}))};
+!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),d)}};DriveClient.prototype.insertFile=function(a,c,b,d,g,e,k){e=null!=e?e:this.xmlMimeType;a={mimeType:e,title:a};null!=b&&(a.parents=[{kind:"drive#fileLink",id:b}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,k),mxUtils.bind(this,function(a){e==this.libraryMimeType?d(new DriveLibrary(this.ui,c,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):d(new DriveFile(this.ui,c,a))}),g)};
+DriveClient.prototype.createUploadRequest=function(a,c,b,d,g,e,k){g=null!=g?g:!1;var m={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=e&&(m["If-Match"]=e);a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:m,body:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+
+(null!=b?g?b:Base64.encode(b):"")+"\r\n---------314159265358979323846--"};d||(a.params.newRevision=!1);k&&(a.params.pinned=!0);a.params.supportsTeamDrives=!0;a.params.fields=this.allFields;return gapi.client.request(a)};
+DriveClient.prototype.pickFile=function(a,c){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(){try{this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=c?"genericPicker":"filePicker",g=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==
+mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",g),this[d].setVisible(!1))});if(null==this[d]||this[d+"Token"]!=a){this[d+"Token"]=a;var e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),k=(new google.picker.DocsView).setIncludeFolders(!0),m=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(e.setMimeTypes("*/*"),k.setMimeTypes("*/*"),m.setMimeTypes("*/*")):
+(e.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes),m.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(e).addView(k).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
+"click",g);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",g);this[d].setVisible(!0)}catch(q){this.ui.spinner.stop(),this.ui.handleError(q)}}))};
DriveClient.prototype.pickFolder=function(a,c){this.folderPickerCallback=a;var b=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{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 c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),k=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),m=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");
this.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(this.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(k).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder")).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
"click",b);this.folderPickerCallback(a)})).build()}mxEvent.addListener(document,"click",b);this.folderPicker.setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))}catch(d){this.ui.handleError(d)}});c?b():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){b()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};
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(){try{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))}),b=gapi.auth.getToken().access_token;if(null==this.libraryPicker||this.libraryPickerToken!=b){this.libraryPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),e=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+
-",application/xml,text/plain,application/octet-stream"),g=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),k=(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(d).addView(e).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(k).setCallback(mxUtils.bind(this,
+mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",a),this.libraryPicker.setVisible(!1))}),b=gapi.auth.getToken().access_token;if(null==this.libraryPicker||this.libraryPickerToken!=b){this.libraryPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),g=(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"),k=(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(d).addView(g).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(k).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)}catch(m){this.ui.spinner.stop(),this.ui.handleError(m)}}))};
DriveClient.prototype.showPermissions=function(a){var c=mxUtils.bind(this,function(){var b=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+a)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(b.container,360,190,!0,!0);b.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var b=new gapi.drive.share.ShareClient(this.appId);
b.setOAuthToken(gapi.auth.getToken().access_token);b.setItemIds([a]);b.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(a){for(var b=!1,d=0;d<a.length;d++)for(var k=0;k<a[d].addedNodes.length;k++){var m=a[d].addedNodes[k];"BUTTON"==m.nodeName&&"ok"==m.getAttribute("name")&&null!=m.parentNode&&null!=m.parentNode.parentNode&&"dialog"==m.parentNode.parentNode.getAttribute("role")?
(this.sharingFailed=!0,m.click(),c(),b=!0):"DIV"==m.nodeName&&"shr-q-shr-r-shr-xb"==m.className&&(b=!0)}b&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(d){this.ui.handleError(d)}}))};DriveClient.prototype.getRealtimeAge=function(a,c){var b=null!=c&&null!=c.value&&null!=c.value.modifiedDate?c.value.modifiedDate.json:null,d=0;null!=b&&0<b&&(b=new Date(b),d=(new Date(a.modifiedDate)).getTime()-b.getTime());return d};
-DriveClient.prototype.convertRealtimeFile=function(a,c,b){var d=mxUtils.bind(this,function(a){a.convertedFrom="xml";c(a)}),e=mxUtils.bind(this,function(a){a.convertedFrom="json";c(a)});this.getRealtimeData(a.id,mxUtils.bind(this,function(c){try{3E5>this.getRealtimeAge(a,c)?e(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a)):this.getXmlFile(a,d,mxUtils.bind(this,function(){try{e(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a))}catch(k){this.getXmlFile(a,d,b)}}))}catch(k){this.getXmlFile(a,
-d,b)}}),mxUtils.bind(this,function(){this.getXmlFile(a,d,b)}))};DriveClient.prototype.convertJsonToXml=function(a,c){if(null==a.value||null==a.value.diagrams)throw Error("Invalid JSON: no diagrams in root map");for(var b=mxUtils.createXmlDocument().createElement("mxfile"),d=a.value.diagrams.value,e=0;e<d.length;e++)try{var g=this.decodeJsonPage(d[e].value,b.ownerDocument.createElement("diagram"),c);b.appendChild(g)}catch(k){throw Error("Error on page "+e+": "+k.stack);}return b};
-DriveClient.prototype.decodeJsonPage=function(a,c,b){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);b?c.appendChild(d):mxUtils.setTextContent(c,Graph.compressNode(d));null!=a.id?c.setAttribute("id",a.id.json):c.setAttribute("id",Editor.guid());null!=a.name&&c.setAttribute("name",a.name.json);return c};
+DriveClient.prototype.convertRealtimeFile=function(a,c,b){var d=mxUtils.bind(this,function(a){a.convertedFrom="xml";c(a)}),g=mxUtils.bind(this,function(a){a.convertedFrom="json";c(a)});this.getRealtimeData(a.id,mxUtils.bind(this,function(c){try{3E5>this.getRealtimeAge(a,c)?g(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a)):this.getXmlFile(a,d,mxUtils.bind(this,function(){try{g(new DriveFile(this.ui,mxUtils.getXml(this.convertJsonToXml(c)),a))}catch(k){this.getXmlFile(a,d,b)}}))}catch(k){this.getXmlFile(a,
+d,b)}}),mxUtils.bind(this,function(){this.getXmlFile(a,d,b)}))};DriveClient.prototype.convertJsonToXml=function(a,c){if(null==a.value||null==a.value.diagrams)throw Error("Invalid JSON: no diagrams in root map");for(var b=mxUtils.createXmlDocument().createElement("mxfile"),d=a.value.diagrams.value,g=0;g<d.length;g++)try{var e=this.decodeJsonPage(d[g].value,b.ownerDocument.createElement("diagram"),c);b.appendChild(e)}catch(k){throw Error("Error on page "+g+": "+k.stack);}return b};
+DriveClient.prototype.decodeJsonPage=function(a,c,b){if(null==a)throw Error("Invalid JSON: json for page is null");var d=new mxCodec,g=this.createJsonCell(a.root,d);if(null==g)throw Error("Invalid JSON: no root cell for page");d=d.encode(new mxGraphModel(g));this.decodeJsonViewState(a,d);b?c.appendChild(d):mxUtils.setTextContent(c,Graph.compressNode(d));null!=a.id?c.setAttribute("id",a.id.json):c.setAttribute("id",Editor.guid());null!=a.name&&c.setAttribute("name",a.name.json);return c};
DriveClient.prototype.decodeJsonViewState=function(a,c){var b=null!=a.pageFormat?a.pageFormat.json:null;null!=b&&0<b.length&&(b=b.split(","),1<b.length&&(c.setAttribute("pageWidth",b[0]),c.setAttribute("pageHeight",b[1])));b=null!=a.backgroundColor?a.backgroundColor.json:null;null!=b&&0<b.length&&c.setAttribute("background",b);b=null!=a.backgroundImage?a.backgroundImage.json:null;null!=b&&0<b.length&&c.setAttribute("backgroundImage",b);c.setAttribute("fold",null!=a.foldingEnabled?a.foldingEnabled.json:
"0");c.setAttribute("pageScale",null!=a.pageScale?a.pageScale.json:mxGraph.prototype.pageScale);c.setAttribute("math",null!=a.mathEnabled?a.mathEnabled.json:"0");c.setAttribute("shadow",null!=a.shadowVisible?a.shadowVisible.json:"0");return c};
-DriveClient.prototype.createJsonCell=function(a,c){if(null!=a&&null!=a.id){var b=a.value,d=this.jsonToCell(b,c);c.putObject(a.id,d);d.source=null!=b.source?this.createJsonCell(b.source,c):null;d.target=null!=b.target?this.createJsonCell(b.target,c):null;this.createJsonCell(b.parent,c);for(var e=0;e<b.children.value.length;e++){var g=this.createJsonCell(b.children.value[e],c);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?
+DriveClient.prototype.createJsonCell=function(a,c){if(null!=a&&null!=a.id){var b=a.value,d=this.jsonToCell(b,c);c.putObject(a.id,d);d.source=null!=b.source?this.createJsonCell(b.source,c):null;d.target=null!=b.target?this.createJsonCell(b.target,c):null;this.createJsonCell(b.parent,c);for(var g=0;g<b.children.value.length;g++){var e=this.createJsonCell(b.children.value[g],c);if(null!=e)d.insert(e);else throw Error("Invalid JSON: no child "+g+" for cell "+a.id);}return d}return null!=a&&null!=a.ref?
c.objects[a.ref]:null};
DriveClient.prototype.jsonToCell=function(a,c){var b=new mxCell;b.id=a.cellId.json;b.vertex="vertex"==a.type.json;b.edge="edge"==a.type.json;b.connectable="0"!=a.connectable.json;b.collapsed="1"==a.collapsed.json;b.visible="0"!=a.visible.json;b.style=null!=a.style?a.style.json:null;b.value=null!=a.xmlValue?mxUtils.parseXml(a.xmlValue.json).documentElement:null!=a.value?a.value.json:null;b.geometry=null!=a.geometry?c.decode(mxUtils.parseXml(a.geometry.json).documentElement):null;return b};
DriveClient.prototype.checkRealtimeFiles=function(a){var c=null!=this.user&&null!=this.user.email?this.user.email:null;this.executeRequest(gapi.client.drive.files.list({maxResults:1,q:"mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=c?" and '"+c+"' in writers":""),includeTeamDriveItems:!0,supportsTeamDrives:!0}),mxUtils.bind(this,function(b){null!=b&&(null!=b.nextPageToken||null!=b.items&&0<b.items.length)&&a()}))};
-DriveClient.prototype.convertRealtimeFiles=function(){var a=document.createElement("div");a.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:8px;background:#ffffff;z-index:2;overflow:auto;white-space:nowrap;line-height:1.5em;";document.body.appendChild(a);var c=Date.now(),b=mxUtils.bind(this,function(b,c){a.innerHTML+=b+(c?"":"<br>");a.scrollTop=a.scrollHeight});b("draw.io ("+EditorUi.VERSION+") is searching files to be converted...");b('<a href="https://desk.draw.io/support/solutions/articles/16000092210" target="_blank">Click here for help</a>');
-this.ui.spinner.spin(document.body,"Searching files...")?this.checkToken(mxUtils.bind(this,function(){var a={},e=0,g=0,k=0,m=0,n=0,t=0,f=0,l=0,p=0,u=null!=this.user&&null!=this.user.email?this.user.email:null,v="mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=u?" and '"+u+"' in writers":""),q=mxUtils.bind(this,function(){this.ui.spinner.stop();b("<br>Conversion complete. Successfully converted "+e+" file(s).",!0);0<f?b(" Failed to convert "+f+' file(s).<br><br><b>ACTION REQUIRED:</b><br><ul><li>Click <a target="_blank" href="https://drive.google.com/drive/u/0/search?q=type:application/vnd.jgraph.mxfile.realtime">here</a> to list all affected files</li><li>Open each file in turn by right-clicking the file and selecting open with draw.io</li><li>Open each file in turn. When loaded, select File->Save</li></ul>'):
-b("<br><br>This window can now be closed.");try{var a=Date.now()-c;EditorUi.logEvent({category:"AUTO-CONVERT",action:"total_"+l+"-done_"+e+"-fail_"+f+"-xml_"+k+"-json_"+g+"-load_"+m+"-save_"+t+"-invalid_"+n+"-dt-"+Math.round(a/1E3),label:null!=this.user?"user_"+this.user.id:"-nouser"})}catch(F){}}),A=function(a){return null==a?"":null!=a.message?a.message:null!=a.error&&null!=a.error.message?a.error.message:""},z=mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,"Converting "+l+" file(s)")){b("Found "+
-l+" file(s). This will take up to "+Math.ceil(5E3*l/6E4)+" minute(s). <b>Please do not close this window!</b><br>");var c=0,d=mxUtils.bind(this,function(y,B){var x={maxResults:1,q:v,includeTeamDriveItems:!0,supportsTeamDrives:!0};null!=y&&(x.pageToken=y);var u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;d(y,B)}),this.ui.timeout);this.executeRequest(gapi.client.drive.files.list(x),mxUtils.bind(this,function(x){window.clearTimeout(F);if(u){var C=mxUtils.bind(this,function(){null!=x.nextPageToken?
-d(x.nextPageToken):q()});if(null!=x&&null!=x.error)p++,4>p?d(y,B):(this.ui.spinner.stop(),b("Query for next file failed multiple times. Exiting.<br><br>This window can now be closed."));else if(null==x||null!=x.items&&0!=x.items.length||null==x.nextPageToken)if(null!=x&&null!=x.items&&0<x.items.length){var v=x.items[0].id;this.ui.spinner.stop();c++;this.ui.spinner.spin(document.body,"Converting file "+c+" of "+l)&&(b("Converting "+c+" of "+l+': "'+mxUtils.htmlEntities(x.items[0].title)+'" (<a href="https://drive.google.com/open?id='+
-v+'" target="_blank">'+v+"</a>)... ",!0),window.setTimeout(mxUtils.bind(this,function(){null==a[v]?(u=a[v]=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;m++;b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');C()}),this.ui.timeout),this.getFile(v,mxUtils.bind(this,function(a){window.clearTimeout(F);u&&(a.constructor==DriveFile?("json"==a.convertedFrom?g++:k++,u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;t++;b('<img src="'+
-this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');C()}),this.ui.timeout),this.saveFile(a,null,mxUtils.bind(this,function(){window.clearTimeout(F);u&&(e++,b('OK <img src="'+Editor.checkmarkImage+'" border="0" valign="middle"/>'),C())}),mxUtils.bind(this,function(a){window.clearTimeout(F);u&&(a=A(a),f++,t++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),C())}))):(f++,n++,b('<img src="'+this.ui.editor.graph.warningImage.src+
-'" border="0" valign="absmiddle"/> Invalid file'),C()))}),mxUtils.bind(this,function(a){window.clearTimeout(F);u&&(a=A(a),f++,m++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),C())}))):(this.ui.spinner.stop(),b("Search returned duplicate file "+v+". Exiting.<br><br>This window can now be closed."))}),null!=B?B:2E3))}else q();else d(x.nextPageToken,1E4)}}))});d()}}),D={maxResults:1E4,q:v,includeTeamDriveItems:!0,supportsTeamDrives:!0},y=mxUtils.bind(this,
-function(a){null!=a&&(D.pageToken=a);this.executeRequest(gapi.client.drive.files.list(D),mxUtils.bind(this,function(a){l+=null!=a&&null!=a.items?a.items.length:0;null!=a.nextPageToken?y(a.nextPageToken):(this.ui.spinner.stop(),this.ui.showError("Confirm","You are about to convert "+l+" file(s)","Cancel",mxUtils.bind(this,function(){b("Cancelled by user.<br><br>This window can now be closed.")}),null,"OK",z,"Help",function(){window.open("https://desk.draw.io/support/solutions/articles/16000092210")},
-340,120))}))});y()})):(this.ui.spinner.stop(),b("Busy. <br><br>This window can now be closed."))};DropboxFile=function(a,c,b){DrawioFile.call(this,a,c);this.stat=b};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
+DriveClient.prototype.convertRealtimeFiles=function(){var a=document.createElement("div");a.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:8px;background:#ffffff;z-index:2;overflow:auto;white-space:nowrap;line-height:1.5em;";document.body.appendChild(a);var c=Date.now(),b=mxUtils.bind(this,function(b,c){a.innerHTML+=b+(c?"":"<br>");a.scrollTop=a.scrollHeight});0>App.GOOGLE_REALTIME_EOL-Date.now()?b("draw.io ("+EditorUi.VERSION+"): Google Realtime API export endpoint no longer available"):
+(b("draw.io ("+EditorUi.VERSION+") is searching files to be converted..."),b('<a href="https://desk.draw.io/support/solutions/articles/16000092210" target="_blank">Click here for help</a>'),this.ui.spinner.spin(document.body,"Searching files...")?this.checkToken(mxUtils.bind(this,function(){var a={},g=0,e=0,k=0,m=0,n=0,q=0,f=0,l=0,p=0,u=null!=this.user&&null!=this.user.email?this.user.email:null,v="mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=u?" and '"+u+"' in writers":""),t=mxUtils.bind(this,
+function(){this.ui.spinner.stop();b("<br>Conversion complete. Successfully converted "+g+" file(s).",!0);0<f?b(" Failed to convert "+f+' file(s).<br><br><b>ACTION REQUIRED:</b><br><ul><li>Click <a target="_blank" href="https://drive.google.com/drive/u/0/search?q=type:application/vnd.jgraph.mxfile.realtime">here</a> to list all affected files</li><li>Open each file in turn by right-clicking the file and selecting open with draw.io</li><li>Open each file in turn. When loaded, select File->Save</li></ul>'):
+b("<br><br>This window can now be closed.");try{var a=Date.now()-c;EditorUi.logEvent({category:"AUTO-CONVERT",action:"total_"+l+"-done_"+g+"-fail_"+f+"-xml_"+k+"-json_"+e+"-load_"+m+"-save_"+q+"-invalid_"+n+"-dt-"+Math.round(a/1E3),label:null!=this.user?"user_"+this.user.id:"-nouser"})}catch(E){}}),z=function(a){return null==a?"":null!=a.message?a.message:null!=a.error&&null!=a.error.message?a.error.message:""},x=mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,"Converting "+l+" file(s)")){b("Found "+
+l+" file(s). This will take up to "+Math.ceil(5E3*l/6E4)+" minute(s). <b>Please do not close this window!</b><br>");var c=0,d=mxUtils.bind(this,function(y,B){var u={maxResults:1,q:v,includeTeamDriveItems:!0,supportsTeamDrives:!0};null!=y&&(u.pageToken=y);var A=!0,E=window.setTimeout(mxUtils.bind(this,function(){A=!1;d(y,B)}),this.ui.timeout);this.executeRequest(gapi.client.drive.files.list(u),mxUtils.bind(this,function(u){window.clearTimeout(E);if(A){var x=mxUtils.bind(this,function(){null!=u.nextPageToken?
+d(u.nextPageToken):t()});if(null!=u&&null!=u.error)p++,4>p?d(y,B):(this.ui.spinner.stop(),b("Query for next file failed multiple times. Exiting.<br><br>This window can now be closed."));else if(null==u||null!=u.items&&0!=u.items.length||null==u.nextPageToken)if(null!=u&&null!=u.items&&0<u.items.length){var v=u.items[0].id;this.ui.spinner.stop();c++;this.ui.spinner.spin(document.body,"Converting file "+c+" of "+l)&&(b("Converting "+c+" of "+l+': "'+mxUtils.htmlEntities(u.items[0].title)+'" (<a href="https://drive.google.com/open?id='+
+v+'" target="_blank">'+v+"</a>)... ",!0),window.setTimeout(mxUtils.bind(this,function(){null==a[v]?(A=a[v]=!0,E=window.setTimeout(mxUtils.bind(this,function(){A=!1;f++;m++;b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');x()}),this.ui.timeout),this.getFile(v,mxUtils.bind(this,function(a){window.clearTimeout(E);A&&(a.constructor==DriveFile?("json"==a.convertedFrom?e++:k++,A=!0,E=window.setTimeout(mxUtils.bind(this,function(){A=!1;f++;q++;b('<img src="'+
+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');x()}),this.ui.timeout),this.saveFile(a,null,mxUtils.bind(this,function(){window.clearTimeout(E);A&&(g++,b('OK <img src="'+Editor.checkmarkImage+'" border="0" valign="middle"/>'),x())}),mxUtils.bind(this,function(a){window.clearTimeout(E);A&&(a=z(a),f++,q++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),x())}))):(f++,n++,b('<img src="'+this.ui.editor.graph.warningImage.src+
+'" border="0" valign="absmiddle"/> Invalid file'),x()))}),mxUtils.bind(this,function(a){window.clearTimeout(E);A&&(a=z(a),f++,m++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),x())}))):(this.ui.spinner.stop(),b("Search returned duplicate file "+v+". Exiting.<br><br>This window can now be closed."))}),null!=B?B:2E3))}else t();else d(u.nextPageToken,1E4)}}))});d()}}),C={maxResults:1E4,q:v,includeTeamDriveItems:!0,supportsTeamDrives:!0},y=mxUtils.bind(this,
+function(a){null!=a&&(C.pageToken=a);this.executeRequest(gapi.client.drive.files.list(C),mxUtils.bind(this,function(a){l+=null!=a&&null!=a.items?a.items.length:0;null!=a.nextPageToken?y(a.nextPageToken):(this.ui.spinner.stop(),this.ui.showError("Confirm","You are about to convert "+l+" file(s)","Cancel",mxUtils.bind(this,function(){b("Cancelled by user.<br><br>This window can now be closed.")}),null,"OK",x,"Help",function(){window.open("https://desk.draw.io/support/solutions/articles/16000092210")},
+340,120))}))});y()})):(this.ui.spinner.stop(),b("Busy. <br><br>This window can now be closed.")))};DropboxFile=function(a,c,b){DrawioFile.call(this,a,c);this.stat=b};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};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.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
-DropboxFile.prototype.getRevisions=function(a,c){var b=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});b.then(mxUtils.bind(this,function(b){try{for(var d=[],g=b.entries.length-1;0<=g;g--)mxUtils.bind(this,function(a){d.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
-a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[g]);a(d)}catch(k){c(k)}}));b["catch"](function(a){c(a)})};DropboxFile.prototype.getLatestVersion=function(a,c){this.ui.dropbox.getFile(this.getId(),a,c)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,c,b,d,e){this.doSave(this.getTitle(),a,c,b,d,e)};DropboxFile.prototype.saveAs=function(a,c,b){this.doSave(a,!1,c,b)};
-DropboxFile.prototype.doSave=function(a,c,b,d,e,g){var k=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=k;this.saveFile(a,c,b,d,e,g)}),d,e,g])};
-DropboxFile.prototype.saveFile=function(a,c,b,d){this.isEditable()?this.savingFile?null!=d&&d({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){var e=null,k=null;try{e=this.isModified;k=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var m=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});m();var n=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,
-c,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.stat=a;this.contentChanged();null!=b&&b()}),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(){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())}catch(t){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=k&&this.setModified(k||this.isModified()),null!=d)d(t);else throw t;}}else null!=d&&d()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=b&&b()};
+DropboxFile.prototype.getRevisions=function(a,c){var b=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});b.then(mxUtils.bind(this,function(b){try{for(var d=[],e=b.entries.length-1;0<=e;e--)mxUtils.bind(this,function(a){d.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
+a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[e]);a(d)}catch(k){c(k)}}));b["catch"](function(a){c(a)})};DropboxFile.prototype.getLatestVersion=function(a,c){this.ui.dropbox.getFile(this.getId(),a,c)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,c,b,d,g){this.doSave(this.getTitle(),a,c,b,d,g)};DropboxFile.prototype.saveAs=function(a,c,b){this.doSave(a,!1,c,b)};
+DropboxFile.prototype.doSave=function(a,c,b,d,g,e){var k=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=k;this.saveFile(a,c,b,d,g,e)}),d,g,e])};
+DropboxFile.prototype.saveFile=function(a,c,b,d){this.isEditable()?this.savingFile?null!=d&&d({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){var e=null,g=null;try{e=this.isModified;g=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var m=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});m();var n=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,
+c,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.stat=a;this.contentChanged();null!=b&&b()}),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(){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())}catch(q){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=g&&this.setModified(g||this.isModified()),null!=d)d(q);else throw q;}}else null!=d&&d()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=b&&b()};
DropboxFile.prototype.rename=function(a,c,b){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(d){this.hasSameExtension(a,this.getTitle())?(this.stat=d,this.descriptorChanged(),null!=c&&c()):(this.stat=d,this.descriptorChanged(),this.save(!0,c,b))}),b)};DropboxLibrary=function(a,c,b){DropboxFile.call(this,a,c,b)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};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=".drawio";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,c,b){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({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||b?c({message:mxResources.get("accessDenied")}):(this.setUser(null),
+DropboxClient.prototype.updateUser=function(a,c,b){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),e=this.client.usersGetCurrentAccount();e.then(mxUtils.bind(this,function(b){window.clearTimeout(g);d&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));e["catch"](mxUtils.bind(this,function(e){window.clearTimeout(g);d&&(null==e||401!==e.status||b?c({message:mxResources.get("accessDenied")}):(this.setUser(null),
this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)))}))};
-DropboxClient.prototype.authenticate=function(a,c){if(null==window.onDropboxCallback){var b=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,m){if(d){window.onDropboxCallback=null;d=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=g&&g(),this.client.setAccessToken(k),
-this.setUser(null),e&&this.setPersistentToken(k),a())}catch(n){c(n)}finally{null!=m&&m.close()}}else null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onDropboxCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,c,b){var d=mxUtils.bind(this,function(g){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(m);k&&null!=c&&c(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
-g?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){d(!0)},b)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):d(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},b):e(!1)};DropboxClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};
-DropboxClient.prototype.getFile=function(a,c,b,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,c,b)});null!=this.token?g():this.authenticate(g,b)}else g={path:"/"+a},null!=urlParams.rev&&(g.rev=urlParams.rev),this.readFile(g,mxUtils.bind(this,function(b,g){var k=e?b.lastIndexOf(","):
--1,m=null;0<k&&(k=this.ui.extractGraphModelFromPng(b.substring(k+1)),null!=k&&0<k.length?b=k:m=new LocalFile(this,b,a,!0));c(null!=m?m:d?new DropboxLibrary(this.ui,b,g):new DropboxFile(this.ui,b,g))}),b,e)};
-DropboxClient.prototype.readFile=function(a,c,b,d){var e=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),t=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});t.then(mxUtils.bind(this,function(a){}));t["catch"](function(a){window.clearTimeout(n);m&&null!=a&&409==a.status&&(m=!1,b({message:mxResources.get("fileNotFound")}))});t=this.client.filesDownload(a);t.then(mxUtils.bind(this,
-function(a){window.clearTimeout(n);if(m){m=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){b(p)}}}));t["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(m=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},
-b)})}):this.authenticate(function(){e(!0)},b)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},b,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},b):g(!1)};
+DropboxClient.prototype.authenticate=function(a,c){if(null==window.onDropboxCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,m){if(d){window.onDropboxCallback=null;d=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=e&&e(),this.client.setAccessToken(k),
+this.setUser(null),g&&this.setPersistentToken(k),a())}catch(n){c(n)}finally{null!=m&&m.close()}}else null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onDropboxCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
+DropboxClient.prototype.executePromise=function(a,c,b){var d=mxUtils.bind(this,function(e){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(m);k&&null!=c&&c(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+e?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},b)})}):this.authenticate(function(){d(!0)},b)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},b,a):d(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},b):g(!1)};DropboxClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};
+DropboxClient.prototype.getFile=function(a,c,b,d){d=null!=d?d:!1;var g=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g){var e=mxUtils.bind(this,function(){var d=a.split("/");this.ui.convertFile(a,0<d.length?d[d.length-1]:a,null,this.extension,c,b)});null!=this.token?e():this.authenticate(e,b)}else e={path:"/"+a},null!=urlParams.rev&&(e.rev=urlParams.rev),this.readFile(e,mxUtils.bind(this,function(b,e){var k=g?b.lastIndexOf(","):
+-1,m=null;0<k&&(k=this.ui.extractGraphModelFromPng(b.substring(k+1)),null!=k&&0<k.length?b=k:m=new LocalFile(this,b,a,!0));c(null!=m?m:d?new DropboxLibrary(this.ui,b,e):new DropboxFile(this.ui,b,e))}),b,g)};
+DropboxClient.prototype.readFile=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),q=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});q.then(mxUtils.bind(this,function(a){}));q["catch"](function(a){window.clearTimeout(n);m&&null!=a&&409==a.status&&(m=!1,b({message:mxResources.get("fileNotFound")}))});q=this.client.filesDownload(a);q.then(mxUtils.bind(this,
+function(a){window.clearTimeout(n);if(m){m=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});d?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){b(p)}}}));q["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(m=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?b({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},
+b)})}):this.authenticate(function(){g(!0)},b)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):g(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},b):e(!1)};
DropboxClient.prototype.checkExists=function(a,c,b){var d=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(d,mxUtils.bind(this,function(d){b?c(!1,!0,d):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0,!0,d)},function(){c(!1,!0,d)})}),function(a){c(!0,!1)})};
-DropboxClient.prototype.renameFile=function(a,c,b,d){if(/[\\\/:\?\*"\|]/.test(c))d({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var e=a.stat.path_display.substring(1),g=e.lastIndexOf("/");0<g&&(c=e.substring(0,g+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,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:"/"+c,autorename:!1});this.executePromise(e,
+DropboxClient.prototype.renameFile=function(a,c,b,d){if(/[\\\/:\?\*"\|]/.test(c))d({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var g=a.stat.path_display.substring(1),e=g.lastIndexOf("/");0<e&&(c=g.substring(0,e+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,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:"/"+c,autorename:!1});this.executePromise(e,
b,d)}),g&&n.path_lower.substring(1)!==c.toLowerCase()?(g=this.client.filesDelete({path:"/"+c.toLowerCase()}),this.executePromise(g,e,d)):e()):d()})):d({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,c,b,d){this.insertFile(a,c,b,d,!0)};
-DropboxClient.prototype.insertFile=function(a,c,b,d,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(g){g?this.saveFile(a,c,mxUtils.bind(this,function(a){e?b(new DropboxLibrary(this.ui,c,a)):b(new DropboxFile(this.ui,c,a))}),d):d()}))};
-DropboxClient.prototype.saveFile=function(a,c,b,d,e){/[\\\/:\?\*"\|]/.test(a)?d({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=c.length?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=e?e:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([c],{type:"text/plain"})}),this.executePromise(a,b,d))};
-DropboxClient.prototype.pickLibrary=function(a){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"))){var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=c[0].link.indexOf(this.appPath);if(0<d){var e=decodeURIComponent(c[0].link.substring(d+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(d,k){if(null!=k&&k.id==c[0].id)try{this.ui.spinner.stop(),
-a(e.substring(1),new DropboxLibrary(this.ui,d,k))}catch(m){this.ui.handleError(m)}else this.createLibrary(c[0],a,b)}),b)}else this.createLibrary(c[0],a,b)}})})};
-DropboxClient.prototype.createLibrary=function(a,c,b){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(),c(a.getHash().substring(1),a)}catch(g){b(g)}}),b,!0)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
-DropboxClient.prototype.pickFile=function(a,c){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,c){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):c.getHash(),null,c)}),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")))if(c)this.ui.spinner.stop(),a(b[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(b[0].name);if(/\.vsdx$/i.test(b[0].name)||/\.gliffy$/i.test(b[0].name)||!this.ui.useCanvasForExport&&g)e(b[0].link);else{var k=b[0].link.indexOf(this.appPath);if(0<k){var m=decodeURIComponent(b[0].link.substring(k+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,function(c,k){if(null!=k&&k.id==b[0].id){var f=g?c.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+
-1)),null!=f&&0<f.length?c=f:l=new LocalFile(this,c,m,!0));a(m.substring(1),null!=l?l:new DropboxFile(this.ui,c,k))}else this.createFile(b[0],e,d)}),d,g)}else this.createFile(b[0],e,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
-DropboxClient.prototype.createFile=function(a,c,b){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(b){c(a.name,b)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
+DropboxClient.prototype.insertFile=function(a,c,b,d,g){g=null!=g?g:!1;this.checkExists(a,mxUtils.bind(this,function(e){e?this.saveFile(a,c,mxUtils.bind(this,function(a){g?b(new DropboxLibrary(this.ui,c,a)):b(new DropboxFile(this.ui,c,a))}),d):d()}))};
+DropboxClient.prototype.saveFile=function(a,c,b,d,g){/[\\\/:\?\*"\|]/.test(a)?d({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=c.length?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=g?g:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([c],{type:"text/plain"})}),this.executePromise(a,b,d))};
+DropboxClient.prototype.pickLibrary=function(a){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"))){var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=c[0].link.indexOf(this.appPath);if(0<d){var g=decodeURIComponent(c[0].link.substring(d+this.appPath.length-1));this.readFile({path:g},mxUtils.bind(this,function(d,k){if(null!=k&&k.id==c[0].id)try{this.ui.spinner.stop(),
+a(g.substring(1),new DropboxLibrary(this.ui,d,k))}catch(m){this.ui.handleError(m)}else this.createLibrary(c[0],a,b)}),b)}else this.createLibrary(c[0],a,b)}})})};
+DropboxClient.prototype.createLibrary=function(a,c,b){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(),c(a.getHash().substring(1),a)}catch(e){b(e)}}),b,!0)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
+DropboxClient.prototype.pickFile=function(a,c){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,c){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):c.getHash(),null,c)}),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")))if(c)this.ui.spinner.stop(),a(b[0].link);else{var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),g=mxUtils.bind(this,
+function(b,c){this.ui.spinner.stop();a(b,c)}),e=/\.png$/i.test(b[0].name);if(/\.vsdx$/i.test(b[0].name)||/\.gliffy$/i.test(b[0].name)||!this.ui.useCanvasForExport&&e)g(b[0].link);else{var k=b[0].link.indexOf(this.appPath);if(0<k){var m=decodeURIComponent(b[0].link.substring(k+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,function(c,k){if(null!=k&&k.id==b[0].id){var f=e?c.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+
+1)),null!=f&&0<f.length?c=f:l=new LocalFile(this,c,m,!0));a(m.substring(1),null!=l?l:new DropboxFile(this.ui,c,k))}else this.createFile(b[0],g,d)}),d,e)}else this.createFile(b[0],g,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+DropboxClient.prototype.createFile=function(a,c,b){var d=/(\.png)$/i.test(a.name);this.ui.loadUrl(a.link,mxUtils.bind(this,function(g){null!=g&&0<g.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var e=d?g.lastIndexOf(","):-1;0<e&&(e=this.ui.extractGraphModelFromPng(g.substring(e+1)),null!=e&&0<e.length&&(g=e));this.insertFile(a.name,g,mxUtils.bind(this,function(b){c(a.name,b)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
(this.ui.spinner.stop(),b({message:mxResources.get("errorLoadingFile")}))}),b,d)};OneDriveFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(a,c){return(null!=a.parentReference&&null!=a.parentReference.driveId?a.parentReference.driveId+"/":"")+(null!=c?a.parentReference.id:a.id)};
OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};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.isSyncSupported=function(){return!0};
OneDriveFile.prototype.getSize=function(){return this.meta.size};OneDriveFile.prototype.isConflict=function(a){return null!=a&&(412==a.getStatus()||409==a.getStatus())};OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};
OneDriveFile.prototype.loadDescriptor=function(a,c){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?a(JSON.parse(b.getText())):null!=c&&c()}),c)};OneDriveFile.prototype.getLatestVersion=function(a,c){this.ui.oneDrive.getFile(this.getId(),a,c)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(a){this.meta=a};
OneDriveFile.prototype.getDescriptorSecret=function(a){return null!=a.file&&null!=a.file.hashes&&null!=a.file.hashes.quickXorHash?a.file.hashes.quickXorHash:null};OneDriveFile.prototype.getDescriptorEtag=function(a){return a.eTag};OneDriveFile.prototype.setDescriptorEtag=function(a,c){a.eTag=c};
OneDriveFile.prototype.loadPatchDescriptor=function(a,c){var b=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(b+"?select=etag,file",mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?a(JSON.parse(b.getText())):c(this.ui.oneDrive.parseRequestText(b))}),c)};
-OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(a,c,b,d,e){this.doSave(this.getTitle(),a,c,b,d,e)};OneDriveFile.prototype.saveAs=function(a,c,b){this.doSave(a,!1,c,b)};
-OneDriveFile.prototype.doSave=function(a,c,b,d,e,g){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,c,b,d,e,g)}),d,e,g])};
-OneDriveFile.prototype.saveFile=function(a,c,b,d,e,g){if(!this.isEditable())null!=b&&b();else if(!this.savingFile)if(this.getTitle()==a){var k=mxUtils.bind(this,function(){var a=null,c=null;try{a=this.isModified;c=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var e=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return c}}),f=g||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),l=this.meta;
-e();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c,e){this.isModified=a;this.savingFile=!1;this.meta=c;this.fileSaved(e,l,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(b,f){this.savingFile=!1;this.isModified=a;this.setModified(c||this.isModified());if(this.isConflict(f))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.savingFileTime=new Date,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();k()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d();else if(null!=d){if(null!=b&&null!=b.retry){var g=b.retry;b.retry=function(){e();g()}}d(b)}}),f)}catch(p){if(this.savingFile=!1,null!=a&&(this.isModified=a),null!=c&&this.setModified(c||this.isModified()),null!=d)d(p);else throw p;}});k()}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=
-!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))};OneDriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(e){this.hasSameExtension(a,this.getTitle())?(this.meta=e,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(e)):(this.meta=e,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
+OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(a,c,b,d,g){this.doSave(this.getTitle(),a,c,b,d,g)};OneDriveFile.prototype.saveAs=function(a,c,b){this.doSave(a,!1,c,b)};
+OneDriveFile.prototype.doSave=function(a,c,b,d,g,e){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,c,b,d,g,e)}),d,g,e])};
+OneDriveFile.prototype.saveFile=function(a,c,b,d,g,e){if(!this.isEditable())null!=b&&b();else if(!this.savingFile)if(this.getTitle()==a){var k=mxUtils.bind(this,function(){var a=null,c=null;try{a=this.isModified;c=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var g=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return c}}),f=e||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),l=this.meta;
+g();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c,e){this.isModified=a;this.savingFile=!1;this.meta=c;this.fileSaved(e,l,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(b,e){this.savingFile=!1;this.isModified=a;this.setModified(c||this.isModified());if(this.isConflict(e))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.savingFileTime=new Date,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+function(){this.updateFileData();k()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d();else if(null!=d){if(null!=b&&null!=b.retry){var f=b.retry;b.retry=function(){g();f()}}d(b)}}),f)}catch(p){if(this.savingFile=!1,null!=a&&(this.isModified=a),null!=c&&this.setModified(c||this.isModified()),null!=d)d(p);else throw p;}});k()}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=
+!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))};OneDriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.meta=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(g)):(this.meta=g,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
OneDriveFile.prototype.move=function(a,c,b){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=c&&c(a)}),b)};OneDriveLibrary=function(a,c,b){OneDriveFile.call(this,a,c,b)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(a,c,b){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.desc=a;null!=c&&c(a)}),b)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"oneDriveAuthInfo");a=JSON.parse(this.token);null!=a&&(this.token=a.access_token,this.endpointHint=a.endpointHint,this.tokenExpiresOn=a.expiresOn,a=(this.tokenExpiresOn-Date.now())/1E3,this.resetTokenRefresh(600>a?1:a))};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId="test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395";
OneDriveClient.prototype.scopes="user.read files.readwrite.all offline_access";OneDriveClient.prototype.redirectUri="https://"+window.location.hostname+"/microsoft";OneDriveClient.prototype.pickerRedirectUri="https://"+window.location.hostname+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";
OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(a){if(null==a||""===a)return!1;for(var c=0;c<this.invalidFilenameRegExs.length;c++)if(this.invalidFilenameRegExs[c].test(a))return!1;return!0};
OneDriveClient.prototype.get=function(a,c,b){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(c,b);return a};
-OneDriveClient.prototype.updateUser=function(a,c,b){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(e);d&&(200>g.getStatus()||300<=g.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),
+OneDriveClient.prototype.updateUser=function(a,c,b){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(e){window.clearTimeout(g);d&&(200>e.getStatus()||300<=e.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):(e=JSON.parse(e.getText()),this.setUser(new DrawioUser(e.id,null,e.displayName)),
a()))}),c)};OneDriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<a&&(this.tokenRefreshInterval=1E3*a,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*a))};
-OneDriveClient.prototype.authenticate=function(a,c,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var e=!0,g=JSON.parse(this.getPersistentToken(!0));null!=g?(new mxXmlRequest(this.redirectUri+"?refresh_token="+g.refresh_token,null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?(e=JSON.parse(e.getText()),this.token=e.access_token,e.access_token=e.access_token,e.refresh_token=e.refresh_token,e.expiresOn=Date.now()+1E3*e.expires_in,this.tokenExpiresOn=
-e.expiresOn,this.setPersistentToken(JSON.stringify(e),!e.remember),this.resetTokenRefresh(e.expires_in),a()):(this.clearPersistentToken(),this.setUser(null),this.token=null,401!=e.getStatus()||b?c({message:mxResources.get("accessDenied"),retry:d}):d())}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,g){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes),
-k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,f){if(e){window.onOneDriveCallback=null;e=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:d}):(null!=g&&g(),this.setUser(null),this.token=k.access_token,k.expiresOn=Date.now()+1E3*
-k.expires_in,this.tokenExpiresOn=k.expiresOn,k.remember=b,this.setPersistentToken(JSON.stringify(k),!b),this.resetTokenRefresh(k.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){a()}),c))}catch(l){c(l)}finally{null!=f&&f.close()}}else null!=f&&f.close()}),k.focus())}),mxUtils.bind(this,function(){e&&(window.onOneDriveCallback=null,e=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var d=JSON.parse(b.getText());0<d.webUrl.indexOf(".sharepoint.com")?this.endpointHint=d.webUrl:this.endpointHint=this.defEndpointHint;var e=JSON.parse(this.getPersistentToken(!0));null!=e&&(e.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(e),!e.remember));a();return}}catch(g){}c({message:mxResources.get("unknownError")+
+OneDriveClient.prototype.authenticate=function(a,c,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var g=!0,e=JSON.parse(this.getPersistentToken(!0));null!=e?(new mxXmlRequest(this.redirectUri+"?refresh_token="+e.refresh_token,null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?(e=JSON.parse(e.getText()),this.token=e.access_token,e.access_token=e.access_token,e.refresh_token=e.refresh_token,e.expiresOn=Date.now()+1E3*e.expires_in,this.tokenExpiresOn=
+e.expiresOn,this.setPersistentToken(JSON.stringify(e),!e.remember),this.resetTokenRefresh(e.expires_in),a()):(this.clearPersistentToken(),this.setUser(null),this.token=null,401!=e.getStatus()||b?c({message:mxResources.get("accessDenied"),retry:d}):d())}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,e){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes),
+k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,f){if(g){window.onOneDriveCallback=null;g=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:d}):(null!=e&&e(),this.setUser(null),this.token=k.access_token,k.expiresOn=Date.now()+1E3*
+k.expires_in,this.tokenExpiresOn=k.expiresOn,k.remember=b,this.setPersistentToken(JSON.stringify(k),!b),this.resetTokenRefresh(k.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){a()}),c))}catch(l){c(l)}finally{null!=f&&f.close()}}else null!=f&&f.close()}),k.focus())}),mxUtils.bind(this,function(){g&&(window.onOneDriveCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
+OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var d=JSON.parse(b.getText());0<d.webUrl.indexOf(".sharepoint.com")?this.endpointHint=d.webUrl:this.endpointHint=this.defEndpointHint;var g=JSON.parse(this.getPersistentToken(!0));null!=g&&(g.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(g),!g.remember));a();return}}catch(e){}c({message:mxResources.get("unknownError")+
" (Code: "+b.getStatus()+")"})}),c)};
-OneDriveClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(e){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;b({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(k);g&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(a)):e||401!==a.getStatus()&&400!==a.getStatus()?b(this.parseRequestText(a)):this.authenticate(function(){d(!0)},
-b,e))}),b)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){d(!0)},b):d(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};
+OneDriveClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(g){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;b({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(k);e&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(a)):g||401!==a.getStatus()&&400!==a.getStatus()?b(this.parseRequestText(a)):this.authenticate(function(){d(!0)},
+b,g))}),b)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){d(!0)},b):d(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};
OneDriveClient.prototype.getItemURL=function(a,c){var b=a.split("/");return 1<b.length?(c?"":this.baseUrl)+"/drives/"+b[0]+"/items/"+b[1]:(c?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,c,b,d,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,c,b);else{var n=!0,t=window.setTimeout(mxUtils.bind(this,function(){n=
-!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(t),n){var f=g?a.lastIndexOf(","):-1,k=null;if(0<f){var m=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=m&&0<m.length?a=m:k=new LocalFile(this.ui,a,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.ui.isRemoteFileFormat(a,d["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,d.name+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=b)b(A);else throw A;}}),d.name):null!=k?c(k):e?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,a,d))}}catch(q){if(null!=b)b(q);else throw q;
-}}),mxUtils.bind(this,function(a){window.clearTimeout(t);n&&b(this.parseRequestText(a))}),g||null!=d.file&&null!=d.file.mimeType&&"image/"==d.file.mimeType.substring(0,6))}}else b(this.parseRequestText(a))}),b)};
-OneDriveClient.prototype.renameFile=function(a,c,b,d){null!=a&&null!=c&&(this.isValidFilename(c)?this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",b,d):d()})):d({message:this.invalidFilenameRegExs[0].test(c)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
-OneDriveClient.prototype.moveFile=function(a,c,b,d){c=this.getItemRef(c);var e=this.getItemRef(a);c.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:c}),"PATCH","application/json",b,d)};OneDriveClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e)};
-OneDriveClient.prototype.insertFile=function(a,c,b,d,e,g){this.isValidFilename(a)?(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)),k=this.baseUrl+k+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(k,c,"PUT",null,mxUtils.bind(this,function(a){e?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,c,a))}),d)):d()}))):d({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
+OneDriveClient.prototype.getFile=function(a,c,b,d,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),e=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);else{var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n=
+!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(q),n){var f=e?a.lastIndexOf(","):-1,k=null;if(0<f){var m=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=m&&0<m.length?a=m:k=new LocalFile(this.ui,a,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
+this.ui.isRemoteFileFormat(a,d["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,d.name+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=b)b(z);else throw z;}}),d.name):null!=k?c(k):g?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,a,d))}}catch(t){if(null!=b)b(t);else throw t;
+}}),mxUtils.bind(this,function(a){window.clearTimeout(q);n&&b(this.parseRequestText(a))}),e||null!=d.file&&null!=d.file.mimeType&&"image/"==d.file.mimeType.substring(0,6))}}else b(this.parseRequestText(a))}),b)};
+OneDriveClient.prototype.renameFile=function(a,c,b,d){null!=a&&null!=c&&(this.isValidFilename(c)?this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",b,d):d()})):d({message:this.invalidFilenameRegExs[0].test(c)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
+OneDriveClient.prototype.moveFile=function(a,c,b,d){c=this.getItemRef(c);var g=this.getItemRef(a);c.driveId!=g.driveId?d({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:c}),"PATCH","application/json",b,d)};OneDriveClient.prototype.insertLibrary=function(a,c,b,d,g){this.insertFile(a,c,b,d,!0,g)};
+OneDriveClient.prototype.insertFile=function(a,c,b,d,g,e){this.isValidFilename(a)?(g=null!=g?g:!1,this.checkExists(e,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=e&&(k=this.getItemURL(e,!0)),k=this.baseUrl+k+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(k,c,"PUT",null,mxUtils.bind(this,function(a){g?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,c,a))}),d)):d()}))):d({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
mxResources.get("oneDriveInvalidDeviceName")})};
-OneDriveClient.prototype.checkExists=function(a,c,b,d){var e="/me/drive/root";null!=a&&(e=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+e+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?d(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){d(!0)},function(){d(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)}))}),function(a){d(!1)},
-!0)};OneDriveClient.prototype.saveFile=function(a,c,b,d){try{var e=a.getData(),g=mxUtils.bind(this,function(g){var k=this.getItemURL(a.getId());this.writeFile(k+"/content/",g,"PUT",null,mxUtils.bind(this,function(a){c(a,e)}),b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?e:null):g(e)}catch(k){b(k)}};
-OneDriveClient.prototype.writeFile=function(a,c,b,d,e,g,k){try{if(null!=a&&null!=c){var m=mxUtils.bind(this,function(n){try{var t=!0,f=window.setTimeout(mxUtils.bind(this,function(){t=!1;g({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),l=new mxXmlRequest(a,c,b);l.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f);
-t&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),e(JSON.parse(a.getText()))):n||401!==a.getStatus()?g(this.parseRequestText(a),a):this.authenticate(function(){m(!0)},g,n))}),mxUtils.bind(this,function(a){window.clearTimeout(f);t&&g(this.parseRequestText(a))}))}catch(p){g(p)}});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},g):m(!1)}else g({message:mxResources.get("unknownError")})}catch(n){g(n)}};
+OneDriveClient.prototype.checkExists=function(a,c,b,d){var g="/me/drive/root";null!=a&&(g=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+g+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?d(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){d(!0)},function(){d(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)}))}),function(a){d(!1)},
+!0)};OneDriveClient.prototype.saveFile=function(a,c,b,d){try{var g=a.getData(),e=mxUtils.bind(this,function(e){var k=this.getItemURL(a.getId());this.writeFile(k+"/content/",e,"PUT",null,mxUtils.bind(this,function(a){c(a,g)}),b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?g:null):e(g)}catch(k){b(k)}};
+OneDriveClient.prototype.writeFile=function(a,c,b,d,g,e,k){try{if(null!=a&&null!=c){var m=mxUtils.bind(this,function(n){try{var q=!0,f=window.setTimeout(mxUtils.bind(this,function(){q=!1;e({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),l=new mxXmlRequest(a,c,b);l.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f);
+q&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):n||401!==a.getStatus()?e(this.parseRequestText(a),a):this.authenticate(function(){m(!0)},e,n))}),mxUtils.bind(this,function(a){window.clearTimeout(f);q&&e(this.parseRequestText(a))}))}catch(p){e(p)}});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},e):m(!1)}else e({message:mxResources.get("unknownError")})}catch(n){e(n)}};
OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
OneDriveClient.prototype.pickFolder=function(a,c){var b=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){b(!1)}),this.emptyFn):b(c)};
@@ -9103,64 +9116,100 @@ OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,func
(mxClient.IS_IE11&&(this.token=b.accessToken),a(OneDriveFile.prototype.getIdOf(b.value[0]),b))}),cancel:mxUtils.bind(this,function(){}),error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){c();this.ui.hideDialog()}))).container,
300,140,!0,!0)}),this.emptyFn):c()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(c){a(200<=c.getStatus()&&299>=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.isConflict=function(a){return null!=a&&409==a.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
-GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,c){this.ui.gitHub.getFile(this.getId(),a,c)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,c){a.sha=c};GitHubFile.prototype.save=function(a,c,b,d,e,g){this.doSave(this.getTitle(),c,b,d,e,g)};
-GitHubFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};GitHubFile.prototype.doSave=function(a,c,b,d,e,g){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,!1,c,b,d,e,g)}),b,d,e])};
-GitHubFile.prototype.saveFile=function(a,c,b,d,e,g,k){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else{var m=mxUtils.bind(this,function(c){if(this.getTitle()==a){var e=null,f=null;try{e=this.isModified;f=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}}),m=this.getCurrentEtag(),n=this.data;k();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.isModified=
-e;this.savingFile=!1;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;this.fileSaved(n,m,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=d&&d({commitMessage:c});else if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}d(a)}}),g,
-c)}catch(v){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=f&&this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(e){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e,c)}))});null!=k?m(k):this.ui.gitHub.showCommitDialog(this.meta.name,
-null==this.meta.sha||this.meta.isNew,mxUtils.bind(this,function(a){m(a)}),d)}else null!=b&&b()};GitHubLibrary=function(a,c,b){GitHubFile.call(this,a,c,b)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};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=".drawio";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
-GitHubClient.prototype.updateUser=function(a,c,b){var d=!0,e=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({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()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):200>g.getStatus()||300<=g.getStatus()?c({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,c){if(null==window.onGitHubCallback){var b=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,m){if(d)if(window.onGitHubCallback=null,d=!1,null==k)c({message:mxResources.get("accessDenied"),retry:b});else{var n=mxUtils.bind(this,function(){var b=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=g&&g();var k=f.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(u){c(u)}finally{null!=m&&
+GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,c){this.ui.gitHub.getFile(this.getId(),a,c)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,c){a.sha=c};GitHubFile.prototype.save=function(a,c,b,d,g,e){this.doSave(this.getTitle(),c,b,d,g,e)};
+GitHubFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};GitHubFile.prototype.doSave=function(a,c,b,d,g,e){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,!1,c,b,d,g,e)}),b,d,g])};
+GitHubFile.prototype.saveFile=function(a,c,b,d,g,e,k){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else{var m=mxUtils.bind(this,function(c){if(this.getTitle()==a){var g=null,f=null;try{g=this.isModified;f=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}}),m=this.getCurrentEtag(),n=this.data;k();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.isModified=
+g;this.savingFile=!1;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;this.fileSaved(n,m,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=d&&d({commitMessage:c});else if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}d(a)}}),e,
+c)}catch(v){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=f&&this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(e){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e,c)}))});null!=k?m(k):this.ui.gitHub.showCommitDialog(this.meta.name,
+null==this.meta.sha||this.meta.isNew,mxUtils.bind(this,function(a){m(a)}),d)}else null!=b&&b()};GitHubLibrary=function(a,c,b){GitHubFile.call(this,a,c,b)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a,c){DrawioClient.call(this,a,c||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
+GitHubClient.prototype.updateUser=function(a,c,b){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(e){window.clearTimeout(g);d&&(401===e.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):200>e.getStatus()||300<=e.getStatus()?
+c({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(e.getText()))),a()))}))};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};
+GitHubClient.prototype.authenticate=function(a,c){if(null==window.onGitHubCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,m){if(d)if(window.onGitHubCallback=null,d=!1,null==k)c({message:mxResources.get("accessDenied"),retry:b});else{var n=mxUtils.bind(this,function(){var b=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=e&&e();var k=f.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(u){c(u)}finally{null!=m&&
m.close()}}))});n()}else null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onGitHubCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,c){try{var b=JSON.parse(a.getText());null!=b&&null!=b.message&&(c=b.message)}catch(d){}return c};
-GitHubClient.prototype.executeRequest=function(a,c,b,d){var e=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),t=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+t)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(m)if(200<=a.getStatus()&&299>=a.getStatus()||d&&404==a.getStatus())c(a);else if(401===a.getStatus())k?b({message:mxResources.get("accessDenied"),
-retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},b)})}):this.authenticate(function(){e(!0)},b);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}b({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?b({message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?b({status:409}):b({message:this.getErrorMessage(a,
-mxResources.get("error")+" "+a.getStatus())})}),b)}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},b,a):e(a)});null==this.token?this.authenticate(function(){g(!0)},b):g(!1)};GitHubClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};
-GitHubClient.prototype.getFile=function(a,c,b,d,e){d=null!=d?d:!1;var g=a.split("/"),k=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/"+k+"/"+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,c,b)):b({message:mxResources.get("accessDenied")}):(e="&t="+(new Date).getTime(),
-a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+m+"/contents/"+a+"?ref="+n+e,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,m,n,JSON.parse(a.getText()),d))}catch(f){b(f)}}),b))};
-GitHubClient.prototype.createGitHubFile=function(a,c,b,d,e){a={org:a,repo:c,ref:b,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&("PG14ZmlsZS"==c.substring(0,10)?c=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c):/\.jpe?g$/i.test(d.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d.name)?c="data:image/gif;base64,"+c:/\.png$/i.test(d.name)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+
-c):c=Base64.decode(c));return e?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e,!1)};
-GitHubClient.prototype.insertFile=function(a,c,b,d,e,g,k){e=null!=e?e:!1;g=g.split("/");var m=g[0],n=g[1],t=g[2],f=g.slice(3,g.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(m+"/"+n+"/"+t+"/"+f,!0,mxUtils.bind(this,function(g,p){g?e?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,n,t,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(m,n,t,c.content,e))}catch(A){d(A)}}),d)}),d)):b(new GitHubFile(this.ui,
-c,{org:m,repo:n,ref:t,name:a,path:f,sha:p,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,d){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();b(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,c,b,d,e,g,k,m,n){g.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(b={path:d,branch:decodeURIComponent(b),message:e,content:g},null!=k&&(b.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){m(a)}),n))};
-GitHubClient.prototype.checkExists=function(a,c,b){this.getFile(a,mxUtils.bind(this,function(d){if(c&&null!=d.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();b(!0,d.meta.sha)},function(){e();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,c,b,d,e){var g=a.meta.org,k=a.meta.repo,m=a.meta.ref,n=a.meta.path,t=mxUtils.bind(this,function(d,f){this.writeFile(g,k,m,n,e,f,d,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){b(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){t(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null):t(a.meta.sha,
-Base64.encode(a.getData()))});d?this.getFile(g+"/"+k+"/"+encodeURIComponent(m)+"/"+n,mxUtils.bind(this,function(b){a.meta.sha=b.meta.sha;f()}),b):f()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
-GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,e=null,g=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.lineHeight="1.2em";
-n.style.height="194px";k.appendChild(n);var t=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(e)+"/"+g)}));this.ui.showDialog(t.container,340,270,!0,!0);a&&t.okButton.parentNode.removeChild(t.okButton);var f=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}),l=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom=
-"8px";c.appendChild(f(b+"/"+d,mxUtils.bind(this,function(){g=null;z()})));a||(mxUtils.write(c," / "),c.appendChild(f(decodeURIComponent(e),mxUtils.bind(this,function(){g=null;A()}))));if(null!=g&&0<g.length){var k=g.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(f(k[a],mxUtils.bind(this,function(){g=k.slice(0,a+1).join("/");u()})))})(a)}n.appendChild(c)}),p=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();
-null!=this.getUser()?(g=e=d=b=null,z()):this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+g+"?ref="+encodeURIComponent(e),null,"GET");t.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(k){l();this.ui.spinner.stop();var m=JSON.parse(k.getText());n.appendChild(f("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,z();else{var a=
-g.split("/");g=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(n);null==m||0==m.length?mxUtils.write(n,mxResources.get("noFiles")):(k=mxUtils.bind(this,function(k){for(var l=0;l<m.length;l++)mxUtils.bind(this,function(l){k==("dir"==l.type)&&(n.appendChild(f(l.name+("dir"==l.type?"/":""),mxUtils.bind(this,function(){"dir"==l.type?(g=l.path,u()):a&&"file"==l.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(e)+"/"+l.path))}))),mxUtils.br(n))})(m[l])}),k(!0),a&&k(!1))}),p,!0)}),v=null,
-q=null,A=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");t.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,
-"scroll",q);A(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(l(!0),n.appendChild(f("../ [Up]",mxUtils.bind(this,function(){g=null;z()}))),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(f(a.name,mxUtils.bind(this,function(){e=a.name;g="";u()})));mxUtils.br(n)})(b[c]);100==b.length&&(n.appendChild(v),
-q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",q))}}),p)}),z=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");t.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");
-mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",q);z(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(f(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
-function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(b=a,d=f,g=e=null,A()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=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 l=0;l<c.length;l++)mxUtils.bind(this,function(a){n.appendChild(f(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;e=a.default_branch;g="";u()})));mxUtils.br(n)})(c[l])}100==c.length&&(n.appendChild(v),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",
-q))}),p)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+GitHubClient.prototype.executeRequest=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+q)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(m)if(200<=a.getStatus()&&299>=a.getStatus()||d&&404==a.getStatus())c(a);else if(401===a.getStatus())k?b({message:mxResources.get("accessDenied"),
+retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){g(!0)},b);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}b({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?b({message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?b({status:409}):b({message:this.getErrorMessage(a,
+mxResources.get("error")+" "+a.getStatus())})}),b)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},b):e(!1)};GitHubClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};
+GitHubClient.prototype.getFile=function(a,c,b,d,g){d=null!=d?d:!1;var e=a.split("/"),k=e[0],m=e[1],n=e[2];a=e.slice(3,e.length).join("/");e=/\.png$/i.test(a);!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e)?null!=this.token?(g=this.baseUrl+"/repos/"+k+"/"+m+"/contents/"+a+"?ref="+n+"&token="+this.token,e=a.split("/"),this.ui.convertFile(g,0<e.length?e[e.length-1]:a,null,this.extension,c,b)):b({message:mxResources.get("accessDenied")}):(g="&t="+(new Date).getTime(),
+a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+m+"/contents/"+a+"?ref="+n+g,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,m,n,JSON.parse(a.getText()),d))}catch(f){b(f)}}),b))};
+GitHubClient.prototype.createGitHubFile=function(a,c,b,d,g){a={org:a,repo:c,ref:b,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&("PG14ZmlsZS"==c.substring(0,10)?c=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c):/\.jpe?g$/i.test(d.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d.name)?c="data:image/gif;base64,"+c:/\.png$/i.test(d.name)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+
+c):c=Base64.decode(c));return g?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,b,d,g){this.insertFile(a,c,b,d,!0,g,!1)};
+GitHubClient.prototype.insertFile=function(a,c,b,d,g,e,k){g=null!=g?g:!1;e=e.split("/");var m=e[0],n=e[1],q=e[2],f=e.slice(3,e.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(m+"/"+n+"/"+q+"/"+f,!0,mxUtils.bind(this,function(e,p){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,n,q,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(m,n,q,c.content,g))}catch(z){d(z)}}),d)}),d)):b(new GitHubFile(this.ui,
+c,{org:m,repo:n,ref:q,name:a,path:f,sha:p,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,d){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,c,b,d,g,e,k,m,n){e.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(b={path:d,branch:decodeURIComponent(b),message:g,content:e},null!=k&&(b.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){m(a)}),n))};
+GitHubClient.prototype.checkExists=function(a,c,b){this.getFile(a,mxUtils.bind(this,function(d){if(c&&null!=d.meta){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();b(!0,d.meta.sha)},function(){g();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};
+GitHubClient.prototype.saveFile=function(a,c,b,d,g){var e=a.meta.org,k=a.meta.repo,m=a.meta.ref,n=a.meta.path,q=mxUtils.bind(this,function(d,f){this.writeFile(e,k,m,n,g,f,d,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){b(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){q(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null):q(a.meta.sha,
+Base64.encode(a.getData()))});d?this.getFile(e+"/"+k+"/"+encodeURIComponent(m)+"/"+n,mxUtils.bind(this,function(b){a.meta.sha=b.meta.sha;f()}),b):f()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
+GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing=
+"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="194px";k.appendChild(n);var q=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(q.container,340,270,!0,!0);a&&q.okButton.parentNode.removeChild(q.okButton);var f=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.setAttribute("title",a);mxUtils.write(c,a);mxEvent.addListener(c,
+"click",b);return c}),l=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(f(b+"/"+d,mxUtils.bind(this,function(){e=null;x()})));a||(mxUtils.write(c," / "),c.appendChild(f(decodeURIComponent(g),mxUtils.bind(this,function(){e=null;z()}))));if(null!=e&&0<e.length){var k=e.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(f(k[a],mxUtils.bind(this,function(){e=k.slice(0,a+1).join("/");u()})))})(a)}n.appendChild(c)}),
+p=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=d=b=null,x()):this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+e+"?ref="+encodeURIComponent(g),null,"GET");q.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(k){l();this.ui.spinner.stop();
+var m=JSON.parse(k.getText());n.appendChild(f("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,x();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(n);if(null==m||0==m.length)mxUtils.write(n,mxResources.get("noFiles"));else{var p=!0;k=mxUtils.bind(this,function(k){for(var l=0;l<m.length;l++)mxUtils.bind(this,function(l,m){if(k==("dir"==l.type)){var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.boxSizing="border-box";y.style.overflow="hidden";
+y.style.padding="4px";y.style.width="100%";y.style.backgroundColor=p?"#eeeeee":"";p=!p;var t=document.createElement("img");t.src=IMAGE_PATH+"/"+("dir"==l.type?"folder.png":"file.png");t.setAttribute("align","absmiddle");t.style.marginRight="4px";t.style.marginTop="-4px";t.width=20;y.appendChild(t);y.appendChild(f(l.name+("dir"==l.type?"/":""),mxUtils.bind(this,function(){"dir"==l.type?(e=l.path,u()):a&&"file"==l.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+l.path))})));n.appendChild(y)}})(m[l],
+l)});k(!0);a&&k(!1)}}),p,!0)}),v=null,t=null,z=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");
+var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",t);z(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(l(!0),n.appendChild(f("../ [Up]",mxUtils.bind(this,function(){e=null;x()}))),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(f(a.name,mxUtils.bind(this,function(){g=a.name;
+e="";u()})));mxUtils.br(n)})(b[c]);100==b.length&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",t))}}),p)}),x=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");
+v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",t);x(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(f(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,
+"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(b=a,d=f,e=g=null,z()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo;g=decodeURIComponent(a.meta.ref);e="";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 l=0;l<c.length;l++)mxUtils.bind(this,function(a,c){var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.padding="4px";k.style.width="100%";k.style.backgroundColor=0==c%2?"#eeeeee":"";k.appendChild(f(a.full_name,mxUtils.bind(this,function(){b=
+a.owner.login;d=a.name;g=a.default_branch;e="";u()})));n.appendChild(k)})(c[l],l)}100==c.length&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",t))}),p)});x()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(a,c,b){this.doSave(this.getTitle(),c,b)};TrelloFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};TrelloFile.prototype.doSave=function(a,c,b){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,b)};
-TrelloFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable())if(this.savingFile)null!=d&&(this.saveNeededCounter++,d({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,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!=b&&
-b();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,c,b,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!=b&&b();this.ui.fileLoaded(e);0<this.saveNeededCounter&&
+TrelloFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable())if(this.savingFile)null!=d&&(this.saveNeededCounter++,d({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var g=this.isModified,e=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(e){this.savingFile=!1;this.isModified=g;this.meta=e;this.contentChanged();null!=b&&
+b();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,c,b,d))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||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!=b&&b();this.ui.fileLoaded(e);0<this.saveNeededCounter&&
(this.saveNeededCounter--,this.saveFile(a,c,b,d))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e)}));else null!=b&&b()};TrelloLibrary=function(a,c,b){TrelloFile.call(this,a,c,b)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};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,c,b){b&&this.logout();b=mxUtils.bind(this,function(b,e){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=e&&e();a()},error:function(){null!=e&&e();null!=c&&c(mxResources.get("loggedOut"))}})});this.isAuthorized()?b(!0):this.ui.showAuthDialog(this,!0,b)};TrelloClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};
-TrelloClient.prototype.getFile=function(a,c,b,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;b({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,c,b):(m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(b){window.clearTimeout(n);if(m){d.compoundId=a;var g=f?b.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(b.substring(g+1)),null!=g&&0<g.length&&(b=g));e?c(new TrelloLibrary(this.ui,b,d)):c(new TrelloFile(this.ui,b,d))}}),mxUtils.bind(this,
-function(a,c){window.clearTimeout(n);m&&(401==c.status?this.authenticate(g,b,!0):b())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(null!=a&&401==a.status?this.authenticate(g,b,!0):b())}))});this.authenticate(g,b)};TrelloClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e)};
-TrelloClient.prototype.insertFile=function(a,c,b,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?b(new TrelloLibrary(this.ui,c,a)):b(new TrelloFile(this.ui,c,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,c):k(c)});this.authenticate(k,d)};
-TrelloClient.prototype.saveFile=function(a,c,b){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(){c(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(g,b,!0):b()}))},b)}),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"))}),b,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(g,b)};
-TrelloClient.prototype.writeFile=function(a,c,b,d,e){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!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 c?new Blob([c]):c,a);n.append("name",
-a);var t=new XMLHttpRequest;t.responseType="json";t.onreadystatechange=mxUtils.bind(this,function(){if(4===t.readyState&&(window.clearTimeout(m),k))if(200==t.status){var a=t.response;a.compoundId=b+this.SEPARATOR+a.id;d(a)}else 401==t.status?this.authenticate(g,e,!0):e()});t.open("POST",this.baseUrl+"cards/"+b+"/attachments");t.send(n)});this.authenticate(g,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.authenticate=function(a,c,b){b&&this.logout();b=mxUtils.bind(this,function(b,g){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=g&&g();a()},error:function(){null!=g&&g();null!=c&&c(mxResources.get("loggedOut"))}})});this.isAuthorized()?b(!0):this.ui.showAuthDialog(this,!0,b)};TrelloClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};
+TrelloClient.prototype.getFile=function(a,c,b,d,g){g=null!=g?g:!1;var e=mxUtils.bind(this,function(){var d=a.split(this.SEPARATOR),m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),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,c,b):(m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(b){window.clearTimeout(n);if(m){d.compoundId=a;var e=f?b.lastIndexOf(","):-1;0<e&&(e=this.ui.extractGraphModelFromPng(b.substring(e+1)),null!=e&&0<e.length&&(b=e));g?c(new TrelloLibrary(this.ui,b,d)):c(new TrelloFile(this.ui,b,d))}}),mxUtils.bind(this,
+function(a,c){window.clearTimeout(n);m&&(401==c.status?this.authenticate(e,b,!0):b())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(null!=a&&401==a.status?this.authenticate(e,b,!0):b())}))});this.authenticate(e,b)};TrelloClient.prototype.insertLibrary=function(a,c,b,d,g){this.insertFile(a,c,b,d,!0,g)};
+TrelloClient.prototype.insertFile=function(a,c,b,d,g,e){g=null!=g?g:!1;var k=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(k){this.writeFile(a,k,e,mxUtils.bind(this,function(a){g?b(new TrelloLibrary(this.ui,c,a)):b(new TrelloFile(this.ui,c,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,c):k(c)});this.authenticate(k,d)};
+TrelloClient.prototype.saveFile=function(a,c,b){var d=a.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(a.meta.name,g,d[0],function(a){Trello.del("cards/"+d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(){c(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(e,b,!0):b()}))},b)}),e=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,
+"image/png"))}),b,this.ui.getCurrentFile()!=a?a.getData():null):g(a.getData())});this.authenticate(e,b)};
+TrelloClient.prototype.writeFile=function(a,c,b,d,g){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var e=mxUtils.bind(this,function(){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),n=new FormData;n.append("key",Trello.key());n.append("token",Trello.token());n.append("file","string"===typeof c?new Blob([c]):c,a);n.append("name",
+a);var q=new XMLHttpRequest;q.responseType="json";q.onreadystatechange=mxUtils.bind(this,function(){if(4===q.readyState&&(window.clearTimeout(m),k))if(200==q.status){var a=q.response;a.compoundId=b+this.SEPARATOR+a.id;d(a)}else 401==q.status?this.authenticate(e,g,!0):g()});q.open("POST",this.baseUrl+"cards/"+b+"/attachments");q.send(n)});this.authenticate(e,g)}else g({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,c){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,c){var b=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 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}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=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(b+"/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();c(b+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,t,!0):
-null!=t&&t(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(g){null==g&&(e=0,m.innerHTML="",g=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",p);u(g+1)});mxEvent.addListener(l,"click",k);var A=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 q=0;q<e.length;q++)mxUtils.bind(this,function(d){m.appendChild(n(d.name,mxUtils.bind(this,function(){a?(b=d.id,f()):(this.ui.hideDialog(),c(d.id))})))})(e[q]);100==e.length&&(m.appendChild(l),p=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(A,t,!0):null!=t&&t({message:a.responseText})}))});A()});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()};DrawioComment=function(a,c,b,d,e,g,k){this.file=a;this.id=c;this.content=b;this.modifiedDate=d;this.createdDate=e;this.isResolved=g;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,b,d,e){c()};DrawioComment.prototype.editComment=function(a,c,b){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,b,d,e,g,k,m){DrawioComment.call(this,a,c,b,d,e,g,k);this.pCommentId=m};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,b,d,e){a={content:a.content};d?a.verb="resolve":e&&(a.verb="reopen");this.file.ui.drive.executeRequest(gapi.client.drive.replies.insert({fileId:this.file.getId(),commentId:this.id,resource:a}),mxUtils.bind(this,function(a){c(a.replyId)}),b)};
+TrelloClient.prototype.showTrelloDialog=function(a,c){var b=null,d="@me",g=0,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.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";e.appendChild(k);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height=
+"194px";e.appendChild(m);e=new CustomDialog(this.ui,e);this.ui.showDialog(e.container,340,270,!0,!0);e.okButton.parentNode.removeChild(e.okButton);var n=mxUtils.bind(this,function(a,b,c){g++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==g%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height=
+c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=mxUtils.bind(this,function(){g=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(b+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(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();c(b+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,q,!0):
+null!=q&&q(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(e){null==e&&(g=0,m.innerHTML="",e=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",p);u(e+1)});mxEvent.addListener(l,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(d)?"is:open":d,cards_limit:100,cards_page:e-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==e&&(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 t=0;t<g.length;t++)mxUtils.bind(this,function(d){m.appendChild(n(d.name,mxUtils.bind(this,function(){a?(b=d.id,f()):(this.ui.hideDialog(),c(d.id))})))})(g[t]);100==g.length&&(m.appendChild(l),p=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,q,!0):null!=q&&q({message:a.responseText})}))});v()});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()};GitLabFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};
+GitLabFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(c){a(200<=c.getStatus()&&299>=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitLabFile.prototype.isConflict=function(a){return null!=a&&400==a.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getLatestVersion=function(a,c){this.ui.gitLab.getFile(this.getId(),a,c)};
+GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(a,c){a.last_commit_id=c};
+GitLabFile.prototype.saveFile=function(a,c,b,d,g,e,k){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else{var m=mxUtils.bind(this,function(c){if(this.getTitle()==a){var g=null,f=null;try{g=this.isModified;f=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}}),m=this.getCurrentEtag(),n=this.data;k();this.ui.gitLab.saveFile(this,mxUtils.bind(this,function(a){this.isModified=
+g;this.savingFile=!1;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;this.meta.last_commit_id=a.content.last_commit_id;this.fileSaved(n,m,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=d&&d({commitMessage:c});else if(null!=d){if(null!=a&&null!=a.retry){var b=
+a.retry;a.retry=function(){k();b()}}d(a)}}),e,c)}catch(v){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=f&&this.setModified(f||this.isModified()),null!=d)d(v);else throw v;}}else this.savingFile=!0,this.ui.pickFolder(App.MODE_GITLAB,mxUtils.bind(this,function(e){this.ui.gitLab.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e,c)}))});null!=k?m(k):this.ui.gitLab.showCommitDialog(this.meta.name,
+null==this.meta.last_commit_id||this.meta.isNew,mxUtils.bind(this,function(a){m(a)}),d)}else null!=b&&b()};GitLabLibrary=function(a,c,b){GitLabFile.call(this,a,c,b)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId="5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl="https://gitlab.com/api/v4";
+GitLabClient.prototype.authenticate=function(a,c){if(null==window.onGitLabCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){var k=encodeURIComponent(window.location.origin+"/gitlab.html");null!=window.open("https://gitlab.com/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+k+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(k,n){d?(window.onGitLabCallback=
+null,d=!1,null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=e&&e(),this.token=k,this.setUser(null),g&&this.setPersistentToken(this.token),a())):null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:b})}),mxUtils.bind(this,function(){d&&(window.onGitLabCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
+GitLabClient.prototype.executeRequest=function(a,c,b,d){var g=mxUtils.bind(this,function(k){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","Bearer "+q);a.setRequestHeader("PRIVATE_TOKEN",q);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(m)if(200<=a.getStatus()&&
+299>=a.getStatus()||d&&404==a.getStatus())c(a);else if(401===a.getStatus())k?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},b)})}):this.authenticate(function(){g(!0)},b);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}b({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?b({message:this.getErrorMessage(a,
+mxResources.get("fileNotFound"))}):400===a.getStatus()?b({status:400}):b({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),b)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},b,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},b):e(!1)};
+GitLabClient.prototype.getFile=function(a,c,b,d,g){d=null!=d?d:!1;var e=decodeURIComponent(a).split("/");a=e.indexOf("master");var k=Math.max(a-1,0),m=e.slice(0,k).join("/"),n=e[k],q=e[a];a=e.slice(a+1,e.length).join("/");e=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e))if(null!=this.token){var f=this.baseUrl+"/projects/"+encodeURIComponent(m+"/"+n)+"/repository/files/"+encodeURIComponent(q),e=a.split("/");this.ui.convertFile(f,0<e.length?
+e[e.length-1]:a,null,this.extension,c,b)}else b({message:mxResources.get("accessDenied")});else g="&t="+(new Date).getTime(),f=this.baseUrl+"/projects/"+encodeURIComponent(m+"/"+n)+"/repository/files/"+encodeURIComponent(a)+"?ref="+encodeURIComponent(q),g=new mxXmlRequest(f+g,null,"GET"),this.executeRequest(g,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(m,n,q,JSON.parse(a.getText()),d,f))}catch(p){b(p)}}),b)};
+GitLabClient.prototype.createGitLabFile=function(a,c,b,d,g){var e=d.file_name;a={org:a,repo:c,ref:b,name:e,path:d.file_path,sha:d.content_sha256,html_url:"https://gitlab.com/"+a+"/"+c+"/blob/"+b+"/"+d.file_path,download_url:"https://gitlab.com/"+a+"/"+c+"/raw/"+b+"/"+d.file_path+"?inline=false",last_commit_id:d.last_commit_id};c=d.content;"base64"===d.encoding&&("PG14ZmlsZS"==c.substring(0,10)?c=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c):/\.jpe?g$/i.test(e)?c="data:image/jpeg;base64,"+
+c:/\.gif$/i.test(e)?c="data:image/gif;base64,"+c:/\.png$/i.test(e)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitLabLibrary(this.ui,c,a):new GitLabFile(this.ui,c,a)};
+GitLabClient.prototype.insertFile=function(a,c,b,d,g,e,k){g=null!=g?g:!1;e=decodeURIComponent(e).split("/");var m=e.indexOf("master"),n=Math.max(m-1,0),q=e.slice(0,n).join("/"),f=e[n],l=e[m],p=e.slice(m+1,e.length).join("/");0<p.length&&(p+="/");p+=a;this.checkExists(q+"/"+f+"/"+l+"/"+p,!0,mxUtils.bind(this,function(e,m){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(q,f,l,p,a,c,m,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());
+b(this.createGitLabFile(q,f,l,c.content,g))}catch(C){d(C)}}),d)}),d)):b(new GitLabFile(this.ui,c,{org:q,repo:f,ref:l,name:a,path:p,sha:m,isNew:!0})):d()}))};
+GitLabClient.prototype.writeFile=function(a,c,b,d,g,e,k,m,n){e.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(b={path:encodeURIComponent(d),branch:decodeURIComponent(b),commit_message:g,content:e,encoding:"base64"},null!=k&&(b.last_commit_id=k),k=this.ui.currentFile?"PUT":"POST",a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(d),a=new mxXmlRequest(a,JSON.stringify(b),k),this.executeRequest(a,
+mxUtils.bind(this,function(a){m(a)}),n))};
+GitLabClient.prototype.saveFile=function(a,c,b,d,g){var e=a.meta.org,k=a.meta.repo,m=a.meta.ref,n=a.meta.path,q=mxUtils.bind(this,function(d,f){this.writeFile(e,k,m,n,g,f,d,mxUtils.bind(this,function(b){delete a.meta.isNew;c({content:a.meta})}),mxUtils.bind(this,function(a){b(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(n)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){q(a.meta.last_commit_id,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null):q(a.meta.last_commit_id,
+Base64.encode(a.getData()))});d?this.getFile(e+"/"+k+"/"+encodeURIComponent(m)+"/"+n,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;f()}),b):f()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
+GitLabClient.prototype.showGitLabDialog=function(a,c){var b=null,d=null,g=null,e=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing=
+"border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="194px";k.appendChild(n);var q=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(q.container,340,270,!0,!0);a&&q.okButton.parentNode.removeChild(q.okButton);var f=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}),
+l=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(f(b+"/"+d,mxUtils.bind(this,function(){e=null;x()})));a||(mxUtils.write(c," / "),c.appendChild(f(decodeURIComponent(g),mxUtils.bind(this,function(){e=null;z()}))));if(null!=e&&0<e.length){var k=e.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(f(k[a],mxUtils.bind(this,function(){e=k.slice(0,a+1).join("/");u()})))})(a)}n.appendChild(c)}),p=mxUtils.bind(this,
+function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=d=b=null,x()):this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/tree?path="+e,null,"GET");q.okButton.removeAttribute("disabled");n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(k){l(!g);this.ui.spinner.stop();var m=JSON.parse(k.getText());
+n.appendChild(f("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,x();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(n);if(null==m||0==m.length)mxUtils.write(n,mxResources.get("noFiles"));else{var p=!0;k=mxUtils.bind(this,function(k){for(var l=0;l<m.length;l++)mxUtils.bind(this,function(l){if(k==("tree"==l.type)){var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.padding="4px";m.style.width=
+"100%";m.style.backgroundColor=p?"#eeeeee":"";p=!p;var y=document.createElement("img");y.src=IMAGE_PATH+"/"+("tree"==l.type?"folder.png":"file.png");y.setAttribute("align","absmiddle");y.style.marginRight="4px";y.style.marginTop="-4px";y.width=20;m.appendChild(y);m.appendChild(f(l.name+("tree"==l.type?"/":""),mxUtils.bind(this,function(){"tree"==l.type?(e=l.path,u()):a&&"blob"==l.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+l.path))})));n.appendChild(m)}})(m[l])});k(!0);a&&
+k(!1)}}),p,!0)}),v=null,t=null,z=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/branches?per_page=100&page="+a,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+
+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",t);z(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(l(!0),n.appendChild(f("../ [Up]",mxUtils.bind(this,function(){e=null;x()}))),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(f(a.name,mxUtils.bind(this,function(){g=
+a.name;e="";u()})));mxUtils.br(n)})(b[c]);100==b.length&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",t))}}),p)}),x=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,
+mxResources.get("more")+"...");var c=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",t);x(a+1)});mxEvent.addListener(v,"click",c);var k=mxUtils.bind(this,function(a){var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(b,function(b){a(JSON.parse(b.getText()))},p)}),l=mxUtils.bind(this,function(a,b){var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,function(c){b(a,JSON.parse(c.getText()))},
+p)});k(mxUtils.bind(this,function(k){this.ui.spinner.stop();var m=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.executeRequest(m,mxUtils.bind(this,function(m){this.ui.spinner.stop();m=JSON.parse(m.getText());if(null!=m&&0!=m.length||null!=k&&0!=k.length){1==a&&(n.appendChild(f(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=
+a&&(a=a.split("/"),1<a.length?(b=a[0],d=a[1],g="master",e=null,2<a.length&&(e=encodeURIComponent(a.slice(2,a.length).join("/"))),u()):(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 p=0;p<m.length;p++)mxUtils.bind(this,function(a,c){var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";k.style.overflow=
+"hidden";k.style.padding="4px";k.style.width="100%";k.style.backgroundColor=0==c%2?"#eeeeee":"";k.appendChild(f(a.name_with_namespace,mxUtils.bind(this,function(){b=a.owner.username;d=a.name;g=a.default_branch||"master";e="";u()})));n.appendChild(k)})(m[p],p);for(p=0;p<k.length;p++)l(k[p],mxUtils.bind(this,function(a,c){for(var k=0;k<c.length;k++){var l=c[k];n.appendChild(f(l.name_with_namespace,mxUtils.bind(this,function(){b=a.full_path;d=l.path;g=l.default_branch||"master";e="";u()})));mxUtils.br(n)}}))}else mxUtils.write(n,
+mxResources.get("noFiles"));100==m.length&&(n.appendChild(v),t=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&c()},mxEvent.addListener(n,"scroll",t))}),p)}))});this.token?this.user?x():this.updateUser(function(){x()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){x()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,c,b,d,g,e,k){this.file=a;this.id=c;this.content=b;this.modifiedDate=d;this.createdDate=g;this.isResolved=e;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,b,d,g){c()};DrawioComment.prototype.editComment=function(a,c,b){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,b,d,g,e,k,m){DrawioComment.call(this,a,c,b,d,g,e,k);this.pCommentId=m};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,b,d,g){a={content:a.content};d?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest(gapi.client.drive.replies.insert({fileId:this.file.getId(),commentId:this.id,resource:a}),mxUtils.bind(this,function(a){c(a.replyId)}),b)};
DriveComment.prototype.editComment=function(a,c,b){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies.patch({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id,resource:a}):gapi.client.drive.comments.patch({fileId:this.file.getId(),commentId:this.id,resource:a}),c,b)};
DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies["delete"]({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id}):gapi.client.drive.comments["delete"]({fileId:this.file.getId(),commentId:this.id}),a,c)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var b={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@@ -9168,8 +9217,8 @@ a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(b.label+=(null!=this.
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var d=null;try{d=window.open(a)}catch(m){}null==d||void 0===d?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[a])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(a){try{a(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=0,this.initializeEmbedMode())}),5E3)}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=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";
-App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="client,drive-share";App.startTime=new Date;
+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_GITLAB="gitlab";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=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="client,drive-share";App.GOOGLE_REALTIME_EOL=15695352E5;App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
"import":"/plugins/import.js",replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js",f5:"/plugins/rackF5.js",tickets:"/plugins/tickets.js",flow:"/plugins/flow.js",webcola:"/plugins/webcola/webcola.js",rnd:"/plugins/random.js",page:"/plugins/page.js",gd:"/plugins/googledrive.js",tags:"/plugins/tags.js"};
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var c=document.cookie.split(";"),b=0;b<c.length;b++){var d=mxUtils.trim(c[b]);if("MODE="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="MODE=; expires="+c.toUTCString(),localStorage.setItem(".mode",a))}return a};
@@ -9182,13 +9231,13 @@ null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.em
"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||
"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){a=document.getElementById("geStatus");
null!=a&&(a.innerHTML="Error loading page. <a>Please try refreshing.</a>",a.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){mxResources.loadDefaultBundle=!1;b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,e){EditorUi.logError(a,b,c,d,e)};if("1"==urlParams.embed||
-"1"==urlParams.lightbox){var e=document.getElementById("geInfo");null!=e&&e.parentNode.removeChild(e)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");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"),e=document.createElement("iframe"),e.setAttribute("width","0"),e.setAttribute("height",
-"0"),e.setAttribute("src","offline.html"),document.body.appendChild(e);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){e=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var g=JSON.parse(localStorage.getItem(mxSettings.key));null!=g&&(e=g.plugins)}catch(l){}g=urlParams.p;
-App.initPluginCallback();null!=g&&App.loadPlugins(g.split(";"));if(null!=e&&0<e.length&&"0"!=urlParams.plugins){for(var g=window.location.protocol+"//"+window.location.host,k=!0,m=0;m<e.length&&k;m++)"/"!=e[m].charAt(0)&&e[m].substring(0,g.length)!=g&&(k=!1);if(k||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",
-[e.join("\n")]).replace(/\\n/g,"\n")))for(m=0;m<e.length;m++)try{null==App.pluginsLoaded[e[m]]&&(App.pluginsLoaded[e[m]]=!0,App.embedModePluginsCount++,"/"==e[m].charAt(0)&&(e[m]=PLUGINS_BASE_PATH+e[m]),mxscript(e[m]))}catch(l){}}}"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",
+"1"==urlParams.lightbox){var g=document.getElementById("geInfo");null!=g&&g.parentNode.removeChild(g)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");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"),g=document.createElement("iframe"),g.setAttribute("width","0"),g.setAttribute("height",
+"0"),g.setAttribute("src","offline.html"),document.body.appendChild(g);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){g=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var e=JSON.parse(localStorage.getItem(mxSettings.key));null!=e&&(g=e.plugins)}catch(l){}e=urlParams.p;
+App.initPluginCallback();null!=e&&App.loadPlugins(e.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var e=window.location.protocol+"//"+window.location.host,k=!0,m=0;m<g.length&&k;m++)"/"!=g[m].charAt(0)&&g[m].substring(0,e.length)!=e&&(k=!1);if(k||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==App.pluginsLoaded[g[m]]&&(App.pluginsLoaded[g[m]]=!0,App.embedModePluginsCount++,"/"==g[m].charAt(0)&&(g[m]=PLUGINS_BASE_PATH+g[m]),mxscript(g[m]))}catch(l){}}}"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();try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var n=parseInt(mxSettings.settings.autosaveDelay);!isNaN(n)&&0<n?(DrawioFile.prototype.autosaveDelay=n,null!=window.console&&console.log("Setting autosaveDelay to "+DrawioFile.prototype.autosaveDelay)):null!=window.console&&console.log("Invalid value for autosaveDelay")}null!=mxSettings.settings.defaultEdgeLength&&
-(n=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(n)&&0<n?(Graph.prototype.defaultEdgeLength=n,null!=window.console&&console.log("Setting defaultEdgeLength to "+Graph.prototype.defaultEdgeLength)):null!=window.console&&console.log("Invalid value for defaultEdgeLength"))}}catch(l){null!=window.console&&console.error(l)}if("1"==urlParams.configure){var t=window.opener||window.parent,f=function(a){if(a.source==t)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,
-"message",f),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",f);t.postMessage(JSON.stringify({event:"configure"}),"*")}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==";
+(n=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(n)&&0<n?(Graph.prototype.defaultEdgeLength=n,null!=window.console&&console.log("Setting defaultEdgeLength to "+Graph.prototype.defaultEdgeLength)):null!=window.console&&console.log("Invalid value for defaultEdgeLength"))}}catch(l){null!=window.console&&console.error(l)}if("1"==urlParams.configure){var q=window.opener||window.parent,f=function(a){if(a.source==q)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,
+"message",f),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",f);q.postMessage(JSON.stringify({event:"configure"}),"*")}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";
App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+
@@ -9197,24 +9246,25 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"/format-show.png";
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.warnInterval=3E5;"1"!=urlParams.embed?App.prototype.menubarHeight=60:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};
-App.pluginsLoaded={};App.embedModePluginsCount=0;App.loadPlugins=function(a,c){for(var b=0;b<a.length;b++)if(null!=a[b]&&0<a[b].length)try{var d=App.pluginRegistry[a[b]];null!=d?null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?c?mxinclude(d):mxscript(d):c?mxinclude(d):mxscript(drawDevUrl+d)):null!=window.console&&console.log("Unknown plugin:",a[b])}catch(e){null!=window.console&&console.log("Error loading plugin:",a[b],e)}};
+App.pluginsLoaded={};App.embedModePluginsCount=0;App.loadPlugins=function(a,c){for(var b=0;b<a.length;b++)if(null!=a[b]&&0<a[b].length)try{var d=App.pluginRegistry[a[b]];null!=d?null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?c?mxinclude(d):mxscript(d):c?mxinclude(d):mxscript(drawDevUrl+d)):null!=window.console&&console.log("Unknown plugin:",a[b])}catch(g){null!=window.console&&console.log("Error loading plugin:",a[b],g)}};
App.prototype.initializeEmbedMode=function(){"1"!=urlParams.embed||0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
-var a=mxUtils.bind(this,function(a,b,c,d,e){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:0px;max-width:90%;padding:10px;padding-right:26px;white-space:nowrap;left:50%;bottom:2px;";f.className=c;c="geStatusAlert"==c?'<img src="'+mxClient.imageBasePath+'/warning.gif" border="0" style="margin-top:-4px;margin-right:8px;margin-left:8px;" valign="middle"/>':"";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,110%)");mxUtils.setPrefixedStyle(f.style,"transition",
-"all 1s ease");f.style.whiteSpace="nowrap";f.innerHTML='<a href="'+b+'" target="_blank" style="display:inline;text-decoration:none;font-weight:700;font-size:13px;opacity:1;">'+c+a+c+"</a>"+(null!=e?'<a href="'+e+'" target="_blank" style="display:inline;text-decoration:none;font-weight:700;font-size:13px;opacity:1;margin-right:8px;">Help</a>':"");a=document.createElement("img");a.setAttribute("src",Dialog.prototype.closeImage);a.setAttribute("title",mxResources.get("close"));a.style.position="absolute";
-a.style.cursor="pointer";a.style.right="10px";a.style.top="12px";f.appendChild(a);d&&mxEvent.addListener(a,"click",d);return f});if("1"!=urlParams.embed||"1"==urlParams.od){var c=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=c)});c()}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 d=
-mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=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();null==this.drive.user||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeRealtimeWarning&&!(mxSettings.settings.closeRealtimeWarning<(new Date).getTime()-6048E5)||this.editor.chromeless&&!this.editor.editable||this.drive.checkRealtimeFiles(mxUtils.bind(this,function(){var b=Math.round((15695352E5-Date.now())/864E5),c=a(b+" days left to convert your files. Click here!",
-"https://www.draw.io/?mode=google&convert-realtime=1","geStatusAlert",mxUtils.bind(this,function(){c.parentNode.removeChild(c);this.hideFooter();isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeRealtimeWarning=Date.now(),mxSettings.save())}),"https://desk.draw.io/support/solutions/articles/16000092210");document.body.appendChild(c);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)")}),1500)}))}));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(a){null!=gapi.client&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&b()}))}))})),window.DrawGapiClientCallback=null):b()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var e=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=e)});e()}if("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;if(!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"1"==urlParams.stealth||"1"==urlParams.offline||this.editor.chromeless&&!this.editor.editable)){var g=window.setTimeout(mxUtils.bind(this,
-function(){EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),this.timeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(a){window.clearTimeout(g)}))}this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){if(!(this.getCurrentFile().mode!=App.MODE_DEVICE||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeDesktopFooter||this.editor.chromeless&&!this.editor.editable||this.footerShowing)&&null==
-urlParams.open){var b=a(mxResources.get("downloadDesktop")+"...","https://get.draw.io/","geStatusMessage",mxUtils.bind(this,function(){b.parentNode.removeChild(b);this.hideFooter();isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeDesktopFooter=Date.now(),mxSettings.save())}));document.body.appendChild(b);this.footerShowing=!0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),1500);window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,110%)");this.footerShowing=!1}),15E3)}}))}else 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.padding="6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)})),mxClient.IS_QUIRKS&&(this.icon.style.marginTop=
-"12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};App.prototype.scheduleSanityCheck=function(){null==this.sanityCheckThread&&(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
+this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));var a=mxUtils.bind(this,function(a,b,c,d,e){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:0px;max-width:90%;padding:10px;padding-right:26px;white-space:nowrap;left:50%;bottom:2px;";
+f.className=c;c="geStatusAlert"==c?'<img src="'+mxClient.imageBasePath+'/warning.gif" border="0" style="margin-top:-4px;margin-right:8px;margin-left:8px;" valign="middle"/>':"";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,110%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.style.whiteSpace="nowrap";f.innerHTML='<a href="'+b+'" target="_blank" style="display:inline;text-decoration:none;font-weight:700;font-size:13px;opacity:1;">'+c+a+c+"</a>"+(null!=e?'<a href="'+
+e+'" target="_blank" style="display:inline;text-decoration:none;font-weight:700;font-size:13px;opacity:1;margin-right:8px;">Help</a>':"");a=document.createElement("img");a.setAttribute("src",Dialog.prototype.closeImage);a.setAttribute("title",mxResources.get("close"));a.style.position="absolute";a.style.cursor="pointer";a.style.right="10px";a.style.top="12px";f.appendChild(a);d&&mxEvent.addListener(a,"click",d);return f});if("1"!=urlParams.embed||"1"==urlParams.od){var c=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=c)});c()}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 d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=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();0<=App.GOOGLE_REALTIME_EOL-Date.now()&&(null==this.drive.user||
+isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeRealtimeWarning&&!(mxSettings.settings.closeRealtimeWarning<(new Date).getTime()-3456E5)||this.editor.chromeless&&!this.editor.editable||this.drive.checkRealtimeFiles(mxUtils.bind(this,function(){var b=a("You need to take action to convert legacy files. Click here.","https://desk.draw.io/support/solutions/articles/16000092210","geStatusAlert",mxUtils.bind(this,function(){b.parentNode.removeChild(b);this.hideFooter();isLocalStorage&&
+null!=mxSettings.settings&&(mxSettings.settings.closeRealtimeWarning=Date.now(),mxSettings.save())}));document.body.appendChild(b);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),1500)})))}));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(a){null!=gapi.client&&gapi.client.load("drive",
+"v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&b()}))}))})),window.DrawGapiClientCallback=null):b()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var g=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=g)});g()}if("1"!=urlParams.embed){if(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,!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"1"==urlParams.stealth||"1"==urlParams.offline||this.editor.chromeless&&!this.editor.editable)){var e=window.setTimeout(mxUtils.bind(this,function(){EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),this.timeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(a){window.clearTimeout(e)}));
+this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){if(!(this.getCurrentFile().mode!=App.MODE_DEVICE||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeDesktopFooter||this.editor.chromeless&&!this.editor.editable||this.footerShowing)&&null==urlParams.open){var b=a(mxResources.get("downloadDesktop")+"...","https://get.draw.io/","geStatusMessage",mxUtils.bind(this,function(){b.parentNode.removeChild(b);this.hideFooter();isLocalStorage&&null!=mxSettings.settings&&
+(mxSettings.settings.closeDesktopFooter=Date.now(),mxSettings.save())}));document.body.appendChild(b);this.footerShowing=!0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),1500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,110%)");this.footerShowing=!1}),15E3)}}))}}else 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.padding="6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)})),mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
+App.prototype.scheduleSanityCheck=function(){null==this.sanityCheckThread&&(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
App.prototype.sanityCheck=function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()&&a.isAutosave()&&a.isOverdue()){var c={category:"WARN-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=
a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(c.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+
"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(c);c=mxResources.get("ensureDataSaved");null!=a.lastSaved&&(c=this.timeSince(a.lastSaved),null==c&&(c=mxResources.get("lessThanAMinute")),c=mxResources.get("lastSaved",[c]));this.showError(mxResources.get("unsavedChanges"),c,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=this.mode&&
@@ -9227,18 +9277,18 @@ App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var c
App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(c){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a};
-App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var d=this.editor.graph,e=null!=d.themes&&"darkTheme"==d.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||e)){var d=this.createTemporaryGraph(e?d.getDefaultStylesheet():d.getStylesheet()),g=d.getGlobalVariable,k=this.pages[0];e&&(d.defaultThemeName="default");d.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!d.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(D){a=null}c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),n=d.getGraphBounds(),t=a/n.width,t=Math.min(1,Math.min(3*
-a/(4*n.height),t)),f=Math.floor(n.x),l=Math.floor(n.y);m.setAttribute("width",Math.ceil(t*(n.width+4)));m.setAttribute("height",Math.ceil(t*(n.height+4)));var p=m.getContext("2d");p.scale(t,t);p.translate(-f,-l);var u=d.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";p.save();p.fillStyle=u;p.fillRect(f,l,Math.ceil(n.width+4),Math.ceil(n.height+4));p.restore();var v=new mxJsCanvas(m),q=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var A=new mxImageExport;
-A.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())};A.drawText=function(a,b){};A.drawState(d.getView().getState(d.model.root),q);q.finish(mxUtils.bind(this,function(){try{A.drawState(d.getView().getState(d.model.root),v),d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(z){m=null}c(m)}));b=!0}}catch(z){null!=d&&d!=this.editor.graph&&null!=
+App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var d=this.editor.graph,g=null!=d.themes&&"darkTheme"==d.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||g)){var d=this.createTemporaryGraph(g?d.getDefaultStylesheet():d.getStylesheet()),e=d.getGlobalVariable,k=this.pages[0];g&&(d.defaultThemeName="default");d.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!d.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(C){a=null}c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),n=d.getGraphBounds(),q=a/n.width,q=Math.min(1,Math.min(3*
+a/(4*n.height),q)),f=Math.floor(n.x),l=Math.floor(n.y);m.setAttribute("width",Math.ceil(q*(n.width+4)));m.setAttribute("height",Math.ceil(q*(n.height+4)));var p=m.getContext("2d");p.scale(q,q);p.translate(-f,-l);var u=d.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";p.save();p.fillStyle=u;p.fillRect(f,l,Math.ceil(n.width+4),Math.ceil(n.height+4));p.restore();var v=new mxJsCanvas(m),t=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var z=new mxImageExport;
+z.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())};z.drawText=function(a,b){};z.drawState(d.getView().getState(d.model.root),t);t.finish(mxUtils.bind(this,function(){try{z.drawState(d.getView().getState(d.model.root),v),d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(x){m=null}c(m)}));b=!0}}catch(x){null!=d&&d!=this.editor.graph&&null!=
d.container.parentNode&&d.container.parentNode.removeChild(d.container)}return b};App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();c=null!=d?d.getMode():c;c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):c==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=c==App.MODE_DEVICE?"pointer":"default")}if(b)try{if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var e=new Date;e.setYear(e.getFullYear()+1);document.cookie="MODE="+c+"; expires="+e.toUTCString()}}catch(g){}}})();
+this.appIcon.style.cursor="pointer"):c==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=c==App.MODE_DEVICE?"pointer":"default")}if(b)try{if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+c+"; expires="+g.toUTCString()}}catch(e){}}})();
App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var c=this.getCurrentFile(),b=null!=c?c.getMode():null;b==App.MODE_GOOGLE?null!=c&&null!=c.desc&&null!=c.desc.parents&&0<c.desc.parents.length&&!mxEvent.isShiftDown(a)?this.openLink("https://drive.google.com/drive/folders/"+c.desc.parents[0].id):null!=c&&null!=c.getId()?this.openLink("https://drive.google.com/open?id="+c.getId()):this.openLink("https://drive.google.com/?authuser=0"):b==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):
-b==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):b==App.MODE_TRELLO?this.openLink("https://trello.com/"):b==App.MODE_GITHUB?null!=c&&c.constructor==GitHubFile?this.openLink(c.meta.html_url):this.openLink("https://github.com/"):b==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(a)};
+b==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):b==App.MODE_TRELLO?this.openLink("https://trello.com/"):b==App.MODE_GITHUB?null!=c&&c.constructor==GitHubFile?this.openLink(c.meta.html_url):this.openLink("https://github.com/"):b==App.MODE_GITLAB?null!=c&&c.constructor==GitLabFile?this.openLink(c.meta.html_url):this.openLink("https://gitlab.com/"):b==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}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));if(null!=a&&1<a.length&&"T"==a.charAt(0)){var c=a.indexOf("#");0<c&&(a=a.substring(0,c))}return a};
-App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var c=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(c.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,c,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)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,c):new LocalFile(this,a,c,e))}))}}catch(b){}};
+App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var c=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(c.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,c,g){this.spinner.stop();null==c&&(c=urlParams.title,g=!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)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,c):new LocalFile(this,a,c,g))}))}}catch(b){}};
App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:"+App.GOOGLE_APIS,mxUtils.bind(this,function(c){null==gapi.client?(this.mode=this.drive=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.mode=this.drive=null);a()}))}))}))};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(a){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){"1"==urlParams["convert-realtime"]?(this.spinner.stop(),this.drive.convertRealtimeFiles()):this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
@@ -9249,147 +9299,150 @@ mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function
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{this.hideDialog();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!=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(t){}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(),
+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(q){}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())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=
this.getSearch(["create","title"]))}),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,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,
-8))try{null!=window.opener&&null!=window.opener[c]?d(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){d(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash=
-"G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(e){this.handleError(e)}};
+8))try{null!=window.opener&&null!=window.opener[c]?d(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){d(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash=
+"G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(g){this.handleError(g)}};
App.prototype.showSplash=function(a){var c=this.getServiceCount(!0,!0),b=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>c||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!a)null==urlParams.create&&b();else{a=4==c?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();b()}),a);this.showDialog(d.container,3>a?260:300,4<=c?420:300,!0,!1);d.init()}};
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!a)null==urlParams.create&&b();else{a=4==c?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();b()}),a);this.showDialog(d.container,3>a?260:300,4<=c?440:320,!0,!1);d.init()}};
App.prototype.addLanguageMenu=function(a,c){var b=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){b=document.createElement("div");b.setAttribute("title",mxResources.get("language"));b.className="geIcon geSprite geSprite-globe";b.style.position="absolute";b.style.cursor="pointer";b.style.bottom="20px";b.style.right="20px";if(c){b.style.direction="rtl";b.style.textAlign="right";b.style.right="24px";var d=document.createElement("span");d.style.display="inline-block";
-d.style.fontSize="12px";d.style.margin="5px 24px 0 0";d.style.color="gray";mxUtils.write(d,mxResources.get("language"));b.appendChild(d)}mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(this.menus.get("language").funct);c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=mxUtils.getOffset(b);
-c.popup(d.x,d.y+b.offsetHeight,null,a);this.setCurrentMenu(c)}));a.appendChild(b)}return b};
+d.style.fontSize="12px";d.style.margin="5px 24px 0 0";d.style.color="gray";d.style.userSelect="none";mxUtils.write(d,mxResources.get("language"));b.appendChild(d)}mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(this.menus.get("language").funct);c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);
+c.destroy()});var d=mxUtils.getOffset(b);c.popup(d.x,d.y+b.offsetHeight,null,a);this.setCurrentMenu(c)}));a.appendChild(b)}return b};
App.prototype.pickFile=function(a){try{if(a=null!=a?a:this.mode,a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var c=this.getPeerForMode(a);if(null!=c)c.pickFile();else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){null!=b.files&&
(this.openFiles(b.files),b.type="",b.type="file",b.value="")}));b.style.display="none";document.body.appendChild(b);this.openFileInputElt=b}this.openFileInputElt.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)+".drawio");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()})}}}catch(k){this.handleError(k)}};
-App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var g=this.dialog,e=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(g,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(k){this.handleError(k)}};
+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_GITLAB||a==App.MODE_TRELLO){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(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){if(null==this.libFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=
b.files){for(var a=0;a<b.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)})(b.files[a]);b.type="";b.type="file";b.value=""}}));b.style.display="none";document.body.appendChild(b);this.libFileInputElt=b}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";var d=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=
d;window.openFile=null})}};
-App.prototype.saveLibrary=function(a,c,b,d,e,g,k){try{d=null!=d?d:this.mode;e=null!=e?e:!1;g=null!=g?g:!1;var m=this.createLibraryDataFromImages(c),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&d==App.MODE_DEVICE&&(b=new LocalLibrary(this,m,a));if(null==b)this.pickFolder(d,mxUtils.bind(this,function(b){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-m,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),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,c)}),n,b):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,c)}),n,b):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,c)}),n,b):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,c)}),n,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,m,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),n)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(m);var t=mxUtils.bind(this,
-function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(b,c);null!=k&&k()}),n)});if(a!=b.getTitle()){var f=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&f!=b.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(f);t()}),n)}else t()}}catch(l){this.handleError(l)}};
-App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var e=null!=b.getTitle()?b.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,m=this.getServiceCount(!0);
-isLocalStorage&&m++;var n=4>=m?2:6<m?4:3,e=new CreateDialog(this,e,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"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)):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
-this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)})):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,null,!0,n,null,null,null,this.editor.fileExtensions);this.showDialog(e.container,460,m>n?390:270,!0,!0);e.init()}else this.save(b.getTitle(),d)}};
-App.prototype.loadTemplate=function(a,c,b,d){var e=!1,g=a;this.editor.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+g,e=!0);var k=null!=d?d:a;this.loadUrl(g,mxUtils.bind(this,function(d){try{var g=e?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(/(\.v(dx|sdx?))($|\?)/i.test(k)||this.isVisioData(g))this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(a){c(a)},b,k);else if(!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,k))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)}),a);else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(g))g=this.extractGraphModelFromPng(d);c(g)}}catch(t){b(t)}}),
-b,/(\.png)($|\?)/i.test(k)||/(\.v(dx|sdx?))($|\?)/i.test(k),null,null,e)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,c,b,d,e,g,k,m,n){d=m?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var t=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){t();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,c,k,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,g,e,n)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,g,e,n)}),f,!1,k);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,g,e,n)}),f,!1,k);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,
-b,g,e,n)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,g,e,n)}),f,!1,k);else if(d==App.MODE_BROWSER){t();var l=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,b,g,e,n)}),f)});null==localStorage.getItem(a)?l():this.confirm(mxResources.get("replaceIt",[a]),l,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&
-this.showSplash()}))}else t(),this.fileCreated(new LocalFile(this,c,a,null==d),b,g,e,n)}catch(p){t(),this.handleError(p)}}};
-App.prototype.fileCreated=function(a,c,b,d,e){var g=window.location.pathname;null!=c&&0<c.length&&(g+="?libs="+c);null!=e&&0<e.length&&(g+="?clibs="+e);g=this.getUrl(g);a.getMode()!=App.MODE_DEVICE&&(g+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+g,n=k,t=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
-(t=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(t.container),n=this.decodeNodeIntoGraph(n,t));a.setData(this.createFileData(k,t,a,m));null!=t&&t.container.parentNode.removeChild(t.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==b&&null!=k&&(b=!k.isModified()&&null==k.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();
-null!=c&&this.sidebar.showEntries(c);if(null!=e){for(var d=[],f=e.split(";"),g=0;g<f.length;g++)d.push(decodeURIComponent(f[g]));this.loadLibraries(d)}}),m=mxUtils.bind(this,function(){b||null==k||!k.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==b||b?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
-null==a.getMode())),null!=d&&d(),window.openWindow(g,null,m))});a.constructor==LocalFile?l():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){l()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,c,b,d,e){this.hideDialog();var g=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(p){this.handleError(p,
+App.prototype.saveLibrary=function(a,c,b,d,g,e,k){try{d=null!=d?d:this.mode;g=null!=g?g:!1;e=null!=e?e:!1;var m=this.createLibraryDataFromImages(c),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&d==App.MODE_DEVICE&&(b=new LocalLibrary(this,m,a));if(null==b)this.pickFolder(d,mxUtils.bind(this,function(b){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+m,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),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,c)}),n,b):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,m,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),n,b):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,c)}),n,b):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,c)}),n,b):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,c)}),n,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,m,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),n)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",
+[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(m);var q=mxUtils.bind(this,function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(b,c);null!=k&&k()}),n)});if(a!=b.getTitle()){var f=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&f!=b.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(b.getHash()));
+this.removeLibrarySidebar(f);q()}),n)}else q()}}catch(l){this.handleError(l)}};
+App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var g=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,m=this.getServiceCount(!0);
+isLocalStorage&&m++;var n=4>=m?2:6<m?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"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)):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
+this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)})):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,null,!0,n,null,null,null,this.editor.fileExtensions);this.showDialog(g.container,460,m>n?390:270,!0,!0);g.init()}else this.save(b.getTitle(),d)}};
+App.prototype.loadTemplate=function(a,c,b,d){var g=!1,e=a;this.editor.isCorsEnabledForUrl(e)||(e="t="+(new Date).getTime(),e=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+e,g=!0);var k=null!=d?d:a;this.loadUrl(e,mxUtils.bind(this,function(d){try{var e=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(/(\.v(dx|sdx?))($|\?)/i.test(k)||this.isVisioData(e))this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(a){c(a)},b,k);else if(!this.isOffline()&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,k))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(e))e=this.extractGraphModelFromPng(d);c(e)}}catch(q){b(q)}}),
+b,/(\.png)($|\?)/i.test(k)||/(\.v(dx|sdx?))($|\?)/i.test(k),null,null,g)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
+App.prototype.createFile=function(a,c,b,d,g,e,k,m,n){d=m?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var q=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){q();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,c,k,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f);else if(d==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,
+b,e,g,n)}),f,!1,k);else if(d==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f);else if(d==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,b,e,g,n)}),f,!1,k);else if(d==App.MODE_BROWSER){q();var l=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,b,e,g,n)}),f)});null==localStorage.getItem(a)?
+l():this.confirm(mxResources.get("replaceIt",[a]),l,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else q(),this.fileCreated(new LocalFile(this,c,a,null==d),b,e,g,n)}catch(p){q(),this.handleError(p)}}};
+App.prototype.fileCreated=function(a,c,b,d,g){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);null!=g&&0<g.length&&(e+="?clibs="+g);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+e,n=k,q=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
+(q=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(q.container),n=this.decodeNodeIntoGraph(n,q));a.setData(this.createFileData(k,q,a,m));null!=q&&q.container.parentNode.removeChild(q.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==b&&null!=k&&(b=!k.isModified()&&null==k.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();
+null!=c&&this.sidebar.showEntries(c);if(null!=g){for(var d=[],e=g.split(";"),f=0;f<e.length;f++)d.push(decodeURIComponent(e[f]));this.loadLibraries(d)}}),m=mxUtils.bind(this,function(){b||null==k||!k.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==b||b?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
+null==a.getMode())),null!=d&&d(),window.openWindow(e,null,m))});a.constructor==LocalFile?l():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){l()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}};
+App.prototype.loadFile=function(a,c,b,d,g){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(p){this.handleError(p,
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=b)this.spinner.stop(),this.fileLoaded(b),null!=d&&d();else if("S"==a.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),
d,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),e=decodeURIComponent(a.substring(1)),"<"!=e.charAt(0)&&(e=Graph.decompress(e)),e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),e.getHash=function(){return a},this.fileLoaded(e),null!=d&&d();else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1)),
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();if(null!=this.drive){var a=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+a,c,null,mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&this.editor.chromeless&&!this.editor.editable&&(b.getHash=function(){return"G"+a},window.location.hash="#"+b.getHash());
null!=d&&d()}));return!0}return!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("."),k=d.lastIndexOf("/");e>k&&0<k&&(d=d.substring(k+1,e),e=g.substring(e),this.useCanvasForExport||".png"!=e||(e=".drawio"),".svg"===e||".xml"===e||".html"===
e||".png"===e||".drawio"===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,!0)||f()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else f()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){f()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},
-mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(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():""}));else{var k=a.charAt(0);a=decodeURIComponent(a.substring(1));e.getFile(a,mxUtils.bind(this,function(b){this.spinner.stop();this.fileLoaded(b);var c=this.getCurrentFile();null==c?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(c.getHash=function(){return k+a},window.location.hash="#"+c.getHash()):b==c&&null==b.getMode()&&(b=mxResources.get("browserUnsupportedFiletype"),this.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+
-b+"</div>"));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()}))}))}}),k=this.getCurrentFile(),m=mxUtils.bind(this,function(){e||null==k||!k.isModified()?g():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,
-function(){null!=k&&(window.location.hash=k.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?m():null!=k&&k.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,m):m()};
+mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(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:"A"==a.charAt(0)?e=this.gitLab:"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():""}));else{var k=a.charAt(0);a=decodeURIComponent(a.substring(1));e.getFile(a,mxUtils.bind(this,function(b){this.spinner.stop();this.fileLoaded(b);var c=this.getCurrentFile();null==c?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(c.getHash=function(){return k+a},window.location.hash="#"+c.getHash()):b==c&&null==b.getMode()&&(b=mxResources.get("browserUnsupportedFiletype"),this.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+
+b+"</div>"));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()}))}))}}),k=this.getCurrentFile(),m=mxUtils.bind(this,function(){g||null==k||!k.isModified()?e():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,
+function(){null!=k&&(window.location.hash=k.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?m():null!=k&&k.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,m):m()};
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?c+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?c+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
-App.prototype.loadLibraries=function(a,c){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var b=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),d=0,e=[],g=mxUtils.bind(this,function(){if(0==d){if(null!=a)for(var b=a.length-1;0<=b;b--)null!=e[b]&&this.loadLibrary(e[b]);null!=c&&c()}});if(null!=a)for(var k=0;k<a.length;k++){var m=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,c){if(null!=
-a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){d++;var f=mxUtils.bind(this,function(b){delete this.pendingLibraries[a];e[c]=b;d--;g()}),k=mxUtils.bind(this,function(c){b(a,c);d--;g()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));this.getLocalData(b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&(a=this.emptyLibraryXml);
-null!=a?f(new StorageLibrary(this,a,b)):k()}))}catch(z){k()}}),0);else if("U"==m){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){m=n;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+m);try{mxUtils.get(m,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),n))}catch(z){k()}else k()}),function(){k()})}catch(A){k()}}}else if("R"==m){if(m=decodeURIComponent(a.substring(1)),
-!this.isOffline())try{var m=JSON.parse(m),t={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,t))}catch(z){k()}}),function(){k()})}catch(A){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(A){k()}else{var q=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(q=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&
-(q=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==m&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(z){k()}}),function(a){k()}):k(!0)}}})(m,k)}g()}};
+App.prototype.loadLibraries=function(a,c){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var b=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),d=0,g=[],e=mxUtils.bind(this,function(){if(0==d){if(null!=a)for(var b=a.length-1;0<=b;b--)null!=g[b]&&this.loadLibrary(g[b]);null!=c&&c()}});if(null!=a)for(var k=0;k<a.length;k++){var m=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,c){if(null!=
+a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){d++;var f=mxUtils.bind(this,function(b){delete this.pendingLibraries[a];g[c]=b;d--;e()}),k=mxUtils.bind(this,function(c){b(a,c);d--;e()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));this.getLocalData(b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&(a=this.emptyLibraryXml);
+null!=a?f(new StorageLibrary(this,a,b)):k()}))}catch(x){k()}}),0);else if("U"==m){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){m=n;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+m);try{mxUtils.get(m,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),n))}catch(x){k()}else k()}),function(){k()})}catch(z){k()}}}else if("R"==m){if(m=decodeURIComponent(a.substring(1)),
+!this.isOffline())try{var m=JSON.parse(m),q={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,q))}catch(x){k()}}),function(){k()})}catch(z){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(z){k()}else{var t=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&
+(t=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==m&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(x){k()}}),function(a){k()}):k(!0)}}})(m,k)}e()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme&&(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"),mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);null!=
a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),
a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=
-null)}};App.prototype.save=function(a,c){var b=this.getCurrentFile(),d=mxResources.get("saving");if(null!=b&&this.spinner.spin(document.body,d)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){b.handleFileSuccess(!0);null!=c&&c()}),e=mxUtils.bind(this,function(a){b.handleFileError(a,!0)});try{a==b.getTitle()?b.save(!0,d,e):b.saveAs(a,d,e)}catch(g){b.handleFileError(g,!0)}}};
-App.prototype.pickFolder=function(a,c,b,d,e){b=null!=b?b:!0;var g=this.spinner.pause();b&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){g();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);c(b)}}),e):b&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){g();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
-c(a))}),d):b&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){g();c(a)})):b&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){g();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,c,b,d,e,g){e==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):e==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,g,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),b,d):e==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,g):e==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(c,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,g,d):e==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,g):e==App.MODE_BROWSER&&(b=mxUtils.bind(this,function(){localStorage.setItem(c,a)}),null==localStorage.getItem(c)?
+null)}};App.prototype.save=function(a,c){var b=this.getCurrentFile(),d=mxResources.get("saving");if(null!=b&&this.spinner.spin(document.body,d)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){b.handleFileSuccess(!0);null!=c&&c()}),g=mxUtils.bind(this,function(a){b.handleFileError(a,!0)});try{a==b.getTitle()?b.save(!0,d,g):b.saveAs(a,d,g)}catch(e){b.handleFileError(e,!0)}}};
+App.prototype.pickFolder=function(a,c,b,d,g){b=null!=b?b:!0;var e=this.spinner.pause();b&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){e();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);c(b)}}),g):b&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){e();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
+c(a))}),d):b&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){e();c(a)})):b&&a==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(a){e();c(a)})):b&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){e();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(a,c,b,d,g,e){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,e,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),b,d):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,e):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(c,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,e,d):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,e):g==App.MODE_BROWSER&&(b=mxUtils.bind(this,function(){localStorage.setItem(c,a)}),null==localStorage.getItem(c)?
b():this.confirm(mxResources.get("replaceIt",[c]),b))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var c=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,c);this.fname.setAttribute("title",c+" - "+mxResources.get("rename"))}var c=this.editor.graph,b=a.isEditable()&&!a.invalidChecksum;c.isEnabled()&&!b&&c.reset();c.setEnabled(b);null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?
window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.editor.graph.isSelectionEmpty()&&this.format.refresh()};
-App.prototype.showAuthDialog=function(a,c,b,d){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,c?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,c,b,d,e,g){var k=c;/\.svg$/i.test(k)||(k=k.substring(0,c.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(c)&&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(){if(200<=n.status&&299>=n.status){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,k,!0))}),g,c)}else null!=g&&g({message:mxResources.get("errorLoadingFile")})});n.onerror=g;n.send()}else{var t=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?e(new LocalFile(this,temp,k,!0)):e(new LocalFile(this,b,c,!0))):Graph.fileSupport&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,k,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),c):e(new LocalFile(this,b,k,!0))}catch(l){null!=g&&g(l)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.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 b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));t(b)}}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,t,g,b)}};
+App.prototype.showAuthDialog=function(a,c,b,d){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,c?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,c,b,d,g,e){var k=c;/\.svg$/i.test(k)||(k=k.substring(0,c.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(c)&&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(){if(200<=n.status&&299>=n.status){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){g(new LocalFile(this,a,k,!0))}),e,c)}else null!=e&&e({message:mxResources.get("errorLoadingFile")})});n.onerror=e;n.send()}else{var q=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,k,!0)):g(new LocalFile(this,b,c,!0))):Graph.fileSupport&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,k,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c):g(new LocalFile(this,b,k,!0))}catch(l){null!=e&&e(l)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&
+299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));q(b)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,q,e,b)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.height=this.menubarHeight-16+"px";this.appIcon.style.margin="8px 0px 8px 8px";this.appIcon.style.borderRadius="4px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,
function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
-this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));
-"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="50px";this.fnameWrapper.style.top="6px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",
-mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),
-this.actions.get("rename").funct());mxEvent.consume(a)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="29px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+
-Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="8px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"30px":"10px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height=
-"16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();
-mxEvent.consume(a)}));var c=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",c);c();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="8px";
-this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"50px":"30px";this.fullscreenElement.style.padding="2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+
-"')";this.toolbarContainer.appendChild(this.fullscreenElement);mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var b=this.hsplitPosition,d=!1;"dark"==uiTheme&&(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=
-uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!d);this.toggleFormatPanel(!d);this.hsplitPosition=d?b:0;this.hideFooter();d=!d;mxEvent.consume(a)}));"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height=
+this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_GITLAB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,
+"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="50px";this.fnameWrapper.style.top="6px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";this.fnameWrapper.style.textOverflow=
+"ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
+null!=b&&b.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(a)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="29px");this.toggleFormatElement=document.createElement("a");
+this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="8px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"30px":"10px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton":
+"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,
+"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var c=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",c);c();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display=
+"inline-block";this.fullscreenElement.style.top="8px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"50px":"30px";this.fullscreenElement.style.padding="2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage=
+"url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var b=this.hsplitPosition,d=!1;"dark"==uiTheme&&(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,
+function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!d);this.toggleFormatPanel(!d);this.hsplitPosition=d?b:0;this.hideFooter();d=!d;mxEvent.consume(a)}));"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height=
"16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="8px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat","dark"==uiTheme&&(this.toggleElement.style.filter="invert(100%)"),mxEvent.addListener(this.toggleElement,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(a){this.toggleCompactMode();mxEvent.consume(a)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};
App.prototype.toggleCompactMode=function(a){a||"none"!=this.appIcon.style.display?(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,
this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')"):(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="29px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility="visible",this.menubarHeight=
App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')")};
-App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=document.createElement("a"),this.userElement.className="geItem",this.userElement.style.position="absolute",this.userElement.style.fontSize="8pt",this.userElement.style.top=
-"atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement,mxClient.IS_POINTER?
-"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";b.style.right="36px";b.style.padding="0px";b.style.cursor="default";this.userPanel=b}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
-else{var c=!1;this.userPanel.innerHTML="";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(b);null!=this.drive&&(b=this.drive.getUser(),null!=b&&(c=!0,this.userPanel.innerHTML+=
-'<table title="User ID: '+b.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b.pictureUrl?'<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+
-"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",b=document.createElement("div"),b.style.textAlign="center",b.style.paddingBottom="12px",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,d,e){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+
-mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=e?"<br><br><small>"+mxUtils.htmlEntities(e)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.paddingBottom="12px",a.style.whiteSpace="nowrap",null!=d&&a.appendChild(mxUtils.button(mxResources.get("signOut"),d)),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"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):
-b()}else this.trello.logout()}),mxResources.get("trello"));c||(b=document.createElement("div"),b.style.textAlign="center",b.style.padding="20px 20px 10px 10px",b.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(b));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";var e=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(a)||
-null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)}));b.appendChild(e);this.userPanel.appendChild(b);document.body.appendChild(this.userPanel)}mxEvent.consume(a)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():
-null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=
-null)};App.prototype.getCurrentUser=function(){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());return a};var editorResetGraph=Editor.prototype.resetGraph;
+App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=document.createElement("a"),this.userElement.className="geItem",this.userElement.style.position="absolute",this.userElement.style.fontSize=
+"8pt",this.userElement.style.top="atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement,
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";b.style.right="36px";b.style.padding="0px";b.style.cursor="default";this.userPanel=b}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
+else{var c=!1;this.userPanel.innerHTML="";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(b);if(null!=this.drive&&(b=this.drive.getUser(),null!=b)){c=!0;this.userPanel.innerHTML+=
+'<table title="User ID: '+b.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="middle">'+(null!=b.pictureUrl?'<img width="50" height="50" style="margin-right:8px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img width="46" height="46" style="margin-right:4px;margin-top:0px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:4px;":"")+'">'+mxUtils.htmlEntities(b.displayName)+'<br><small style="color:gray;">'+
+mxUtils.htmlEntities(b.email)+'</small><div style="margin-top:4px;"><i>'+mxResources.get("googleDrive")+"</i></div></tr></table>";b=document.createElement("div");b.style.textAlign="center";b.style.paddingBottom="12px";b.style.whiteSpace="nowrap";var g=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())}));g.className="geBtn";b.appendChild(g);this.userPanel.appendChild(b)}b=mxUtils.bind(this,function(a,b,d,g){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:6px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+
+mxUtils.htmlEntities(a.displayName)+(null!=a.email?'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+"</small>":"")+(null!=g?'<div style="margin-top:4px;"><i>'+mxUtils.htmlEntities(g)+"</i></div>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.paddingBottom="12px",a.style.whiteSpace="nowrap",null!=d&&(d=mxUtils.button(mxResources.get("signOut"),d),d.className="geBtn",a.appendChild(d)),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.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitLabFile){var b=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
+""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitLab.logout()}),mxResources.get("gitlab"));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"),
+null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.trello.logout()}),mxResources.get("trello"));c||(b=document.createElement("div"),b.style.textAlign="center",b.style.padding="20px 20px 10px 10px",b.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(b));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";g=mxUtils.button(mxResources.get("close"),
+mxUtils.bind(this,function(){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)}));g.className="geBtn";b.appendChild(g);this.userPanel.appendChild(b);document.body.appendChild(this.userPanel)}mxEvent.consume(a)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));
+var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?a=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(a=this.gitLab.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)};
+App.prototype.getCurrentUser=function(){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());return a};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,c){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
-var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,d=a.editor.graph,e=mxUtils.bind(d,d.isEnabled),g=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),k=("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"==
+var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,d=a.editor.graph,g=mxUtils.bind(d,d.isEnabled),e=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),k=("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),n=("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,k,l,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));a.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){var b=new NewDialog(a,null,!1,function(b){a.hideDialog();if(null!=b){var c=a.editor.graph.getFreeInsertPoint();d.setSelectionCells(a.importXml(b,Math.max(c.x,20),Math.max(c.y,20),!0));d.scrollCellToVisible(d.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));
-a.showDialog(b.container,620,440,!0,!0)})).isEnabled=e;window.mxFreehand&&(d.addListener("freehandInserted",function(){d.container.style.cursor="";a.editor.setStatus("")}),a.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(b){d.isEnabled()&&(d.freehand.setEnabled(!0),d.freehand.setClosedPath(null!=b&&mxEvent.isShiftDown(b)),a.editor.setStatus(mxResources.get("startDrawing")),d.container.style.cursor="crosshair")})).isEnabled=e);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,g,k,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(k),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>'+
+a.showDialog(b.container,620,440,!0,!0)})).isEnabled=g;window.mxFreehand&&(a.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(b){d.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(a,document.body.offsetWidth-420,102,176,104)),d.freehand.isDrawing()?d.freehand.stopDrawing():d.freehand.startDrawing(),this.freehandWindow.window.setVisible(d.freehand.isDrawing()))})).isEnabled=g);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("compressed"),!c,c),k=a.addCheckbox(b,mxResources.get("allPages"),!0,c);k.style.marginBottom=
+"16px";mxEvent.addListener(f,"change",function(){f.checked?k.setAttribute("disabled","disabled"):k.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c||!g.checked,null,!f.checked,c||!k.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,176,!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,k,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(k),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("undefined"!==typeof mxIsElectron5&&mxIsElectron5||!a.isOffline()&&!a.printPdfExport){var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));
e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(e);var e=function(){g!=this&&this.checked?l.removeAttribute("disabled"):(l.setAttribute("disabled","disabled"),l.checked=!1)},f=146;if(a.pdfPageExport&&!b){var g=a.addRadiobox(c,"pages",mxResources.get("allPages"),!0),f=a.addRadiobox(c,"pages",mxResources.get("currentPage",null,"Current Page"),!1),k=a.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=a.addCheckbox(c,mxResources.get("crop"),
!1,!0);mxEvent.addListener(g,"change",e);mxEvent.addListener(f,"change",e);mxEvent.addListener(k,"change",e);f=205}else k=a.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=a.addCheckbox(c,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport),a.pdfPageExport||mxEvent.addListener(k,"change",e);c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!k.checked,b?!0:!g.checked,!l.checked)}),null,mxResources.get("export"));a.showDialog(c.container,
300,f,!0,!0)}else a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!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(){a.isRevisionHistorySupported()?a.spinner.spin(document.body,mxResources.get("loading"))&&a.getRevisions(mxUtils.bind(this,function(b,c){a.spinner.stop();var d=new RevisionDialog(a,b,c);a.showDialog(d.container,
-640,480,!0,!0);d.init()}),mxUtils.bind(this,function(b){a.handleError(b)})):a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");var t=a.actions.addAction("synchronize",function(){a.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(t.label=mxResources.get("refresh"));a.actions.addAction("upload...",
-function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(t=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)}),
-t.setToggleAction(!0),t.setSelectedCallback(function(){return a.isMathEnabled()}),t.isEnabled=e);if(isLocalStorage||mxClient.IS_CHROMEAPP)t=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var f=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});f.setToggleAction(!0);f.setSelectedCallback(function(){return f.isEnabled()&&
+640,480,!0,!0);d.init()}),mxUtils.bind(this,function(b){a.handleError(b)})):a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");var q=a.actions.addAction("synchronize",function(){a.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(q.label=mxResources.get("refresh"));a.actions.addAction("upload...",
+function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(q=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)}),
+q.setToggleAction(!0),q.setSelectedCallback(function(){return a.isMathEnabled()}),q.isEnabled=g);if(isLocalStorage||mxClient.IS_CHROMEAPP)q=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),q.setToggleAction(!0),q.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var f=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});f.setToggleAction(!0);f.setSelectedCallback(function(){return f.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 l="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");
a.actions.addAction("copyStyle",function(){var b=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<l.length;f++){var g=l[f],k=a.copiedStyle[g];e.style[g]!=k&&d.setCellStyles(g,k,[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,k,l,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,k,!l,m)}),!0,!0,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
function(b,c,d,e,f){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d,e,f)}),!1,!0)}));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,k,l,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,k,!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,d,e,f){a.downloadFile("jpeg",null,null,b,null,null,null,e,f)}),!0,!0)}));t=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return d.shadowVisible});var p=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){p||(a.showDialog((new AboutDialog(a)).container,220,
+a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c,d,e,f){a.downloadFile("jpeg",null,null,b,null,null,null,e,f)}),!0,!0)}));q=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return d.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")});t=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())}));t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-this.tagsWindow&&this.tagsWindow.window.isVisible()}));t=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())}));
-t.setToggleAction(!0);t.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){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,
+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")});q=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())}));q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!=
+this.tagsWindow&&this.tagsWindow.window.isVisible()}));q=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())}));
+q.setToggleAction(!0);q.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){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)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");
if(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.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=document.createElement("div");d.style.backgroundImage=
"url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}a.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
-intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];a.actions.addAction("runLayout",function(){var b=new TextareaDialog(a,"Run Layouts:",JSON.stringify(a.customLayoutConfig,null,2),function(b){if(0<b.length)try{var c=JSON.parse(b);a.executeLayoutList(c);a.customLayoutConfig=c}catch(x){a.handleError(x),console.error(x)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()});var t=this.get("layout"),
-v=t.funct;t.funct=function(b,c){v.apply(this,arguments);b.addSeparator(c);a.menus.addMenuItem(b,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var d=b.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size",
+intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];a.actions.addAction("runLayout",function(){var b=new TextareaDialog(a,"Run Layouts:",JSON.stringify(a.customLayoutConfig,null,2),function(b){if(0<b.length)try{var c=JSON.parse(b);a.executeLayoutList(c);a.customLayoutConfig=c}catch(A){a.handleError(A),console.error(A)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()});var q=this.get("layout"),
+v=q.funct;q.funct=function(b,c){v.apply(this,arguments);b.addSeparator(c);a.menus.addMenuItem(b,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var d=b.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.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="",EditorUi.logEvent({category:"SEARCH-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="")}));d.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);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.test&&(b.addSeparator(c),this.addSubmenu("testDevelop",b,c));"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),a.actions.addAction("rulerInch",mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.INCHES);a.hRuler.setUnit(mxRuler.prototype.INCHES);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),a.actions.addAction("rulerCM",
@@ -9398,15 +9451,15 @@ mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.CENTIMETER);a.hR
mxUtils.bind(this,function(){d.isSelectionEmpty()||a.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+Graph.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');")})),a.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,c=d.view.scale;d.insertVertex(d.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testCheckFile",
mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=
l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=
-b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var d=mxUtils.parseXml(b),e=a.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=a.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(G){mxLog.debug("Error: ",G.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(b=0;b<g.length;b++)c(g[b]);mxLog.show()}catch(G){a.handleError(G),console.error(G)}});b.textarea.style.width=
-"600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(F){a.handleError(F),console.error(F)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,
+b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var d=mxUtils.parseXml(b),e=a.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=a.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(b=0;b<g.length;b++)c(g[b]);mxLog.show()}catch(I){a.handleError(I),console.error(I)}});b.textarea.style.width=
+"600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(E){a.handleError(E),console.error(E)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,
!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,d.getModel())})),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,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,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var l=
e.restore;e.restore=function(){g--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);m.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)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,
function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),
"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),
c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(H){a.handleError(H,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);
this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){d.isEnabled()&&(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())})).isEnabled=e;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,k,l,m,n){a.createHtml(b,c,d,e,
+b.vertex=!0,b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=g;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,k,l,m,n){a.createHtml(b,c,d,e,
f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");
e.close();if(!f){var g=d.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,d.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];
e.body.appendChild(a);g.parentNode.removeChild(g)},20)}}else a.handleError({message:mxResources.get("errorUpdatingPreview")})});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){var b=a.getCurrentFile();null!=b&&a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(c){a.spinner.stop();null!=c?(c=new EmbedDialog(a,'<img src="'+(b.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+
@@ -9414,65 +9467,67 @@ b.getId())+'"/>'),a.showDialog(c.container,440,240,!0,!0),c.init()):a.handleErro
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,k,l){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop();m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+a.createLink(b,c,d,e,f,g,m)+'"></iframe>');
a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("microsoftOffice...",function(){a.openLink("https://office.draw.io")});
-a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)t=a.actions.addAction("scratchpad",
-function(){a.toggleScratchpad()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});t=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});t.setToggleAction(!0);t.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});
+a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)q=a.actions.addAction("scratchpad",
+function(){a.toggleScratchpad()}),q.setToggleAction(!0),q.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});q=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});q.setToggleAction(!0);q.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.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function e(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c="data:image/"==b.getData().substring(0,11)?l(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
-(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");f(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var f=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=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=
+["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c="data:image/"==b.getData().substring(0,11)?l(b.getTitle()):"text/xml";/\.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(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=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,n){f=g?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,k,l,Math.round(m*f),Math.round(n*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,k,l,0,0,
-e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(a.drive)},c):g&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(a.oneDrive)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(a.dropbox)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(a.trello)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},
-c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){f(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},
-"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=e;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)})));t=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&&a!=b.getTitle()&&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},null,null,null,null,a.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));t.isEnabled=function(){return this.enabled&&e.apply(this,arguments)};t.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,null,null,
-null,null,a.editor.fileExtensions),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();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var c=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var d=0;d<b.desc.parents.length;d++)if(b.desc.parents[d].isRoot){c=!0;break}a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,
-mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),null,!0,c)}}));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(){try{var b=a.getCurrentFile();null!=b&&a.drive.showPermissions(b.getId())}catch(B){a.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){var d=a.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||
-this.addMenuItems(b,["embedIframe"],c);"1"==urlParams.embed||a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","-","microsoftOffice"],c)})));var q=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,null,e())},A=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.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,k,l,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(A("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=e;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=e;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=e;a.actions.put("insertRhombus",
-new Action(mxResources.get("rhombus"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=e;var z=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):q(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&
-!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addMenuItems(b,["createShape","insertFreehand","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){z(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){z(b,c,
-["fromText","plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c,null,e())})));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):g&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},
-c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,
-"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
-a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):g&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.trello?
-b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):g&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},
-c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},
-c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},
-c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.editor.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));"1"==urlParams.confLib&&(b.addSeparator(c),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){a.showRemotelyStoredLibrary(mxResources.get("libraries"))},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(" "))})));
-t=a.actions.addAction("comments",mxUtils.bind(this,function(){null==this.commentsWindow?(this.commentsWindow=new CommentsWindow(a,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("comments"))):(this.commentsWindow.window.setVisible(!this.commentsWindow.window.isVisible()),
-this.commentsWindow.refreshCommentsTime())}));t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));a.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var t=this.get("viewPanels"),D=t.funct;t.funct=function(b,c){D.apply(this,arguments);a.commentsSupported()&&a.menus.addMenuItems(b,["comments"],c)};this.put("view",
-new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(a.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&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);(!a.isOffline()||
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&
-(a.actions.addAction("templates",function(){var b=new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null,!1,!0);b.init(a,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",
-lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},
-{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},
-{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),a.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c),this.addMenuItems(b,
-"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c);this.addMenuItems(b,["save","-","share"],c);var e=this.addMenuItem(b,"synchronize",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947");
-b.addSeparator(c)}else this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(b.addSeparator(c),e=this.addMenuItem(b,"synchronize",c),(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947")),
-this.addMenuItems(b,["-","save","saveAs"],c),this.addMenuItems(b,["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",
-b,c);this.addSubmenu("openLibraryFrom",b,c);a.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){f(a.gitLab)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&
+b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),
+function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=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)})));q=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&&a!=b.getTitle()&&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},null,null,null,null,a.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));q.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};q.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,null,null,null,null,a.editor.fileExtensions),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();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var c=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var d=
+0;d<b.desc.parents.length;d++)if(b.desc.parents[d].isRoot){c=!0;break}a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),null,!0,c)}}));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(){try{var b=a.getCurrentFile();null!=b&&a.drive.showPermissions(b.getId())}catch(B){a.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){var d=a.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(b,
+["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);"1"==urlParams.embed||a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","-","microsoftOffice"],c)})));var t=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,null,g())},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.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,k,l,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+d.startEditingAtCell(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=g;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),
+function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;a.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=g;var x=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):t(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",
+new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addMenuItems(b,["createShape","insertFreehand","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){x(a,
+b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){x(b,c,["fromText","plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c,null,g())})));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):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
+null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
+c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){a.pickFile(App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&
+"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":
+"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&
+"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",
+new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&
+b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.gitLab&&b.addItem(mxResources.get("gitlab")+
+"...",null,function(){a.pickLibrary(App.MODE_GITLAB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+
+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.editor.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(F){a.handleError(F,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));"1"==urlParams.confLib&&(b.addSeparator(c),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){a.showRemotelyStoredLibrary(mxResources.get("libraries"))},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(" "))})));q=a.actions.addAction("comments",mxUtils.bind(this,function(){null==this.commentsWindow?(this.commentsWindow=new CommentsWindow(a,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("comments"))}),
+this.commentsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("comments"))):(this.commentsWindow.window.setVisible(!this.commentsWindow.window.isVisible()),this.commentsWindow.refreshCommentsTime())}));q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));a.editor.addListener("fileLoaded",mxUtils.bind(this,
+function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var q=this.get("viewPanels"),C=q.funct;q.funct=function(b,c){C.apply(this,arguments);a.commentsSupported()&&a.menus.addMenuItems(b,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(a.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||
+mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&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);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,
+["-","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&(a.actions.addAction("templates",function(){var b=new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null,!1,!0);b.init(a,function(a){console.log(a)},null,null,null,"user",function(a,
+b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},
+{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},
+{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",
+b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),a.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c),this.addMenuItems(b,"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==
+DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c);this.addMenuItems(b,["save","-","share"],c);var e=this.addMenuItem(b,"synchronize",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947");b.addSeparator(c)}else this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,
+["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(b.addSeparator(c),e=this.addMenuItem(b,"synchronize",c),(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(b,["-","save","saveAs"],c),this.addMenuItems(b,["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(b,
+["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);a.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,["-","pageSetup"],
+c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,b){this.ui=a;this.page=c;this.previous=this.name=b}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,c,b){this.ui=a;this.oldIndex=c;this.newIndex=b}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,c,b){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=b&&(c.viewState=b,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,b=c.graph,d=Graph.compressNode(c.getGraphXml(!0));mxUtils.setTextContent(a.node,d);a.viewState=b.getViewState();a.root=b.model.root;null!=a.model&&a.model.rootChanged(a.root);b.view.clear(a.root,!0);b.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;b.model.prefix=Editor.guid()+"-";b.model.rootChanged(a.root);
b.setViewState(a.viewState);b.gridEnabled=b.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);c.updateGraphComponents();b.view.validate();b.blockMathRender=!0;b.sizeDidChange();b.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,b.selectUnlockedLayer());c.graph.fireEvent(new mxEventObject(mxEvent.ROOT));c.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,c,b,d,e){SelectPage.call(this,a,b);this.relatedPage=c;this.index=d;this.previousIndex=null;this.noSelect=e}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(a,c,b,d,g){SelectPage.call(this,a,b);this.relatedPage=c;this.index=d;this.previousIndex=null;this.noSelect=g}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;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;
EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var c=0;c<this.pages.length;c++)if(this.pages[c]==this.currentPage){a=c;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var c=0;c<this.pages.length;c++)if(this.pages[c].getId()==a)return this.pages[c];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,c=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
@@ -9480,8 +9535,8 @@ null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.page
(a.container.scrollLeft=a.view.translate.x*a.view.scale+c.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+c.viewState.scrollTop),b=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||
null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,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)};
EditorUi.prototype.restoreViewState=function(a,c,b){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,c):(d.setViewState(c),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+c.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+c.scrollTop,d.restoreSelection(b))};
-Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),b=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!=c?"0"!=c:this.defaultPageVisible,background:null!=g&&0<g.length?g:null,backgroundImage:null!=k?new mxImage(k.src,k.width,k.height):null,pageScale:isNaN(b)?mxGraph.prototype.pageScale:b,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"),
+Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),b=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),g=parseFloat(a.getAttribute("pageHeight")),e=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!=c?"0"!=c:this.defaultPageVisible,background:null!=e&&0<e.length?e:null,backgroundImage:null!=k?new mxImage(k.src,k.width,k.height):null,pageScale:isNaN(b)?mxGraph.prototype.pageScale:b,pageFormat:isNaN(d)||isNaN(g)?mxSettings.getPageFormat():new mxRectangle(0,0,d,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,c,b){b||(c.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),c.setAttribute("connect",null==a||a.connect?"1":"0"),c.setAttribute("arrows",null==a||a.arrows?"1":"0"),c.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),c.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);b=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=b&&(c.setAttribute("pageWidth",b.width),c.setAttribute("pageHeight",b.height));null!=a&&null!=a.background&&c.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));c.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");c.setAttribute("shadow",
@@ -9493,17 +9548,17 @@ a.pageFormat,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultPar
(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=
0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",a))};
EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var c=this.editor.extractGraphModel(a.node);if(null!=c){a.graphModelNode=c;a.viewState=this.editor.graph.createViewState(c);var b=new mxCodec(c.ownerDocument);a.root=b.decode(c).root}else a.root=this.editor.graph.model.createRoot()}else null==a.viewState&&(null==a.graphModelNode&&(c=this.editor.extractGraphModel(a.node),null!=c&&(a.graphModelNode=c)),null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode)));
-return a};EditorUi.prototype.selectPage=function(a,c,b){try{this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var e=new SelectPage(this,a,b);e.execute();d.add(e);d.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}catch(g){this.handleError(g)}};
+return a};EditorUi.prototype.selectPage=function(a,c,b){try{this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var g=new SelectPage(this,a,b);g.execute();d.add(g);d.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}catch(e){this.handleError(e)}};
EditorUi.prototype.selectNextPage=function(a){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),a?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());c=null!=c?c:this.pages.length;var b=new ChangePage(this,a,a,c);this.editor.graph.model.execute(b)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,c){var b=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),c);b.setName(null!=a?a:this.createPageName());return b};EditorUi.prototype.createPageName=function(){for(var a={},c=0;c<this.pages.length;c++){var b=this.pages[c].getName();null!=b&&0<b.length&&(a[b]=b)}c=this.pages.length;do b=mxResources.get("pageWithNumber",[++c]);while(null!=a[b]);return b};
-EditorUi.prototype.removePage=function(a){try{var c=this.editor.graph,b=mxUtils.indexOf(this.pages,a);if(c.isEnabled()&&0<=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(b==this.pages.length-1?b--:b++,d=this.pages[b]):1>=this.pages.length&&(d=this.insertPage(),c.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,a,d))}finally{c.model.endUpdate()}}}catch(e){this.handleError(e)}return a};
-EditorUi.prototype.duplicatePage=function(a,c){var b=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var e=a.node.cloneNode(!1);e.removeAttribute("id");b=new DiagramPage(e);b.root=d.cloneCell(d.model.root);b.viewState=d.getViewState();b.viewState.scale=1;b.viewState.scrollLeft=null;b.viewState.scrollTop=null;b.viewState.currentRoot=null;b.viewState.defaultParent=null;b.setName(c);b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1)}}catch(g){this.handleError(g)}return b};
+EditorUi.prototype.removePage=function(a){try{var c=this.editor.graph,b=mxUtils.indexOf(this.pages,a);if(c.isEnabled()&&0<=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(b==this.pages.length-1?b--:b++,d=this.pages[b]):1>=this.pages.length&&(d=this.insertPage(),c.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,a,d))}finally{c.model.endUpdate()}}}catch(g){this.handleError(g)}return a};
+EditorUi.prototype.duplicatePage=function(a,c){var b=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var g=a.node.cloneNode(!1);g.removeAttribute("id");b=new DiagramPage(g);b.root=d.cloneCell(d.model.root);b.viewState=d.getViewState();b.viewState.scale=1;b.viewState.scrollLeft=null;b.viewState.scrollTop=null;b.viewState.currentRoot=null;b.viewState.defaultParent=null;b.setName(c);b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1)}}catch(e){this.handleError(e)}return b};
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return a};EditorUi.prototype.movePage=function(a,c){this.editor.graph.model.execute(new MovePage(this,a,c))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var b=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-b)/this.pages.length)+1),e=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),e=b):mxEvent.consume(c)}));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&&b!=e&&this.movePage(e,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(g,this.createTabForPage(this.pages[g],d,this.pages[g]!=this.currentPage,g+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);d=this.createPageMenuTab();
+b)/this.pages.length)+1),g=null,e=0;e<this.pages.length;e++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){g=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));c.appendChild(d)})(e,this.createTabForPage(this.pages[e],d,this.pages[e]!=this.currentPage,e+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);d=this.createPageMenuTab();
this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=d&&(d.style.position="absolute",d.style.right="0px",c.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 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));c.style.width=n+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(m,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,0<c.scrollLeft?100:
50);mxUtils.setOpacity(m,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(k,0<c.scrollLeft?100:50);mxUtils.setOpacity(m,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -9513,49 +9568,49 @@ EditorUi.prototype.createControlTab=function(a,c){var b=this.createTab(!0);b.sty
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=
0;c<this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var d=this.currentPage;null!=d&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
function(){this.removePage(d)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var c=
-mxEvent.getClientX(a),e=mxEvent.getClientY(a);b.popup(c,e,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,c,b,d){b=this.createTab(b);var e=a.getName()||mxResources.get("untitled"),g=a.getId();b.setAttribute("title",e+(null!=g?" ("+g+")":"")+" ["+d+"]");mxUtils.write(b,e);b.style.maxWidth=c+"px";b.style.width=c+"px";this.addTabListeners(a,b);42<c&&(b.style.textOverflow="ellipsis");return b};
-EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var b=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,e=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){d=null!=this.currentMenu;e=a==this.currentPage;b.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(g){if(b.isEnabled()&&!b.isMouseDown&&(mxEvent.isTouchEvent(g)&&e||mxEvent.isPopupTrigger(g))){b.popupMenuHandler.hideMenu();
-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 m=mxEvent.getClientX(g),n=mxEvent.getClientY(g);k.popup(m,n,null,g);this.setCurrentMenu(k,c)}mxEvent.consume(g)}}))};
+mxEvent.getClientX(a),g=mxEvent.getClientY(a);b.popup(c,g,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
+EditorUi.prototype.createTabForPage=function(a,c,b,d){b=this.createTab(b);var g=a.getName()||mxResources.get("untitled"),e=a.getId();b.setAttribute("title",g+(null!=e?" ("+e+")":"")+" ["+d+"]");mxUtils.write(b,g);b.style.maxWidth=c+"px";b.style.width=c+"px";this.addTabListeners(a,b);42<c&&(b.style.textOverflow="ellipsis");return b};
+EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var b=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){d=null!=this.currentMenu;g=a==this.currentPage;b.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(e){if(b.isEnabled()&&!b.isMouseDown&&(mxEvent.isTouchEvent(e)&&g||mxEvent.isPopupTrigger(e))){b.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!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 m=mxEvent.getClientX(e),n=mxEvent.getClientY(e);k.popup(m,n,null,e);this.setCurrentMenu(k,c)}mxEvent.consume(e)}}))};
EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(b,d){b.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);b.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);b.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),d);b.addSeparator(d);b.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(c){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,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,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,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(" ")),c="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,b){return 0>mxUtils.indexOf(c,
-a)?b:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,e));return e};a.beforeDecode=function(a,c,e){e.ui=a.ui;e.relatedPage=e.ui.getPageById(c.getAttribute("relatedPage"));if(null==e.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));e.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(e.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(e.relatedPage.root=a.decodeCell(b,!1),e=b.nextSibling,b.parentNode.removeChild(b),b=e;null!=b;){e=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var d=b.getAttribute("id");null==a.lookup(d)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=e}}return c};a.afterDecode=function(a,c,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]=
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,g){g.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(g.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
+a)?b:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,g));return g};a.beforeDecode=function(a,c,g){g.ui=a.ui;g.relatedPage=g.ui.getPageById(c.getAttribute("relatedPage"));if(null==g.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));g.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(g.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
+c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(g.relatedPage.root=a.decodeCell(b,!1),g=b.nextSibling,b.parentNode.removeChild(b),b=g;null!=b;){g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var d=b.getAttribute("id");null==a.lookup(d)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=g}}return c};a.afterDecode=function(a,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,m,n){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),u=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(u,"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=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return A.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=q.view.getState(a),b="1"==(null!=b?b.style:q.getCellStyle(a)).treeMoving);
-return b}function d(a){var b=!1;null!=a&&(a=A.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function m(a){var b=!1;null!=a&&(a=A.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function n(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 t(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=n(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 k=q.view.getState(a),l=q.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=q.getOutgoingEdges(q.model.getTerminal(d[0],
-!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var x=q.model.getTerminal(p[u],!1);if(f==n(x)){var v=q.view.getState(x);x!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,v)&&(d=10+Math.max(d,(Math.min(m.x+m.width,v.x+v.width)-Math.max(m.x,v.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,v.y+v.height)-Math.max(m.y,v.y))/l))}}t?g=0:d=0;for(u=0;u<p.length;u++)if(x=q.model.getTerminal(p[u],
-!1),f==n(x)&&(v=q.view.getState(x),x!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY()))){var A=[];q.traverse(v.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=n(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 k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);q.moveCells(g,k,l);return q.addCells(d,e)}finally{q.model.endUpdate()}}function l(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 k=q.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=q.view.getBounds(f),m=n(a),p=q.view.translate,t=q.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
-e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.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+(d[1].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)/t-p.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function p(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=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.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=p(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 v=this,q=v.editor.graph,A=q.getModel(),z=v.menus.createPopupMenu;
-v.menus.createPopupMenu=function(a,c,d){z.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))}};v.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");v.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");v.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");v.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 D=q.removeCells;q.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];A.isEdge(g)&&d(g)&&(e.push(g),g=A.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 D.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,
-d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var y=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 k=y.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(a[e]);
-if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var B=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||q.model.isEdge(a[t])&&null==q.model.getTerminal(a[t],!0)){f=q.model.getParent(a[t]);
-break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=q.getIncomingEdges(a[0]);if(0<u.length){var x=q.view.getState(q.model.getTerminal(u[0],!0));if(null!=x){var v=q.view.getState(m);null!=v&&(c=(v.getCenterX()-x.getCenterX())/q.view.scale,d=(v.getCenterY()-x.getCenterY())/q.view.scale)}}}}l=B.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],
-m,!0);else if(b(a[t])&&(u=q.getIncomingEdges(a[t]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==q.getIncomingEdges(l[t]).length){n=m;if(null==n||n==q.model.getParent(a[t]))n=q.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,q.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var F=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;
-f.beginUpdate();try{if(g=F.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 l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var x={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},I=v.onKeyDown;v.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()):l(q.getSelectionCell()):13==a.which&&(c=t(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!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),
-mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=x[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(R){console.log("error",
-R)}mxEvent.isConsumed(a)||I.apply(this,arguments)};var H=q.connectVertex;q.connectVertex=function(a,c,d,e,g,k){var m=q.getIncomingEdges(a);return b(a)&&0<m.length?(d=n(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):e==g?f(a):t(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,d,e,g,k)};q.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||m(a)||q.traverse(a,!0,function(a,b){null!=
-b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);(c(this.state.cell)||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.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return z.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=t.view.getState(a),b="1"==(null!=b?b.style:t.getCellStyle(a)).treeMoving);
+return b}function d(a){var b=!1;null!=a&&(a=z.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function m(a){var b=!1;null!=a&&(a=z.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function n(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
+a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function q(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=n(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;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=t.view.getState(a),l=t.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=t.getOutgoingEdges(t.model.getTerminal(d[0],
+!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var x=t.model.getTerminal(p[u],!1);if(f==n(x)){var v=t.view.getState(x);x!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,v)&&(d=10+Math.max(d,(Math.min(m.x+m.width,v.x+v.width)-Math.max(m.x,v.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,v.y+v.height)-Math.max(m.y,v.y))/l))}}q?g=0:d=0;for(u=0;u<p.length;u++)if(x=t.model.getTerminal(p[u],
+!1),f==n(x)&&(v=t.view.getState(x),x!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY()))){var y=[];t.traverse(v.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});t.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b=n(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);
+var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);t.moveCells(g,k,l);return t.addCells(d,e)}finally{t.model.endUpdate()}}function l(a){t.model.beginUpdate();try{var b=
+t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=t.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=t.view.getBounds(f),m=n(a),p=t.view.translate,q=t.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
+e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.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+(d[1].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)/q-p.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function p(a,
+b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(t.model.getTerminal(c[0],!0),d,a),c=t.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&&t.setSelectionCell(d[c].cell)))))}var v=this,t=v.editor.graph,z=t.getModel(),x=v.menus.createPopupMenu;
+v.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&&(a.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&
+1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],
+!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},
+null,null,"Alt+Shift+D");var C=t.removeCells;t.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];z.isEdge(g)&&d(g)&&(e.push(g),g=z.getTerminal(g,!1));b(g)?(t.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return C.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,
+d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var y=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=y.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(a[e]);
+if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var B=t.moveCells;t.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.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])||t.model.isEdge(a[q])&&null==t.model.getTerminal(a[q],!0)){f=t.model.getParent(a[q]);
+break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=t.getIncomingEdges(a[0]);if(0<u.length){var x=t.view.getState(t.model.getTerminal(u[0],!0));if(null!=x){var v=t.view.getState(m);null!=v&&(c=(v.getCenterX()-x.getCenterX())/t.view.scale,d=(v.getCenterY()-x.getCenterY())/t.view.scale)}}}}l=B.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],
+m,!0);else if(b(a[q])&&(u=t.getIncomingEdges(a[q]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==t.getIncomingEdges(l[q]).length){n=m;if(null==n||n==t.model.getParent(a[q]))n=t.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,t.getDefaultParent(),n,l[q])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var E=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,g=null;
+f.beginUpdate();try{if(g=E.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 l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var A={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&&
+b(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(t.getSelectionCell()):l(t.getSelectionCell()):13==a.which&&(c=q(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),
+mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=A[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(R){console.log("error",
+R)}mxEvent.isConsumed(a)||G.apply(this,arguments)};var H=t.connectVertex;t.connectVertex=function(a,c,d,e,g,k){var m=t.getIncomingEdges(a);return b(a)&&0<m.length?(d=n(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):e==g?f(a):q(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,d,e,g,k)};t.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||m(a)||t.traverse(a,!0,function(a,b){null!=
+b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(c(this.state.cell)||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 J=mxVertexHandler.prototype.destroy;
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.destroy;
mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=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;treeMoving=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;treeMoving=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 p=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;treeMoving=1;");p.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);p.insertEdge(u,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);v.insertEdge(q,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(t);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=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;treeMoving=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;treeMoving=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=
@@ -9565,23 +9620,23 @@ a.insert(f);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geome
new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=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;treeMoving=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;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,
-"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new e(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
-a.formatWindow.window.fit()}function c(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new e(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;cusor:pointer;";
+"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new g(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
+a.formatWindow.window.fit()}function c(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new g(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;cusor:pointer;";
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";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var 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.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(q){}var e=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(t){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
-"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!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=this.tabContainerHeight+"px");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 m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
+"#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 e=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=
+function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");e.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 m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
c.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="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
-"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var t=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){t.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
+"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+
" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),
b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",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.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";b.style.cursor="pointer";mxEvent.addListener(b,
@@ -9617,25 +9672,26 @@ null,640<=b?d("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)"
null],60)}c=k.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=b?(null==K&&(f=p.addMenu("",c.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",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.right="8px",f.style.cursor=
"pointer",f.style.top="1"==urlParams.embed?"13px":"11px",m.appendChild(f),K=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=K&&(K.parentNode.removeChild(K),K=null))}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
null==urlParams.libs||c(this);var k=this,l=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(k,m);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
-k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var t=k.descriptorChanged;k.descriptorChanged=function(){t.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
-"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};k.setStatusText(k.editor.getStatus());m.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;k.tabContainer=document.createElement("div");
-k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var J=k.menus.get("viewZoom");if(null!=J){this.tabContainer.style.right=
-"70px";var C=p.addMenu("100%",J.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.cursor="pointer";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(k.tabContainerHeight)-1+"px";C.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(C);J=mxUtils.bind(this,function(){C.innerHTML=Math.round(100*k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,
-J);k.editor.addListener("resetGraphView",J);k.editor.addListener("pageSelected",J);var L=k.setGraphEnabled;k.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);g.appendChild(u);k.updateTabContainer();var K=null;f();mxEvent.addListener(window,
-"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,g,k){var d=c.y,e=c.x,t=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+e;p.y=b.y+d;p.width=b.width;p.height=b.height;for(var q=[],A=[],z=0;z<this.states.length;z++){var D=this.states[z];D instanceof mxCellState&&(k||!this.graph.isCellSelected(D.cell))&&((p.x>=D.x&&p.x<=D.x+D.width||D.x>=p.x&&D.x<=p.x+p.width)&&(p.y>
-D.y+D.height+4||p.y+p.height+4<D.y)?q.push(D):(p.y>=D.y&&p.y<=D.y+D.height||D.y>=p.y&&D.y<=p.y+p.height)&&(p.x>D.x+D.width+4||p.x+p.width+4<D.x)&&A.push(D))}var y=0,B=0,F=D=0,x=0,I=0,H=0,E=0,G=5*u;if(1<q.length){q.push(p);q.sort(function(a,b){return a.y-b.y});var J=!1,z=p==q[0],u=p==q[q.length-1];if(!z&&!u)for(z=1;z<q.length-1;z++)if(p==q[z]){u=q[z-1];z=q[z+1];D=B=F=(z.y-u.y-u.height-p.height)/2;break}for(z=0;z<q.length-1;z++){var u=q[z],C=q[z+1],L=p==u||p==C,C=C.y-u.y-u.height,J=J|p==u;if(0==B&&
-0==y)B=C,y=1;else if(Math.abs(B-C)<=(L||1==z&&J?v:0))y+=1;else if(1<y&&J){q=q.slice(0,z+1);break}else if(3<=q.length-z&&!J)y=0,D=B=0!=F?F:0,q.splice(0,0==z?1:z),z=-1;else break;0!=D||L||(B=D=C)}3==q.length&&q[1]==p&&(D=0)}if(1<A.length){A.push(p);A.sort(function(a,b){return a.x-b.x});J=!1;z=p==A[0];u=p==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(p==A[z]){u=A[z-1];z=A[z+1];H=I=E=(z.x-u.x-u.width-p.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];C=A[z+1];L=p==u||p==C;C=C.x-u.x-u.width;J|=p==
-u;if(0==I&&0==x)I=C,x=1;else if(Math.abs(I-C)<=(L||1==z&&J?v:0))x+=1;else if(1<x&&J){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!J)x=0,H=I=0!=E?E:0,A.splice(0,0==z?1:z),z=-1;else break;0!=H||L||(I=H=C)}3==A.length&&A[1]==p&&(H=0)}v=function(a,b,c,d){var e=[],f;d?(d=G,f=0):(d=0,f=G);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(l.graph.getView().getOverlayPane());return a};I=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<x&&x==A.length-1){x=[];E=l.guidesArrHor;t=[];e=0;z=A[0]==p?1:0;J=A[z].y+A[z].height;if(0<H)for(z=0;z<A.length-1;z++)u=
-A[z],C=A[z+1],p==u?(e=C.x-u.width-H,t.push(new mxPoint(e+u.width+G,J)),t.push(new mxPoint(C.x-G,J))):p==C?(t.push(new mxPoint(u.x+u.width+G,J)),e=u.x+u.width+H,t.push(new mxPoint(e-G,J))):(t.push(new mxPoint(u.x+u.width+G,J)),t.push(new mxPoint(C.x-G,J)));else u=A[0],z=A[2],e=u.x+u.width+(z.x-u.x-u.width-p.width)/2,t.push(new mxPoint(u.x+u.width+G,J)),t.push(new mxPoint(e-G,J)),t.push(new mxPoint(e+p.width+G,J)),t.push(new mxPoint(z.x-G,J));for(z=0;z<t.length;z+=2)A=t[z],H=t[z+1],A=v(A,H,null!=E?
-E[z/2]:null),A.node.style.visibility="visible",A.redraw(),x.push(A);for(z=t.length/2;null!=E&&z<E.length;z++)E[z].destroy();l.guidesArrHor=x;e-=b.x;t=!0}else I(!0);if(1<y&&y==q.length-1){x=[];E=l.guidesArrVer;f=[];d=0;z=q[0]==p?1:0;y=q[z].x+q[z].width;if(0<D)for(z=0;z<q.length-1;z++)u=q[z],C=q[z+1],p==u?(d=C.y-u.height-D,f.push(new mxPoint(y,d+u.height+G)),f.push(new mxPoint(y,C.y-G))):p==C?(f.push(new mxPoint(y,u.y+u.height+G)),d=u.y+u.height+D,f.push(new mxPoint(y,d-G))):(f.push(new mxPoint(y,u.y+
-u.height+G)),f.push(new mxPoint(y,C.y-G)));else u=q[0],z=q[2],d=u.y+u.height+(z.y-u.y-u.height-p.height)/2,f.push(new mxPoint(y,u.y+u.height+G)),f.push(new mxPoint(y,d-G)),f.push(new mxPoint(y,d+p.height+G)),f.push(new mxPoint(y,z.y-G));for(z=0;z<f.length;z+=2)A=f[z],H=f[z+1],A=v(A,H,null!=E?E[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),x.push(A);for(z=f.length/2;null!=E&&z<E.length;z++)E[z].destroy();l.guidesArrVer=x;d-=b.y;f=!0}else I(!1,!0)}if(t||f)return p=new mxPoint(e,d),q=a.call(this,
-b,p,g,k),t&&!f?p.y=q.y:f&&!t&&(p.x=q.x),q.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),q.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;I(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
-d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var g=0;g<a.length;g++)a[g].destroy();this.guidesArrVer=null}if(null!=c){for(g=0;g<c.length;g++)c[g].destroy();this.guidesArrHor=null}}})();function mxFreehand(a){if(null!=a.container&&null!=a.container.querySelector("svg")){var c=a.container.querySelector("svg"),b=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,e,g,k,m=!1,n=[],t=!1;this.setClosedPath=function(a){m=a};this.setSmoothing=function(a){b=a};var f=function(b){t=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b)};this.setEnabled=f;var l=function(b){if(d){g.push.apply(g,k);for(var c=g[0].x,e=g[0].x,l=g[0].y,n=g[0].y,p=1;p<g.length;p++)c=
-Math.max(c,g[p].x),e=Math.min(e,g[p].x),l=Math.max(l,g[p].y),n=Math.min(n,g[p].y);c-=e;l-=n;if(0<c&&0<l){var q=100/c,t=100/l;g.map(function(a){a.x=(a.x-e)*q;a.y=(a.y-n)*t;return a});m&&g.push(g[0]);for(var u='<shape strokewidth="inherit"><foreground><path><move x="'+g[0].x.toFixed(2)+'" y="'+g[0].y.toFixed(2)+'"/>',p=1;p<g.length;p++)var v=g[p],u=u+('<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>');var u=u+("</path>"+(m?"<fillstroke/>":"<stroke/>")+"</foreground></shape>"),p=mxConstants.STYLE_SHAPE+
-"=stencil("+Graph.compress(u)+")",u=a.view.scale,v=a.view.translate,E=new mxCell("",new mxGeometry(e/u-v.x,n/u-v.y,c/u,l/u),p);E.vertex=1;a.model.beginUpdate();try{E=a.addCell(E)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[E]));a.fireEvent(new mxEventObject("freehandInserted","cell",E));setTimeout(function(){a.setSelectionCells([E])},10)}d.parentNode.removeChild(d);d=null;f(!1);mxEvent.consume(b)}};mxEvent.addGestureListeners(c,function(b){if(t){var f=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||
-1),f=Math.max(1,f*a.view.scale);l();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill","none");d.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");d.setAttribute("stroke-width",f);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var m=a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(a){return parseFloat(a)*f}).join(" ");d.setAttribute("stroke-dasharray",m)}n=[];m=p(b);u(m);e="M"+m.x+" "+
-m.y;g=[m];k=[];d.setAttribute("d",e);c.appendChild(d);mxEvent.consume(b)}},function(a){if(d){u(p(a));var b=v(0);if(b){e+=" L"+b.x+" "+b.y;g.push(b);var c="";k=[];for(var f=2;f<n.length;f+=2)b=v(f),c+=" L"+b.x+" "+b.y,k.push(b);d.setAttribute("d",e+c)}mxEvent.consume(a)}},l);var p=function(b){return mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b))},u=function(a){for(n.push(a);n.length>b;)n.shift()},v=function(a){var c=n.length;if(1===c%2||c>=b){var d=0,e=0,f,g=0;for(f=
-a;f<c;f++)g++,a=n[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
+k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var q=k.descriptorChanged;k.descriptorChanged=function(){q.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};k.setStatusText(k.editor.getStatus());m.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
+k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var J=k.menus.get("viewZoom");
+if(null!=J){this.tabContainer.style.right="70px";var D=p.addMenu("100%",J.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.cursor="pointer";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";D.style.height=parseInt(k.tabContainerHeight)-1+"px";D.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(D);J=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*
+k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,J);k.editor.addListener("resetGraphView",J);k.editor.addListener("pageSelected",J);var L=k.setGraphEnabled;k.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);
+g.appendChild(u);k.updateTabContainer();var K=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,k){var d=c.y,g=c.x,q=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+d;p.width=b.width;p.height=b.height;for(var t=[],z=[],x=0;x<this.states.length;x++){var C=this.states[x];C instanceof mxCellState&&(k||!this.graph.isCellSelected(C.cell))&&((p.x>=C.x&&p.x<=C.x+C.width||C.x>=p.x&&C.x<=p.x+p.width)&&(p.y>
+C.y+C.height+4||p.y+p.height+4<C.y)?t.push(C):(p.y>=C.y&&p.y<=C.y+C.height||C.y>=p.y&&C.y<=p.y+p.height)&&(p.x>C.x+C.width+4||p.x+p.width+4<C.x)&&z.push(C))}var y=0,B=0,E=C=0,A=0,G=0,H=0,F=0,I=5*u;if(1<t.length){t.push(p);t.sort(function(a,b){return a.y-b.y});var J=!1,x=p==t[0],u=p==t[t.length-1];if(!x&&!u)for(x=1;x<t.length-1;x++)if(p==t[x]){u=t[x-1];x=t[x+1];C=B=E=(x.y-u.y-u.height-p.height)/2;break}for(x=0;x<t.length-1;x++){var u=t[x],D=t[x+1],L=p==u||p==D,D=D.y-u.y-u.height,J=J|p==u;if(0==B&&
+0==y)B=D,y=1;else if(Math.abs(B-D)<=(L||1==x&&J?v:0))y+=1;else if(1<y&&J){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!J)y=0,C=B=0!=E?E:0,t.splice(0,0==x?1:x),x=-1;else break;0!=C||L||(B=C=D)}3==t.length&&t[1]==p&&(C=0)}if(1<z.length){z.push(p);z.sort(function(a,b){return a.x-b.x});J=!1;x=p==z[0];u=p==z[z.length-1];if(!x&&!u)for(x=1;x<z.length-1;x++)if(p==z[x]){u=z[x-1];x=z[x+1];H=G=F=(x.x-u.x-u.width-p.width)/2;break}for(x=0;x<z.length-1;x++){u=z[x];D=z[x+1];L=p==u||p==D;D=D.x-u.x-u.width;J|=p==
+u;if(0==G&&0==A)G=D,A=1;else if(Math.abs(G-D)<=(L||1==x&&J?v:0))A+=1;else if(1<A&&J){z=z.slice(0,x+1);break}else if(3<=z.length-x&&!J)A=0,H=G=0!=F?F:0,z.splice(0,0==x?1:x),x=-1;else break;0!=H||L||(G=H=D)}3==z.length&&z[1]==p&&(H=0)}v=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(l.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<A&&A==z.length-1){A=[];F=l.guidesArrHor;q=[];g=0;x=z[0]==p?1:0;J=z[x].y+z[x].height;if(0<H)for(x=0;x<z.length-1;x++)u=
+z[x],D=z[x+1],p==u?(g=D.x-u.width-H,q.push(new mxPoint(g+u.width+I,J)),q.push(new mxPoint(D.x-I,J))):p==D?(q.push(new mxPoint(u.x+u.width+I,J)),g=u.x+u.width+H,q.push(new mxPoint(g-I,J))):(q.push(new mxPoint(u.x+u.width+I,J)),q.push(new mxPoint(D.x-I,J)));else u=z[0],x=z[2],g=u.x+u.width+(x.x-u.x-u.width-p.width)/2,q.push(new mxPoint(u.x+u.width+I,J)),q.push(new mxPoint(g-I,J)),q.push(new mxPoint(g+p.width+I,J)),q.push(new mxPoint(x.x-I,J));for(x=0;x<q.length;x+=2)z=q[x],H=q[x+1],z=v(z,H,null!=F?
+F[x/2]:null),z.node.style.visibility="visible",z.redraw(),A.push(z);for(x=q.length/2;null!=F&&x<F.length;x++)F[x].destroy();l.guidesArrHor=A;g-=b.x;q=!0}else G(!0);if(1<y&&y==t.length-1){A=[];F=l.guidesArrVer;f=[];d=0;x=t[0]==p?1:0;y=t[x].x+t[x].width;if(0<C)for(x=0;x<t.length-1;x++)u=t[x],D=t[x+1],p==u?(d=D.y-u.height-C,f.push(new mxPoint(y,d+u.height+I)),f.push(new mxPoint(y,D.y-I))):p==D?(f.push(new mxPoint(y,u.y+u.height+I)),d=u.y+u.height+C,f.push(new mxPoint(y,d-I))):(f.push(new mxPoint(y,u.y+
+u.height+I)),f.push(new mxPoint(y,D.y-I)));else u=t[0],x=t[2],d=u.y+u.height+(x.y-u.y-u.height-p.height)/2,f.push(new mxPoint(y,u.y+u.height+I)),f.push(new mxPoint(y,d-I)),f.push(new mxPoint(y,d+p.height+I)),f.push(new mxPoint(y,x.y-I));for(x=0;x<f.length;x+=2)z=f[x],H=f[x+1],z=v(z,H,null!=F?F[x/2]:null,!0),z.node.style.visibility="visible",z.redraw(),A.push(z);for(x=f.length/2;null!=F&&x<F.length;x++)F[x].destroy();l.guidesArrVer=A;d-=b.y;f=!0}else G(!1,!0)}if(q||f)return p=new mxPoint(g,d),t=a.call(this,
+b,p,e,k),q&&!f?p.y=t.y:f&&!q&&(p.x=t.x),t.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;G(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
+d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var e=0;e<a.length;e++)a[e].destroy();this.guidesArrVer=null}if(null!=c){for(e=0;e<c.length;e++)c[e].destroy();this.guidesArrHor=null}}})();function mxFreehand(a){if(null!=a.container&&null!=a.container.querySelector("svg")){var c=a.container.querySelector("svg"),b=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,g=[],e,k=[],m,n=!1,q=!0,f=[],l=!1;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){q=a};this.setSmoothing=function(a){b=a};var p=function(b){l=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};
+this.startDrawing=function(){p(!0)};this.isDrawing=function(){return l};var u=mxUtils.bind(this,function(a){if(d){var b=0<k.length&&null!=m&&2>m.length;b||k.push.apply(k,m);m=[];k.push(null);g.push(d);d=null;b&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var b=k[0].x,c=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(b=Math.max(b,k[l].x),c=Math.min(c,k[l].x),e=Math.max(e,k[l].y),f=Math.min(f,k[l].y));b-=c;e-=f;if(0<b&&0<e){var m=100/b,t=100/e;k.map(function(a){if(null==
+a)return a;a.x=(a.x-c)*m;a.y=(a.y-f)*t;return a});for(var u='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var z=k[l];if(null==z){var z=!1,v=k[v],J=k[l-1];!n&&q&&(z=v.x-J.x,J=v.y-J.y,z=Math.sqrt(z*z+J*J)<=a.tolerance);if(n||z)u+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';u+="</path>"+(n||z?"<fillstroke/>":"<stroke/>");v=l+1}else u=l==v?u+('<path><move x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>'):u+('<line x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>')}var l=
+mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(u+"</foreground></shape>")+");fillColor=none;",u=a.view.scale,v=a.view.translate,D=new mxCell("",new mxGeometry(c/u-v.x,f/u-v.y,b/u,e/u),l);D.vertex=1;a.model.beginUpdate();try{D=a.addCell(D)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[D]));a.fireEvent(new mxEventObject("freehandInserted","cell",D));setTimeout(function(){a.setSelectionCells([D])},10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);d=
+null;g=[];k=[]}p(!1)};mxEvent.addGestureListeners(c,function(b){if(l){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill","none");d.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");d.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var n=a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
+n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");d.setAttribute("stroke-dasharray",n)}f=[];n=v(b);t(n);e="M"+n.x+" "+n.y;k.push(n);m=[];d.setAttribute("d",e);c.appendChild(d);mxEvent.consume(b)}},function(a){if(d){t(v(a));var b=z(0);if(b){e+=" L"+b.x+" "+b.y;k.push(b);var c="";m=[];for(var g=2;g<f.length;g+=2)b=z(g),c+=" L"+b.x+" "+b.y,m.push(b);d.setAttribute("d",e+c)}mxEvent.consume(a)}},u);var v=function(b){return mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b))},
+t=function(a){for(f.push(a);f.length>b;)f.shift()},z=function(a){var c=f.length;if(1===c%2||c>=b){var d=0,e=0,g,k=0;for(g=a;g<c;g++)k++,a=f[g],d+=a.x,e+=a.y;return{x:d/k,y:e/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index ad20ce26..8959b1e3 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -174,47 +174,52 @@ App = function(editor, container, lightbox)
};
/**
- * Executes the first step for connecting to Google Drive.
+ * Timeout error
*/
App.ERROR_TIMEOUT = 'timeout';
/**
- * Executes the first step for connecting to Google Drive.
+ * Busy error
*/
App.ERROR_BUSY = 'busy';
/**
- * Executes the first step for connecting to Google Drive.
+ * Unknown error
*/
App.ERROR_UNKNOWN = 'unknown';
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * Google drive mode
*/
App.MODE_GOOGLE = 'google';
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * Dropbox mode
*/
App.MODE_DROPBOX = 'dropbox';
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * OneDrive Mode
*/
App.MODE_ONEDRIVE = 'onedrive';
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * Github Mode
*/
App.MODE_GITHUB = 'github';
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * Gitlab mode
+ */
+App.MODE_GITLAB = 'gitlab';
+
+/**
+ * Device Mode
*/
App.MODE_DEVICE = 'device';
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * Browser Mode
*/
App.MODE_BROWSER = 'browser';
@@ -281,6 +286,11 @@ App.PUSHER_URL = 'https://js.pusher.com/4.3/pusher.min.js';
App.GOOGLE_APIS = 'client,drive-share';
/**
+ * Google Realtime API export endpoint end of life on 09/27/2019.
+ */
+App.GOOGLE_REALTIME_EOL = 1569535200000;
+
+/**
* Function: authorize
*
* Authorizes the client, gets the userId and calls <open>.
@@ -1082,6 +1092,23 @@ App.prototype.init = function()
}))
}
+ /**
+ * Creates gitlab client.
+ */
+ this.gitLab = (!mxClient.IS_IE || document.documentMode == 10 ||
+ mxClient.IS_IE11 || mxClient.IS_EDGE) &&
+ (urlParams['gl'] != '0' && (urlParams['embed'] != '1' ||
+ urlParams['gl'] == '1')) ? new GitLabClient(this) : null;
+
+ if (this.gitLab != null)
+ {
+ this.gitLab.addListener('userChanged', mxUtils.bind(this, function()
+ {
+ this.updateUserElement();
+ this.restoreLibraries();
+ }));
+ }
+
var createFooter = mxUtils.bind(this, function(label, link, className, closeHandler, helpLink)
{
var footer = document.createElement('div');
@@ -1234,39 +1261,39 @@ App.prototype.init = function()
this.restoreLibraries();
this.checkLicense();
- if (this.drive.user != null && (!isLocalStorage || mxSettings.settings == null ||
- mxSettings.settings.closeRealtimeWarning == null || mxSettings.settings.closeRealtimeWarning <
- new Date().getTime() - (7 * 24 * 60 * 60 * 1000)) &&
- (!this.editor.chromeless || this.editor.editable))
+ if (App.GOOGLE_REALTIME_EOL - Date.now() >= 0)
{
- this.drive.checkRealtimeFiles(mxUtils.bind(this, function()
+ if (this.drive.user != null && (!isLocalStorage || mxSettings.settings == null ||
+ mxSettings.settings.closeRealtimeWarning == null || mxSettings.settings.closeRealtimeWarning <
+ new Date().getTime() - (4 * 24 * 60 * 60 * 1000)) &&
+ (!this.editor.chromeless || this.editor.editable))
{
- // Remaining days before 09/27/2019 where Google real time JSON will be disabled
- var days = Math.round((1569535200000 - Date.now()) / (1000 * 60 * 60 * 24));
-
- var footer = createFooter(days + ' days left to convert your files. Click here!',
- 'https://www.draw.io/?mode=google&convert-realtime=1',
- 'geStatusAlert',
- mxUtils.bind(this, function()
- {
- footer.parentNode.removeChild(footer);
- this.hideFooter();
-
- // Close permanently
- if (isLocalStorage && mxSettings.settings != null)
- {
- mxSettings.settings.closeRealtimeWarning = Date.now();
- mxSettings.save();
- }
- }), 'https://desk.draw.io/support/solutions/articles/16000092210');
-
- document.body.appendChild(footer);
-
- window.setTimeout(mxUtils.bind(this, function()
+ this.drive.checkRealtimeFiles(mxUtils.bind(this, function()
{
- mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
- }), 1500);
- }));
+ var footer = createFooter('You need to take action to convert legacy files. Click here.',
+ 'https://desk.draw.io/support/solutions/articles/16000092210',
+ 'geStatusAlert',
+ mxUtils.bind(this, function()
+ {
+ footer.parentNode.removeChild(footer);
+ this.hideFooter();
+
+ // Close permanently
+ if (isLocalStorage && mxSettings.settings != null)
+ {
+ mxSettings.settings.closeRealtimeWarning = Date.now();
+ mxSettings.save();
+ }
+ }));
+
+ document.body.appendChild(footer);
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
+ }), 1500);
+ }));
+ }
}
}))
@@ -1399,48 +1426,48 @@ App.prototype.init = function()
// req.getStatus() + '.' + (new Date().getTime() - t0)});
// }
}));
- }
-
- this.editor.addListener('fileLoaded', mxUtils.bind(this, function()
- {
- var file = this.getCurrentFile();
-
- if (file.mode == App.MODE_DEVICE && (!isLocalStorage || mxSettings.settings == null ||
- mxSettings.settings.closeDesktopFooter == null) &&
- (!this.editor.chromeless || this.editor.editable) &&
- !this.footerShowing && urlParams['open'] == null)
- {
- var footer = createFooter(mxResources.get('downloadDesktop') + '...',
- 'https://get.draw.io/',
- 'geStatusMessage',
- mxUtils.bind(this, function()
- {
- footer.parentNode.removeChild(footer);
- this.hideFooter();
- // Close permanently
- if (isLocalStorage && mxSettings.settings != null)
+ this.editor.addListener('fileLoaded', mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file.mode == App.MODE_DEVICE && (!isLocalStorage || mxSettings.settings == null ||
+ mxSettings.settings.closeDesktopFooter == null) &&
+ (!this.editor.chromeless || this.editor.editable) &&
+ !this.footerShowing && urlParams['open'] == null)
+ {
+ var footer = createFooter(mxResources.get('downloadDesktop') + '...',
+ 'https://get.draw.io/',
+ 'geStatusMessage',
+ mxUtils.bind(this, function()
{
- mxSettings.settings.closeDesktopFooter = Date.now();
- mxSettings.save();
- }
- }));
+ footer.parentNode.removeChild(footer);
+ this.hideFooter();
- document.body.appendChild(footer);
- this.footerShowing = true;
-
- window.setTimeout(mxUtils.bind(this, function()
- {
- mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
- }), 1500);
-
- window.setTimeout(mxUtils.bind(this, function()
- {
- mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,110%)');
- this.footerShowing = false;
- }), 15000);
- }
- }));
+ // Close permanently
+ if (isLocalStorage && mxSettings.settings != null)
+ {
+ mxSettings.settings.closeDesktopFooter = Date.now();
+ mxSettings.save();
+ }
+ }));
+
+ document.body.appendChild(footer);
+ this.footerShowing = true;
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
+ }), 1500);
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,110%)');
+ this.footerShowing = false;
+ }), 15000);
+ }
+ }));
+ }
}
else if (this.menubar != null)
{
@@ -2247,6 +2274,17 @@ App.prototype.appIconClicked = function(evt)
this.openLink('https://github.com/');
}
}
+ else if (mode == App.MODE_GITLAB)
+ {
+ if (file != null && file.constructor == GitLabFile)
+ {
+ this.openLink(file.meta.html_url);
+ }
+ else
+ {
+ this.openLink('https://gitlab.com/');
+ }
+ }
else if (mode == App.MODE_DEVICE)
{
this.openLink('https://get.draw.io/');
@@ -2962,7 +3000,7 @@ App.prototype.showSplash = function(force)
}), rowLimit);
this.showDialog(dlg.container, (rowLimit < 3) ? 260 : 300,
- (serviceCount >= 4) ? 420 : 300, true, false);
+ (serviceCount >= 4) ? 440 : 320, true, false);
dlg.init();
}
else if (urlParams['create'] == null)
@@ -3006,6 +3044,8 @@ App.prototype.addLanguageMenu = function(elt, addLabel)
label.style.fontSize = '12px';
label.style.margin = '5px 24px 0 0';
label.style.color = 'gray';
+ label.style.userSelect = 'none';
+
mxUtils.write(label, mxResources.get('language'));
img.appendChild(label);
}
@@ -3157,7 +3197,8 @@ App.prototype.pickLibrary = function(mode)
{
mode = (mode != null) ? mode : this.mode;
- if (mode == App.MODE_GOOGLE || mode == App.MODE_DROPBOX || mode == App.MODE_ONEDRIVE || mode == App.MODE_GITHUB || mode == App.MODE_TRELLO)
+ if (mode == App.MODE_GOOGLE || mode == App.MODE_DROPBOX || mode == App.MODE_ONEDRIVE ||
+ mode == App.MODE_GITHUB || mode == App.MODE_GITLAB || mode == App.MODE_TRELLO)
{
var peer = (mode == App.MODE_GOOGLE) ? this.drive :
((mode == App.MODE_ONEDRIVE) ? this.oneDrive :
@@ -3344,6 +3385,15 @@ App.prototype.saveLibrary = function(name, images, file, mode, noSpin, noReload,
this.libraryLoaded(newFile, images);
}), error, folderId);
}
+ else if (mode == App.MODE_GITLAB && this.gitLab != null && this.spinner.spin(document.body, mxResources.get('inserting')))
+ {
+ this.gitLab.insertLibrary(name, xml, mxUtils.bind(this, function(newFile)
+ {
+ this.spinner.stop();
+ this.hideDialog(true);
+ this.libraryLoaded(newFile, images);
+ }), error, folderId);
+ }
else if (mode == App.MODE_TRELLO && this.trello != null && this.spinner.spin(document.body, mxResources.get('inserting')))
{
this.trello.insertLibrary(name, xml, mxUtils.bind(this, function(newFile)
@@ -3650,6 +3700,10 @@ App.prototype.getPeerForMode = function(mode)
{
return this.gitHub;
}
+ else if (mode == App.MODE_GITLAB)
+ {
+ return this.gitLab;
+ }
else if (mode == App.MODE_DROPBOX)
{
return this.dropbox;
@@ -3724,6 +3778,14 @@ App.prototype.createFile = function(title, data, libs, mode, done, replace, fold
this.fileCreated(file, libs, replace, done, clibs);
}), error, false, folderId);
}
+ else if (mode == App.MODE_GITLAB && this.gitLab != null)
+ {
+ this.gitLab.insertFile(title, data, mxUtils.bind(this, function(file)
+ {
+ complete();
+ this.fileCreated(file, libs, replace, done, clibs);
+ }), error, false, folderId);
+ }
else if (mode == App.MODE_TRELLO && this.trello != null)
{
this.trello.insertFile(title, data, mxUtils.bind(this, function(file)
@@ -4215,6 +4277,10 @@ App.prototype.loadFile = function(id, sameWindow, file, success, force)
{
peer = this.gitHub;
}
+ else if (id.charAt(0) == 'A')
+ {
+ peer = this.gitLab;
+ }
else if (id.charAt(0) == 'T')
{
peer = this.trello;
@@ -4868,6 +4934,14 @@ App.prototype.pickFolder = function(mode, fn, enabled, direct, force)
fn(folderPath);
}));
}
+ else if (enabled && mode == App.MODE_GITLAB && this.gitLab != null)
+ {
+ this.gitLab.pickFolder(mxUtils.bind(this, function(folderPath)
+ {
+ resume();
+ fn(folderPath);
+ }));
+ }
else if (enabled && mode == App.MODE_TRELLO && this.trello != null)
{
this.trello.pickFolder(mxUtils.bind(this, function(cardId)
@@ -5330,6 +5404,10 @@ App.prototype.updateHeader = function()
{
this.appIcon.style.backgroundImage = 'url(' + IMAGE_PATH + '/github-logo-white.svg)';
}
+ else if (mode == App.MODE_GITLAB)
+ {
+ this.appIcon.style.backgroundImage = 'url(' + IMAGE_PATH + '/gitlab-logo-white.svg)';
+ }
else if (mode == App.MODE_TRELLO)
{
this.appIcon.style.backgroundImage = 'url(' + IMAGE_PATH + '/trello-logo-white-orange.svg)';
@@ -5609,6 +5687,7 @@ App.prototype.updateUserElement = function()
(this.oneDrive == null || this.oneDrive.getUser() == null) &&
(this.dropbox == null || this.dropbox.getUser() == null) &&
(this.gitHub == null || this.gitHub.getUser() == null) &&
+ (this.gitLab == null || this.gitLab.getUser() == null) &&
(this.trello == null || !this.trello.isAuthorized())) //TODO Trello no user issue
{
if (this.userElement != null)
@@ -5695,15 +5774,16 @@ App.prototype.updateUserElement = function()
connected = true;
this.userPanel.innerHTML += '<table title="User ID: ' + driveUser.id +
'" style="font-size:10pt;padding:20px 20px 10px 10px;">' +
- '<tr><td valign="top">' +
+ '<tr><td valign="middle">' +
((driveUser.pictureUrl != null) ?
- '<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="' + driveUser.pictureUrl + '"/>' :
- '<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="' + this.defaultUserPicture + '"/>') +
+ '<img width="50" height="50" style="margin-right:8px;border-radius:50%;" src="' + driveUser.pictureUrl + '"/>' :
+ '<img width="46" height="46" style="margin-right:4px;margin-top:0px;" src="' + this.defaultUserPicture + '"/>') +
'</td><td valign="top" style="white-space:nowrap;' +
- ((driveUser.pictureUrl != null) ? 'padding-top:14px;' : '') +
- '"><b>' + mxUtils.htmlEntities(driveUser.displayName) + '</b><br>' +
- '<small>' + mxUtils.htmlEntities(driveUser.email) + '</small><br><br>' +
- '<small>' + mxResources.get('googleDrive') + '</small></tr></table>';
+ ((driveUser.pictureUrl != null) ? 'padding-top:4px;' : '') +
+ '">' + mxUtils.htmlEntities(driveUser.displayName) + '<br>' +
+ '<small style="color:gray;">' + mxUtils.htmlEntities(driveUser.email) +
+ '</small><div style="margin-top:4px;"><i>' +
+ mxResources.get('googleDrive') + '</i></div></tr></table>';
var div = document.createElement('div');
div.style.textAlign = 'center';
div.style.paddingBottom = '12px';
@@ -5711,7 +5791,7 @@ App.prototype.updateUserElement = function()
// LATER: Cannot change user while file is open since close will not work with new
// credentials and closing the file using fileLoaded(null) will show splash dialog.
- div.appendChild(mxUtils.button(mxResources.get('signOut'), mxUtils.bind(this, function()
+ var btn = mxUtils.button(mxResources.get('signOut'), mxUtils.bind(this, function()
{
var file = this.getCurrentFile();
@@ -5754,8 +5834,9 @@ App.prototype.updateUserElement = function()
this.drive.setUser(null);
gapi.auth.signOut();
}
- })));
-
+ }));
+ btn.className = 'geBtn';
+ div.appendChild(btn);
this.userPanel.appendChild(div);
}
}
@@ -5771,10 +5852,10 @@ App.prototype.updateUserElement = function()
connected = true;
this.userPanel.innerHTML += '<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">' +
- ((logo != null) ? '<img style="margin-right:10px;" src="' + logo + '" width="40" height="40"/></td>' : '') +
- '<td valign="middle" style="white-space:nowrap;"><b>' + mxUtils.htmlEntities(user.displayName) + '</b>' +
- ((user.email != null) ? '<br><font color="gray">' + mxUtils.htmlEntities(user.email) + '</font>' : '') +
- ((label != null) ? '<br><br><small>' + mxUtils.htmlEntities(label) + '</small>' : '') +
+ ((logo != null) ? '<img style="margin-right:6px;" src="' + logo + '" width="40" height="40"/></td>' : '') +
+ '<td valign="middle" style="white-space:nowrap;">' + mxUtils.htmlEntities(user.displayName) +
+ ((user.email != null) ? '<br><small style="color:gray;">' + mxUtils.htmlEntities(user.email) + '</small>' : '') +
+ ((label != null) ? '<div style="margin-top:4px;"><i>' + mxUtils.htmlEntities(label) + '</i></div>' : '') +
'</td></tr></table>';
var div = document.createElement('div');
div.style.textAlign = 'center';
@@ -5783,7 +5864,9 @@ App.prototype.updateUserElement = function()
if (logout != null)
{
- div.appendChild(mxUtils.button(mxResources.get('signOut'), logout));
+ var btn = mxUtils.button(mxResources.get('signOut'), logout);
+ btn.className = 'geBtn';
+ div.appendChild(btn);
}
this.userPanel.appendChild(div);
@@ -5883,6 +5966,37 @@ App.prototype.updateUserElement = function()
}), mxResources.get('github'));
}
+ if (this.gitLab != null)
+ {
+ addUser(this.gitLab.getUser(), IMAGE_PATH + '/gitlab-logo.svg', mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor == GitLabFile)
+ {
+ var doLogout = mxUtils.bind(this, function()
+ {
+ this.gitLab.logout();
+ window.location.hash = '';
+ });
+
+ if (!file.isModified())
+ {
+ doLogout();
+ }
+ else
+ {
+ this.confirm(mxResources.get('allChangesLost'), null, doLogout,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ }
+ else
+ {
+ this.gitLab.logout();
+ }
+ }), mxResources.get('gitlab'));
+ }
+
//TODO We have no user info from Trello, how we can create a user?
if (this.trello != null)
{
@@ -5939,6 +6053,7 @@ App.prototype.updateUserElement = function()
this.userPanel.parentNode.removeChild(this.userPanel);
}
}));
+ btn.className = 'geBtn';
div.appendChild(btn);
this.userPanel.appendChild(div);
@@ -5975,6 +6090,10 @@ App.prototype.updateUserElement = function()
{
user = this.gitHub.getUser();
}
+ else if (this.gitLab != null && this.gitLab.getUser() != null)
+ {
+ user = this.gitLab.getUser();
+ }
//TODO Trello no user issue
if (user != null)
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index db9b9a21..1c44ecef 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -116,6 +116,9 @@ mxscript(drawDevUrl + 'js/diagramly/OneDriveClient.js');
mxscript(drawDevUrl + 'js/diagramly/TrelloFile.js');
mxscript(drawDevUrl + 'js/diagramly/TrelloLibrary.js');
mxscript(drawDevUrl + 'js/diagramly/TrelloClient.js');
+mxscript(drawDevUrl + 'js/diagramly/GitLabFile.js');
+mxscript(drawDevUrl + 'js/diagramly/GitLabLibrary.js');
+mxscript(drawDevUrl + 'js/diagramly/GitLabClient.js');
mxscript(drawDevUrl + 'js/diagramly/App.js');
mxscript(drawDevUrl + 'js/diagramly/Menus.js');
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 6082afdd..8fd69394 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -27,6 +27,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
help.setAttribute('title', mxResources.get('help'));
help.setAttribute('target', '_blank');
help.style.position = 'absolute';
+ help.style.userSelect = 'none';
help.style.textDecoration = 'none';
help.style.cursor = 'pointer';
help.style.fontSize = '12px';
@@ -55,6 +56,8 @@ var StorageDialog = function(editorUi, fn, rowLimit)
demo.style.fontSize = '12px';
demo.style.bottom = bottom;
demo.style.color = 'gray';
+ demo.style.userSelect = 'none';
+
mxUtils.write(demo, mxResources.get('decideLater'));
if (editorUi.isOfflineApp())
@@ -102,11 +105,20 @@ var StorageDialog = function(editorUi, fn, rowLimit)
cb.setAttribute('checked', 'checked');
cb.defaultChecked = true;
var count = 0;
-
+
+ var container = document.createElement('div');
+ container.style.paddingTop = '2px';
+ buttons.appendChild(container);
var p3 = document.createElement('p');
-
+
function addLogo(img, title, mode, clientName, labels, clientFn)
{
+ if (++count > rowLimit)
+ {
+ mxUtils.br(container);
+ count = 0;
+ }
+
var button = document.createElement('a');
button.style.overflow = 'hidden';
button.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
@@ -115,9 +127,10 @@ var StorageDialog = function(editorUi, fn, rowLimit)
button.style.fontSize = '11px';
button.style.position = 'relative';
button.style.margin = '4px';
+ button.style.marginTop = '2px';
button.style.padding = '8px 10px 12px 10px';
button.style.width = '88px';
- button.style.height = '100px';
+ button.style.height = (StorageDialog.extended) ? '50px' : '100px';
button.style.whiteSpace = 'nowrap';
button.setAttribute('title', title);
@@ -138,9 +151,9 @@ var StorageDialog = function(editorUi, fn, rowLimit)
logo.setAttribute('src', img);
logo.setAttribute('border', '0');
logo.setAttribute('align', 'absmiddle');
- logo.style.width = '60px';
- logo.style.height = '60px';
- logo.style.paddingBottom = '6px';
+ logo.style.width = (StorageDialog.extended) ? '24px' : '60px';
+ logo.style.height = (StorageDialog.extended) ? '24px' : '60px';
+ logo.style.paddingBottom = (StorageDialog.extended) ? '4px' : '6px';
button.appendChild(logo);
}
@@ -162,6 +175,21 @@ var StorageDialog = function(editorUi, fn, rowLimit)
}
}
+ if (StorageDialog.extended)
+ {
+ button.style.paddingTop = '4px';
+ button.style.marginBottom = '0px';
+ label.display = 'inline-block';
+
+ if (rowLimit == 2)
+ {
+ logo.style.width = '38px';
+ logo.style.height = '38px';
+ button.style.width = '80px';
+ button.style.height = '68px';
+ }
+ }
+
button.appendChild(label);
mxUtils.write(label, title);
@@ -266,13 +294,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
initButton();
}
- buttons.appendChild(button);
-
- if (++count >= rowLimit)
- {
- mxUtils.br(buttons);
- count = 0;
- }
+ container.appendChild(button);
};
var hd = document.createElement('p');
@@ -285,37 +307,85 @@ var StorageDialog = function(editorUi, fn, rowLimit)
mxUtils.write(hd, mxResources.get('saveDiagramsTo') + ':');
div.appendChild(hd);
- if (typeof window.DriveClient === 'function')
+ var addButtons = function()
{
- addLogo(IMAGE_PATH + '/google-drive-logo.svg', mxResources.get('googleDrive'), App.MODE_GOOGLE, 'drive');
- }
-
- if (typeof window.OneDriveClient === 'function')
- {
- addLogo(IMAGE_PATH + '/onedrive-logo.svg', mxResources.get('oneDrive'), App.MODE_ONEDRIVE, 'oneDrive');
- }
-
- addLogo(IMAGE_PATH + '/osa_drive-harddisk.png', mxResources.get('device'), App.MODE_DEVICE);
+ count = 0;
+
+ if (typeof window.DriveClient === 'function')
+ {
+ addLogo(IMAGE_PATH + '/google-drive-logo.svg', mxResources.get('googleDrive'), App.MODE_GOOGLE, 'drive');
+ }
- if (isLocalStorage && (urlParams['browser'] == '1' || urlParams['offline'] == '1'))
- {
- addLogo(IMAGE_PATH + '/osa_database.png', mxResources.get('browser'), App.MODE_BROWSER);
- }
+ if (typeof window.OneDriveClient === 'function')
+ {
+ addLogo(IMAGE_PATH + '/onedrive-logo.svg', mxResources.get('oneDrive'), App.MODE_ONEDRIVE, 'oneDrive');
+ }
+
+ addLogo(IMAGE_PATH + '/osa_drive-harddisk.png', mxResources.get('device'), App.MODE_DEVICE);
+
+ if (isLocalStorage && (urlParams['browser'] == '1' || urlParams['offline'] == '1'))
+ {
+ addLogo(IMAGE_PATH + '/osa_database.png', mxResources.get('browser'), App.MODE_BROWSER);
+ }
+
+ if (StorageDialog.extended)
+ {
+ if (typeof window.DropboxClient === 'function')
+ {
+ addLogo(IMAGE_PATH + '/dropbox-logo.svg', mxResources.get('dropbox'), App.MODE_DROPBOX, 'dropbox');
+ }
+
+ if (editorUi.gitHub != null)
+ {
+ addLogo(IMAGE_PATH + '/github-logo.svg', mxResources.get('github'), App.MODE_GITHUB, 'gitHub');
+ }
+
+ if (editorUi.gitLab != null)
+ {
+ addLogo(IMAGE_PATH + '/gitlab-logo.svg', mxResources.get('gitlab'), App.MODE_GITLAB, 'gitLab');
+ }
+ }
+ };
div.appendChild(buttons);
-
+ addButtons();
+
var p2 = document.createElement('p');
- p2.style.marginTop = '12px';
+ p2.style.marginTop = '8px';
p2.style.marginBottom = '6px';
+
+ var temp = document.createElement('div');
+ temp.style.marginBottom = '10px';
+
+ var showMore = document.createElement('a');
+ showMore.style.color = 'gray';
+ showMore.style.fontSize = '12px';
+ showMore.style.cursor = 'pointer';
+ showMore.style.userSelect = 'none';
+ mxUtils.write(showMore, ((StorageDialog.extended) ? mxResources.get('showLess') : mxResources.get('showMore')) + '...');
+
+ temp.appendChild(showMore);
+ p2.appendChild(temp);
p2.appendChild(cb);
+ mxEvent.addListener(showMore, 'click', function(evt)
+ {
+ container.innerHTML = '';
+ showMore.innerHTML = '';
+ StorageDialog.extended = !StorageDialog.extended;
+ addButtons();
+ mxUtils.write(showMore, ((StorageDialog.extended) ? mxResources.get('showLess') : mxResources.get('showMore')) + '...');
+ mxEvent.consume(evt);
+ });
+
var span = document.createElement('span');
span.style.color = 'gray';
span.style.fontSize = '12px';
+ span.style.userSelect = 'none';
mxUtils.write(span, ' ' + mxResources.get('rememberThisSetting'));
p2.appendChild(span);
mxUtils.br(p2);
-
+
var recent = editorUi.getRecent();
if (recent != null && recent.length > 0)
@@ -372,11 +442,16 @@ var StorageDialog = function(editorUi, fn, rowLimit)
if (Graph.fileSupport)
{
- var link = document.createElement('div');
+ var temp = document.createElement('div');
+ temp.style.marginBottom = '10px';
+ temp.style.padding = '18px 0px 6px 0px';
+
+ var link = document.createElement('a');
link.style.cursor = 'pointer';
- link.style.padding = '18px 0px 6px 0px';
link.style.fontSize = '12px';
link.style.color = 'gray';
+ link.style.userSelect = 'none';
+
mxUtils.write(link, mxResources.get('import') + ': ' + mxResources.get('gliffy') + ', ' +
mxResources.get('formatVssx') + ', ' + mxResources.get('formatVsdx') + ', ' +
mxResources.get('lucidchart') + '...');
@@ -411,7 +486,8 @@ var StorageDialog = function(editorUi, fn, rowLimit)
editorUi.storageFileInputElt.click();
});
- p2.appendChild(link);
+ temp.appendChild(link);
+ p2.appendChild(temp);
buttons.style.paddingBottom = '4px';
}
@@ -449,6 +525,11 @@ var StorageDialog = function(editorUi, fn, rowLimit)
};
/**
+ *
+ */
+StorageDialog.extended = false;
+
+/**
* Constructs a dialog for creating new files from templates.
*/
var SplashDialog = function(editorUi)
@@ -532,10 +613,10 @@ var SplashDialog = function(editorUi)
logo.src = IMAGE_PATH + '/github-logo.svg';
service = mxResources.get('github');
}
- else if (editorUi.mode == App.MODE_TRELLO)
+ else if (editorUi.mode == App.MODE_GITLAB)
{
- logo.src = IMAGE_PATH + '/trello-logo.svg';
- service = mxResources.get('trello');
+ logo.src = IMAGE_PATH + '/gitlab-logo.svg';
+ service = mxResources.get('gitlab');
}
else if (editorUi.mode == App.MODE_BROWSER)
{
@@ -632,6 +713,10 @@ var SplashDialog = function(editorUi)
{
storage = mxResources.get('github');
}
+ else if (editorUi.mode == App.MODE_GITLAB)
+ {
+ storage = mxResources.get('gitlab');
+ }
else if (editorUi.mode == App.MODE_TRELLO)
{
storage = mxResources.get('trello');
@@ -732,6 +817,14 @@ var SplashDialog = function(editorUi)
editorUi.openLink('https://www.github.com/logout');
});
}
+ else if (editorUi.mode == App.MODE_GITLAB && editorUi.gitLab != null)
+ {
+ addLogout(function()
+ {
+ editorUi.gitLab.logout();
+ editorUi.openLink('https://gitlab.com/users/sign_out');
+ });
+ }
else if (editorUi.mode == App.MODE_TRELLO && editorUi.trello != null)
{
if (editorUi.trello.isAuthorized())
@@ -1888,8 +1981,6 @@ var BackgroundImageDialog = function(editorUi, applyFn)
.setAppId(editorUi.drive.appId)
.setLocale(mxLanguage)
.setOAuthToken(token)
- .addView(google.picker.ViewId.PHOTOS)
- .addView(google.picker.ViewId.PHOTO_ALBUMS)
.addView(google.picker.ViewId.PHOTO_UPLOAD);
editorUi.photoPicker = picker.setCallback(function(data)
@@ -2643,6 +2734,10 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
{
logo.src = IMAGE_PATH + '/github-logo.svg';
}
+ else if (editorUi.mode == App.MODE_GITLAB)
+ {
+ logo.src = IMAGE_PATH + '/gitlab-logo.svg';
+ }
else if (editorUi.mode == App.MODE_TRELLO)
{
logo.src = IMAGE_PATH + '/trello-logo.svg';
@@ -2685,6 +2780,10 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
{
ext = editorUi.gitHub.extension;
}
+ else if (editorUi.mode == App.MODE_GITLAB && editorUi.gitLab != null)
+ {
+ ext = editorUi.gitLab.extension;
+ }
else if (editorUi.mode == App.MODE_TRELLO && editorUi.trello != null)
{
ext = editorUi.trello.extension;
@@ -3303,34 +3402,61 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
indexLoaded = true;
var tmpDoc = req.getXml();
var node = tmpDoc.documentElement.firstChild;
+ var clibs = {};
while (node != null)
{
if (typeof(node.getAttribute) !== 'undefined')
{
- var url = node.getAttribute('url');
-
- if (url != null)
+ if (node.nodeName == 'clibs')
{
- var category = node.getAttribute('section');
+ var name = node.getAttribute('name');
+ var adds = node.getElementsByTagName('add');
+ var temp = [];
- if (category == null)
+ for (var i = 0; i < adds.length; i++)
{
- var slash = url.indexOf('/');
- category = url.substring(0, slash);
+ temp.push(encodeURIComponent(mxUtils.getTextContent(adds[i])));
}
- var list = categories[category];
-
- if (list == null)
+ if (name != null && temp.length > 0)
{
- list = [];
- categories[category] = list;
+ clibs[name] = temp.join(';');
}
+ }
+ else
+ {
+ var url = node.getAttribute('url');
- list.push({url: node.getAttribute('url'), libs: node.getAttribute('libs'),
- title: node.getAttribute('title'), tooltip: node.getAttribute('url'),
- preview: node.getAttribute('preview'), clibs: node.getAttribute('clibs')});
+ if (url != null)
+ {
+ var category = node.getAttribute('section');
+
+ if (category == null)
+ {
+ var slash = url.indexOf('/');
+ category = url.substring(0, slash);
+ }
+
+ var list = categories[category];
+
+ if (list == null)
+ {
+ list = [];
+ categories[category] = list;
+ }
+
+ var tempLibs = node.getAttribute('clibs');
+
+ if (clibs[tempLibs] != null)
+ {
+ tempLibs = clibs[tempLibs];
+ }
+
+ list.push({url: node.getAttribute('url'), libs: node.getAttribute('libs'),
+ title: node.getAttribute('title'), tooltip: node.getAttribute('url'),
+ preview: node.getAttribute('preview'), clibs: tempLibs});
+ }
}
}
@@ -3754,6 +3880,16 @@ var CreateDialog = function(editorUi, title, createFn, cancelFn, dlgTitle, btnLa
addLogo(IMAGE_PATH + '/github-logo.svg', mxResources.get('github'), App.MODE_GITHUB, 'gitHub');
}
+
+ if (editorUi.gitLab != null)
+ {
+ var gitLabOption = document.createElement('option');
+ gitLabOption.setAttribute('value', App.MODE_GITLAB);
+ mxUtils.write(gitLabOption, mxResources.get('gitlab'));
+ serviceSelect.appendChild(gitLabOption);
+
+ addLogo(IMAGE_PATH + '/gitlab-logo.svg', mxResources.get('gitlab'), App.MODE_GITLAB, 'gitLab');
+ }
if (typeof window.TrelloClient === 'function')
{
@@ -3820,6 +3956,10 @@ var CreateDialog = function(editorUi, title, createFn, cancelFn, dlgTitle, btnLa
{
ext = editorUi.gitHub.extension;
}
+ else if (newMode == App.MODE_GITLAB)
+ {
+ ext = editorUi.gitLab.extension;
+ }
else if (newMode == App.MODE_TRELLO)
{
ext = editorUi.trello.extension;
@@ -4401,8 +4541,6 @@ var ImageDialog = function(editorUi, title, initialValue, fn, ignoreExisting, co
.setAppId(editorUi.drive.appId)
.setLocale(mxLanguage)
.setOAuthToken(token)
- .addView(google.picker.ViewId.PHOTOS)
- .addView(google.picker.ViewId.PHOTO_ALBUMS)
.addView(google.picker.ViewId.PHOTO_UPLOAD);
editorUi.photoPicker = picker.setCallback(function(data)
@@ -4815,9 +4953,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages)
if (urlParams['photos'] == '1')
{
- picker.addView(google.picker.ViewId.PHOTOS)
- .addView(google.picker.ViewId.PHOTO_ALBUMS)
- .addView(google.picker.ViewId.PHOTO_UPLOAD)
+ picker.addView(google.picker.ViewId.PHOTO_UPLOAD)
}
editorUi.linkPicker = picker.setCallback(function(data)
@@ -4888,6 +5024,28 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages)
});
});
}
+
+ if (editorUi.gitLab != null)
+ {
+ addButton(IMAGE_PATH + '/gitlab-logo.svg', mxResources.get('gitlab'), function()
+ {
+ editorUi.gitLab.pickFile(function(path)
+ {
+ if (path != null)
+ {
+ var tokens = path.split('/');
+ var org = tokens[0];
+ var repo = tokens[1];
+ var ref = tokens[2];
+ var path = tokens.slice(3, tokens.length).join('/');
+
+ linkInput.value = 'https://gitlab.com/' + org + '/' +
+ repo + '/blob/' + ref + '/' + path;
+ linkInput.focus();
+ }
+ });
+ });
+ }
//TODO should Trello support this?
mxEvent.addListener(linkInput, 'keypress', function(e)
@@ -6383,6 +6541,107 @@ var FindWindow = function(ui, x, y, w, h)
/**
*
*/
+var FreehandWindow = function(editorUi, x, y, w, h)
+{
+ var graph = editorUi.editor.graph;
+ var propertyName = 'tags';
+
+ var div = document.createElement('div');
+ div.style.userSelect = 'none';
+ div.style.overflow = 'hidden';
+ div.style.height = '100%';
+
+ var startBtn = mxUtils.button(mxResources.get('startDrawing'), function()
+ {
+ if (graph.freehand.isDrawing())
+ {
+ graph.freehand.stopDrawing();
+ }
+
+ graph.freehand.startDrawing();
+ });
+
+ startBtn.setAttribute('title', mxResources.get('startDrawing'));
+ startBtn.style.marginTop = '8px';
+ startBtn.style.marginRight = '4px';
+ startBtn.style.width = '160px';
+ startBtn.style.overflow = 'hidden';
+ startBtn.style.textOverflow = 'ellipsis';
+ startBtn.style.textAlign = 'center';
+ startBtn.className = 'geBtn gePrimaryBtn';
+
+ div.appendChild(startBtn);
+
+ var stopBtn = startBtn.cloneNode(false);
+ mxUtils.write(stopBtn, mxResources.get('stopDrawing'));
+ stopBtn.setAttribute('title', mxResources.get('stopDrawing'));
+ stopBtn.style.marginTop = '4px';
+
+ mxEvent.addListener(stopBtn, 'click', function()
+ {
+ graph.freehand.stopDrawing();
+ });
+
+ div.appendChild(stopBtn);
+
+ this.window = new mxWindow(mxResources.get('freehand'), div, x, y, w, h, true, true);
+ this.window.destroyOnClose = false;
+ this.window.setMaximizable(false);
+ this.window.setResizable(false);
+ this.window.setClosable(true);
+
+ graph.addListener('freehandStateChanged', mxUtils.bind(this, function()
+ {
+ stopBtn.className = 'geBtn' + (graph.freehand.isDrawing() ? ' gePrimaryBtn' : '');
+ }));
+
+ this.window.addListener('show', mxUtils.bind(this, function()
+ {
+ this.window.fit();
+ }));
+
+ this.window.addListener('hide', mxUtils.bind(this, function()
+ {
+ if (graph.freehand.isDrawing())
+ {
+ graph.freehand.stopDrawing();
+ }
+ }));
+
+ this.window.setLocation = function(x, y)
+ {
+ var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
+ var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
+
+ x = Math.max(0, Math.min(x, iw - this.table.clientWidth));
+ y = Math.max(0, Math.min(y, ih - this.table.clientHeight - 48));
+
+ if (this.getX() != x || this.getY() != y)
+ {
+ mxWindow.prototype.setLocation.apply(this, arguments);
+ }
+ };
+
+ var resizeListener = mxUtils.bind(this, function()
+ {
+ var x = this.window.getX();
+ var y = this.window.getY();
+
+ this.window.setLocation(x, y);
+ });
+
+ mxEvent.addListener(window, 'resize', resizeListener);
+
+ this.destroy = function()
+ {
+ mxEvent.removeListener(window, 'resize', resizeListener);
+ this.window.destroy();
+ }
+};
+
+/**
+ *
+ */
var TagsWindow = function(editorUi, x, y, w, h)
{
var graph = editorUi.editor.graph;
@@ -6613,6 +6872,12 @@ var AuthDialog = function(editorUi, peer, showRememberOption, fn)
service = mxResources.get('github');
img.src = IMAGE_PATH + '/github-logo-white.svg';
}
+ else if (peer == editorUi.gitLab)
+ {
+ service = mxResources.get('gitlab');
+ img.src = IMAGE_PATH + '/gitlab-logo.svg';
+ img.style.width = '32px';
+ }
else if (peer == editorUi.trello)
{
service = mxResources.get('trello');
@@ -6718,6 +6983,114 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
if (expanded)
{
+ var addEntries = mxUtils.bind(this, function(e)
+ {
+ for (var i = 0; i < e.length; i++)
+ {
+ (function(section)
+ {
+ var title = listEntry.cloneNode(false);
+ title.style.fontWeight = 'bold';
+ title.style.backgroundColor = (uiTheme == 'dark') ? '#505759' : '#e5e5e5';
+ title.style.padding = '6px 0px 6px 20px';
+ mxUtils.write(title, section.title);
+ list.appendChild(title);
+
+ for (var j = 0; j < section.entries.length; j++)
+ {
+ (function(entry)
+ {
+ var option = listEntry.cloneNode(false);
+ option.style.cursor = 'pointer';
+ option.style.padding = '4px 0px 4px 20px';
+ option.style.whiteSpace = 'nowrap';
+ option.style.overflow = 'hidden';
+ option.style.textOverflow = 'ellipsis';
+ option.setAttribute('title', entry.title + ' (' + entry.id + ')');
+
+ var checkbox = document.createElement('input');
+ checkbox.setAttribute('type', 'checkbox');
+ checkbox.checked = editorUi.sidebar.isEntryVisible(entry.id);
+ checkbox.defaultChecked = checkbox.checked;
+ option.appendChild(checkbox);
+ mxUtils.write(option, ' ' + entry.title);
+
+ list.appendChild(option);
+
+ var itemClicked = function(evt)
+ {
+ if (evt == null || mxEvent.getSource(evt).nodeName != 'INPUT')
+ {
+ preview.style.textAlign = 'center';
+ preview.style.padding = '0px';
+ preview.style.color = '';
+ preview.innerHTML = '';
+
+ if (entry.desc != null)
+ {
+ var pre = document.createElement('pre');
+ pre.style.boxSizing = 'border-box';
+ pre.style.fontFamily = 'inherit';
+ pre.style.margin = '20px';
+ pre.style.right = '0px';
+ pre.style.textAlign = 'left';
+ mxUtils.write(pre, entry.desc);
+ preview.appendChild(pre);
+ }
+
+ if (entry.imageCallback != null)
+ {
+ entry.imageCallback(preview);
+ }
+ else if (entry.image != null)
+ {
+ preview.innerHTML += '<img border="0" src="' + entry.image + '"/>';
+ }
+ else if (entry.desc == null)
+ {
+ preview.style.padding = '20px';
+ preview.style.color = 'rgb(179, 179, 179)';
+ mxUtils.write(preview, mxResources.get('noPreview'));
+ }
+
+ if (currentListItem != null)
+ {
+ currentListItem.style.backgroundColor = '';
+ }
+
+ currentListItem = option;
+ currentListItem.style.backgroundColor = (uiTheme == 'dark') ? '#505759' : '#ebf2f9';
+
+ if (evt != null)
+ {
+ mxEvent.consume(evt);
+ }
+ }
+ };
+
+ mxEvent.addListener(option, 'click', itemClicked);
+ mxEvent.addListener(option, 'dblclick', function(evt)
+ {
+ checkbox.checked = !checkbox.checked;
+ mxEvent.consume(evt);
+ });
+
+ applyFunctions.push(function()
+ {
+ return (checkbox.checked) ? entry.id : null;
+ });
+
+ // Selects first entry
+ if (i == 0 && j == 0)
+ {
+ itemClicked();
+ }
+ })(section.entries[j]);
+ }
+ })(e[i]);
+ }
+ });
+
var hd = document.createElement('div');
hd.className = 'geDialogTitle';
mxUtils.write(hd, mxResources.get('shapes'));
@@ -6773,108 +7146,7 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
listEntry.style.left = '0px';
listEntry.style.right = '0px';
- for (var i = 0; i < entries.length; i++)
- {
- (function(section)
- {
- var title = listEntry.cloneNode(false);
- title.style.fontWeight = 'bold';
- title.style.backgroundColor = (uiTheme == 'dark') ? '#505759' : '#e5e5e5';
- title.style.padding = '6px 0px 6px 20px';
- mxUtils.write(title, section.title);
- list.appendChild(title);
-
- for (var j = 0; j < section.entries.length; j++)
- {
- (function(entry)
- {
- var option = listEntry.cloneNode(false);
- option.style.cursor = 'pointer';
- option.style.padding = '4px 0px 4px 20px';
- option.setAttribute('title', entry.title + ' (' + entry.id + ')');
-
- var checkbox = document.createElement('input');
- checkbox.setAttribute('type', 'checkbox');
- checkbox.checked = editorUi.sidebar.isEntryVisible(entry.id);
- checkbox.defaultChecked = checkbox.checked;
- option.appendChild(checkbox);
- mxUtils.write(option, ' ' + entry.title);
-
- list.appendChild(option);
-
- var itemClicked = function(evt)
- {
- if (evt == null || mxEvent.getSource(evt).nodeName != 'INPUT')
- {
- preview.style.textAlign = 'center';
- preview.style.padding = '0px';
- preview.style.color = '';
- preview.innerHTML = '';
-
- if (entry.desc != null)
- {
- var pre = document.createElement('pre');
- pre.style.boxSizing = 'border-box';
- pre.style.fontFamily = 'inherit';
- pre.style.margin = '20px';
- pre.style.right = '0px';
- pre.style.textAlign = 'left';
- mxUtils.write(pre, entry.desc);
- preview.appendChild(pre);
- }
-
- if (entry.imageCallback != null)
- {
- entry.imageCallback(preview);
- }
- else if (entry.image != null)
- {
- preview.innerHTML += '<img border="0" src="' + entry.image + '"/>';
- }
- else if (entry.desc == null)
- {
- preview.style.padding = '20px';
- preview.style.color = 'rgb(179, 179, 179)';
- mxUtils.write(preview, mxResources.get('noPreview'));
- }
-
- if (currentListItem != null)
- {
- currentListItem.style.backgroundColor = '';
- }
-
- currentListItem = option;
- currentListItem.style.backgroundColor = (uiTheme == 'dark') ? '#505759' : '#ebf2f9';
-
- if (evt != null)
- {
- mxEvent.consume(evt);
- }
- }
- };
-
- mxEvent.addListener(option, 'click', itemClicked);
- mxEvent.addListener(option, 'dblclick', function(evt)
- {
- checkbox.checked = !checkbox.checked;
- mxEvent.consume(evt);
- });
-
- applyFunctions.push(function()
- {
- return (checkbox.checked) ? entry.id : null;
- });
-
- // Selects first entry
- if (i == 0 && j == 0)
- {
- itemClicked();
- }
- })(section.entries[j]);
- }
- })(entries[i]);
- }
-
+ addEntries(entries);
div.style.padding = '30px';
div.appendChild(hd);
@@ -9692,6 +9964,11 @@ var BtnDialog = function(editorUi, peer, btnLbl, fn)
service = mxResources.get('github');
img.src = IMAGE_PATH + '/github-logo-white.svg';
}
+ else if (peer == editorUi.gitLab)
+ {
+ service = mxResources.get('gitlab');
+ img.src = IMAGE_PATH + '/gitlab-logo.svg';
+ }
else if (peer == editorUi.trello)
{
service = mxResources.get('trello');
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 6a2fa746..d62ef515 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -837,7 +837,9 @@ DrawioFile.prototype.save = function(revision, success, error, unloading, overwr
*/
DrawioFile.prototype.updateFileData = function()
{
- this.setData(this.ui.getFileData(null, null, null, null, null, null, null, null, this));
+ var nonCompressed = (this.ui.fileNode != null) ? this.ui.fileNode.getAttribute('compressed') == 'false' : false;
+
+ this.setData(this.ui.getFileData(null, null, null, null, null, null, null, null, this, nonCompressed));
};
/**
@@ -1636,8 +1638,8 @@ DrawioFile.prototype.handleConflictError = function(err, manual)
if (this.ui.spinner.spin(document.body, mxResources.get('saving')))
{
this.ui.editor.setStatus('');
- this.save(true, success, error, null, true, (this.constructor ==
- GitHubFile && err != null) ? err.commitMessage : null)
+ var isRepoFile = (this.constructor == GitHubFile) || (this.constructor == GitLabFile);
+ this.save(true, success, error, null, true, (isRepoFile && err != null) ? err.commitMessage : null)
}
});
diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js
index 0d4dedfa..f59fc3e2 100644
--- a/src/main/webapp/js/diagramly/DriveClient.js
+++ b/src/main/webapp/js/diagramly/DriveClient.js
@@ -32,6 +32,11 @@ DriveClient = function(editorUi)
this.mimeTypes = this.xmlMimeType + 'application/mxe,application/mxr,' +
'application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy';
+
+ if (urlParams['photos'] == '1')
+ {
+ this.scopes.push('https://www.googleapis.com/auth/photos.upload');
+ }
};
// Extends mxEventSource
@@ -40,15 +45,9 @@ mxUtils.extend(DriveClient, mxEventSource);
/**
* OAuth 2.0 scopes for installing Drive Apps.
*/
-DriveClient.prototype.scopes = (urlParams['photos'] == '1') ?
- ['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.scopes = ['https://www.googleapis.com/auth/drive.file',
+ 'https://www.googleapis.com/auth/drive.install',
+ 'https://www.googleapis.com/auth/userinfo.profile'];
/**
* Contains the hostname of the old app.
@@ -869,38 +868,45 @@ DriveClient.prototype.isGoogleRealtimeMimeType = function(mimeType)
*/
DriveClient.prototype.getRealtimeData = function(id, success, error, retryCount)
{
- this.executeRequest(gapi.client.drive.realtime.get({'fileId': id,
- 'supportsTeamDrives': true}), mxUtils.bind(this, function(resp)
+ if (App.GOOGLE_REALTIME_EOL - Date.now() < 0)
{
- 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({message: 'realtime.get returned invalid data for ' + id});
- }
- }), mxUtils.bind(this, function(resp)
+ error({message: 'Google Realtime API export endpoint no longer available'});
+ }
+ else
{
- if (retryCount == null)
+ this.executeRequest(gapi.client.drive.realtime.get({'fileId': id,
+ 'supportsTeamDrives': true}), mxUtils.bind(this, function(resp)
{
- retryCount = 0;
- }
-
- if (retryCount < 3)
- {
- window.setTimeout(mxUtils.bind(this, function()
+ var json = (resp.result != null) ? resp.result.data : null;
+
+ if (json != null && json.value != null && json.value.diagrams != null)
{
- this.getRealtimeData(id, success, error, retryCount + 1);
- }), (retryCount + 1) * 100);
- }
- else if (error != null)
+ success(json);
+ }
+ else if (error != null)
+ {
+ error({message: 'realtime.get returned invalid data for ' + id});
+ }
+ }), mxUtils.bind(this, function(resp)
{
- error({message: 'realtime.get failed for ' + id});
- }
- }));
+ if (retryCount == null)
+ {
+ retryCount = 0;
+ }
+
+ if (retryCount < 3)
+ {
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ this.getRealtimeData(id, success, error, retryCount + 1);
+ }), (retryCount + 1) * 100);
+ }
+ else if (error != null)
+ {
+ error({message: 'realtime.get failed for ' + id});
+ }
+ }));
+ }
};
/**
@@ -2599,299 +2605,306 @@ DriveClient.prototype.convertRealtimeFiles = function()
output.scrollTop = output.scrollHeight;
});
- print('draw.io (' + EditorUi.VERSION + ') is searching files to be converted...');
- print('<a href="https://desk.draw.io/support/solutions/articles/16000092210" target="_blank">Click here for help</a>');
-
- if (this.ui.spinner.spin(document.body, 'Searching files...'))
+ if (App.GOOGLE_REALTIME_EOL - Date.now() < 0)
{
- this.checkToken(mxUtils.bind(this, function()
+ print('draw.io (' + EditorUi.VERSION + '): Google Realtime API export endpoint no longer available');
+ }
+ else
+ {
+ print('draw.io (' + EditorUi.VERSION + ') is searching files to be converted...');
+ print('<a href="https://desk.draw.io/support/solutions/articles/16000092210" target="_blank">Click here for help</a>');
+
+ if (this.ui.spinner.spin(document.body, 'Searching files...'))
{
- var convertDelay = 2000;
- var convertedIds = {};
- var converted = 0;
- var fromJson = 0;
- var fromXml = 0;
- var loadFail = 0;
- var invalid = 0;
- var saveFail = 0;
- var failed = 0;
- var total = 0;
- var queryFail = 0;
-
- var email = (this.user != null && this.user.email != null) ? this.user.email : null;
- var q = 'mimeType=\'application/vnd.jgraph.mxfile.realtime\'' +
- ((email != null) ? ' and \'' + email + '\' in writers' : '');
-
- var done = mxUtils.bind(this, function()
+ this.checkToken(mxUtils.bind(this, function()
{
- this.ui.spinner.stop();
- print('<br>Conversion complete. Successfully converted ' + converted + ' file(s).', true);
-
- if (failed > 0)
- {
- print(' Failed to convert ' + failed + ' file(s).<br><br><b>ACTION REQUIRED:</b><br><ul><li>Click ' +
- '<a target="_blank" href="https://drive.google.com/drive/u/0/search?q=type:application/vnd.jgraph.mxfile.realtime">here</a> ' +
- 'to list all affected files</li><li>Open each file in turn by right-clicking the file and selecting open with draw.io</li>' +
- '<li>Open each file in turn. When loaded, select File->Save</li></ul>');
- }
- else
- {
- print('<br><br>This window can now be closed.')
- }
-
- try
+ var convertDelay = 2000;
+ var convertedIds = {};
+ var converted = 0;
+ var fromJson = 0;
+ var fromXml = 0;
+ var loadFail = 0;
+ var invalid = 0;
+ var saveFail = 0;
+ var failed = 0;
+ var total = 0;
+ var queryFail = 0;
+
+ var email = (this.user != null && this.user.email != null) ? this.user.email : null;
+ var q = 'mimeType=\'application/vnd.jgraph.mxfile.realtime\'' +
+ ((email != null) ? ' and \'' + email + '\' in writers' : '');
+
+ var done = mxUtils.bind(this, function()
{
- var dt = Date.now() - t0;
+ this.ui.spinner.stop();
+ print('<br>Conversion complete. Successfully converted ' + converted + ' file(s).', true);
- // Logs conversion
- EditorUi.logEvent({category: 'AUTO-CONVERT',
- action: 'total_' + total + '-done_' + converted +
- '-fail_' + failed + '-xml_' + fromXml + '-json_' + fromJson +
- '-load_' + loadFail + '-save_' + saveFail +
- '-invalid_' + invalid + '-dt-' + Math.round(dt / 1000),
- label: (this.user != null) ? ('user_' + this.user.id) : '-nouser'});
- }
- catch (e)
+ if (failed > 0)
+ {
+ print(' Failed to convert ' + failed + ' file(s).<br><br><b>ACTION REQUIRED:</b><br><ul><li>Click ' +
+ '<a target="_blank" href="https://drive.google.com/drive/u/0/search?q=type:application/vnd.jgraph.mxfile.realtime">here</a> ' +
+ 'to list all affected files</li><li>Open each file in turn by right-clicking the file and selecting open with draw.io</li>' +
+ '<li>Open each file in turn. When loaded, select File->Save</li></ul>');
+ }
+ else
+ {
+ print('<br><br>This window can now be closed.')
+ }
+
+ try
+ {
+ var dt = Date.now() - t0;
+
+ // Logs conversion
+ EditorUi.logEvent({category: 'AUTO-CONVERT',
+ action: 'total_' + total + '-done_' + converted +
+ '-fail_' + failed + '-xml_' + fromXml + '-json_' + fromJson +
+ '-load_' + loadFail + '-save_' + saveFail +
+ '-invalid_' + invalid + '-dt-' + Math.round(dt / 1000),
+ label: (this.user != null) ? ('user_' + this.user.id) : '-nouser'});
+ }
+ catch (e)
+ {
+ // ignore
+ }
+ });
+
+ var getMessage = function(err)
{
- // ignore
- }
- });
-
- var getMessage = function(err)
- {
- return (err == null) ? '' : ((err.message != null) ? err.message : ((err.error != null &&
- err.error.message != null) ? err.error.message : ''));
- };
-
- var doConvert = mxUtils.bind(this, function()
- {
- if (this.ui.spinner.spin(document.body, 'Converting ' + total + ' file(s)'))
+ return (err == null) ? '' : ((err.message != null) ? err.message : ((err.error != null &&
+ err.error.message != null) ? err.error.message : ''));
+ };
+
+ var doConvert = mxUtils.bind(this, function()
{
- print('Found ' + total + ' file(s). This will take up to ' + Math.ceil((total * (convertDelay + 3000)) / 60000) +
- ' minute(s). <b>Please do not close this window!</b><br>');
- var counter = 0;
-
- // Does not show picker if there are no folders in the root
- var nextPage = mxUtils.bind(this, function(token, delay)
+ if (this.ui.spinner.spin(document.body, 'Converting ' + total + ' file(s)'))
{
- var query = {'maxResults': 1, 'q': q, 'includeTeamDriveItems': true, 'supportsTeamDrives': true};
-
- if (token != null)
- {
- query.pageToken = token;
- }
-
- var acceptResponse = true;
-
- var timeoutThread = window.setTimeout(mxUtils.bind(this, function()
- {
- acceptResponse = false;
- nextPage(token, delay);
- }), this.ui.timeout);
-
- this.executeRequest(gapi.client.drive.files.list(query), mxUtils.bind(this, function(res)
+ print('Found ' + total + ' file(s). This will take up to ' + Math.ceil((total * (convertDelay + 3000)) / 60000) +
+ ' minute(s). <b>Please do not close this window!</b><br>');
+ var counter = 0;
+
+ // Does not show picker if there are no folders in the root
+ var nextPage = mxUtils.bind(this, function(token, delay)
{
- window.clearTimeout(timeoutThread);
+ var query = {'maxResults': 1, 'q': q, 'includeTeamDriveItems': true, 'supportsTeamDrives': true};
- if (acceptResponse)
+ if (token != null)
{
- var doNextPage = mxUtils.bind(this, function()
- {
- if (res.nextPageToken != null)
- {
- nextPage(res.nextPageToken);
- }
- else
- {
- done();
- }
- });
+ query.pageToken = token;
+ }
+
+ var acceptResponse = true;
+
+ var timeoutThread = window.setTimeout(mxUtils.bind(this, function()
+ {
+ acceptResponse = false;
+ nextPage(token, delay);
+ }), this.ui.timeout);
+
+ this.executeRequest(gapi.client.drive.files.list(query), mxUtils.bind(this, function(res)
+ {
+ window.clearTimeout(timeoutThread);
- if (res != null && res.error != null)
+ if (acceptResponse)
{
- queryFail++;
+ var doNextPage = mxUtils.bind(this, function()
+ {
+ if (res.nextPageToken != null)
+ {
+ nextPage(res.nextPageToken);
+ }
+ else
+ {
+ done();
+ }
+ });
- if (queryFail < 4)
+ if (res != null && res.error != null)
{
- nextPage(token, delay);
+ queryFail++;
+
+ if (queryFail < 4)
+ {
+ nextPage(token, delay);
+ }
+ else
+ {
+ this.ui.spinner.stop();
+ print('Query for next file failed multiple times. Exiting.<br><br>This window can now be closed.');
+ }
}
- else
+ else if (res != null && (res.items == null || res.items.length == 0) &&
+ res.nextPageToken != null)
{
- this.ui.spinner.stop();
- print('Query for next file failed multiple times. Exiting.<br><br>This window can now be closed.');
+ // Next page can still contain results, see
+ // https://stackoverflow.com/questions/23741845
+ nextPage(res.nextPageToken, 10000);
}
- }
- else if (res != null && (res.items == null || res.items.length == 0) &&
- res.nextPageToken != null)
- {
- // Next page can still contain results, see
- // https://stackoverflow.com/questions/23741845
- nextPage(res.nextPageToken, 10000);
- }
- else if (res != null && res.items != null && res.items.length > 0)
- {
- var fileId = res.items[0].id;
- this.ui.spinner.stop();
- counter++;
-
- if (this.ui.spinner.spin(document.body, 'Converting file ' + counter + ' of ' + total))
+ else if (res != null && res.items != null && res.items.length > 0)
{
- print('Converting ' + counter + ' of ' + total + ': "' + mxUtils.htmlEntities(res.items[0].title) +
- '" (<a href="https://drive.google.com/open?id=' + fileId + '" target="_blank">' + fileId + '</a>)... ', true);
-
- window.setTimeout(mxUtils.bind(this, function()
+ var fileId = res.items[0].id;
+ this.ui.spinner.stop();
+ counter++;
+
+ if (this.ui.spinner.spin(document.body, 'Converting file ' + counter + ' of ' + total))
{
- // Exits if same file is returned twice
- if (convertedIds[fileId] == null)
+ print('Converting ' + counter + ' of ' + total + ': "' + mxUtils.htmlEntities(res.items[0].title) +
+ '" (<a href="https://drive.google.com/open?id=' + fileId + '" target="_blank">' + fileId + '</a>)... ', true);
+
+ window.setTimeout(mxUtils.bind(this, function()
{
- convertedIds[fileId] = true;
-
- acceptResponse = true;
-
- timeoutThread = window.setTimeout(mxUtils.bind(this, function()
+ // Exits if same file is returned twice
+ if (convertedIds[fileId] == null)
{
- acceptResponse = false;
+ convertedIds[fileId] = true;
- failed++;
- loadFail++;
- print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Timeout');
- doNextPage();
- }), this.ui.timeout);
-
- this.getFile(fileId, mxUtils.bind(this, function(file)
- {
- window.clearTimeout(timeoutThread);
+ acceptResponse = true;
+
+ timeoutThread = window.setTimeout(mxUtils.bind(this, function()
+ {
+ acceptResponse = false;
+
+ failed++;
+ loadFail++;
+ print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Timeout');
+ doNextPage();
+ }), this.ui.timeout);
- if (acceptResponse)
+ this.getFile(fileId, mxUtils.bind(this, function(file)
{
- if (file.constructor == DriveFile)
+ window.clearTimeout(timeoutThread);
+
+ if (acceptResponse)
{
- if (file.convertedFrom == 'json')
- {
- fromJson++;
- }
- else
- {
- fromXml++;
- }
-
- acceptResponse = true;
-
- timeoutThread = window.setTimeout(mxUtils.bind(this, function()
- {
- acceptResponse = false;
-
- failed++;
- saveFail++;
- print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Timeout');
- doNextPage();
- }), this.ui.timeout);
-
- this.saveFile(file, null, mxUtils.bind(this, function()
+ if (file.constructor == DriveFile)
{
- window.clearTimeout(timeoutThread);
-
- if (acceptResponse)
+ if (file.convertedFrom == 'json')
{
- converted++;
- print('OK <img src="' + Editor.checkmarkImage + '" border="0" valign="middle"/>');
- doNextPage();
+ fromJson++;
}
- }), mxUtils.bind(this, function(err)
- {
- window.clearTimeout(timeoutThread);
+ else
+ {
+ fromXml++;
+ }
+
+ acceptResponse = true;
- if (acceptResponse)
+ timeoutThread = window.setTimeout(mxUtils.bind(this, function()
{
- var msg = getMessage(err);
+ acceptResponse = false;
+
failed++;
saveFail++;
- print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> ' + msg);
+ print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Timeout');
doNextPage();
- }
- }));
+ }), this.ui.timeout);
+
+ this.saveFile(file, null, mxUtils.bind(this, function()
+ {
+ window.clearTimeout(timeoutThread);
+
+ if (acceptResponse)
+ {
+ converted++;
+ print('OK <img src="' + Editor.checkmarkImage + '" border="0" valign="middle"/>');
+ doNextPage();
+ }
+ }), mxUtils.bind(this, function(err)
+ {
+ window.clearTimeout(timeoutThread);
+
+ if (acceptResponse)
+ {
+ var msg = getMessage(err);
+ failed++;
+ saveFail++;
+ print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> ' + msg);
+ doNextPage();
+ }
+ }));
+ }
+ else
+ {
+ failed++;
+ invalid++;
+ print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Invalid file');
+ doNextPage();
+ }
}
- else
+ }), mxUtils.bind(this, function(err)
+ {
+ window.clearTimeout(timeoutThread);
+
+ if (acceptResponse)
{
+ var msg = getMessage(err);
failed++;
- invalid++;
- print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> Invalid file');
+ loadFail++;
+ print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> ' + msg);
doNextPage();
}
- }
- }), mxUtils.bind(this, function(err)
+ }));
+ }
+ else
{
- window.clearTimeout(timeoutThread);
-
- if (acceptResponse)
- {
- var msg = getMessage(err);
- failed++;
- loadFail++;
- print('<img src="' + this.ui.editor.graph.warningImage.src + '" border="0" valign="absmiddle"/> ' + msg);
- doNextPage();
- }
- }));
- }
- else
- {
- this.ui.spinner.stop();
- print('Search returned duplicate file ' + fileId + '. Exiting.<br><br>This window can now be closed.');
- }
- }), (delay != null) ? delay : convertDelay)
+ this.ui.spinner.stop();
+ print('Search returned duplicate file ' + fileId + '. Exiting.<br><br>This window can now be closed.');
+ }
+ }), (delay != null) ? delay : convertDelay)
+ }
+ }
+ else
+ {
+ done();
}
}
- else
- {
- done();
- }
- }
- }));
- });
-
- nextPage();
- }
- });
-
- var totals = {'maxResults': 10000, 'q': q, 'includeTeamDriveItems': true, 'supportsTeamDrives': true};
-
- var count = mxUtils.bind(this, function(token)
- {
- if (token != null)
- {
- totals.pageToken = token;
- }
+ }));
+ });
+
+ nextPage();
+ }
+ });
- this.executeRequest(gapi.client.drive.files.list(totals), mxUtils.bind(this, function(res)
+ var totals = {'maxResults': 10000, 'q': q, 'includeTeamDriveItems': true, 'supportsTeamDrives': true};
+
+ var count = mxUtils.bind(this, function(token)
{
- total += (res != null && res.items != null) ? res.items.length : 0;
-
- if (res.nextPageToken != null)
+ if (token != null)
{
- count(res.nextPageToken);
+ totals.pageToken = token;
}
- else
+
+ this.executeRequest(gapi.client.drive.files.list(totals), mxUtils.bind(this, function(res)
{
- this.ui.spinner.stop();
+ total += (res != null && res.items != null) ? res.items.length : 0;
- this.ui.showError('Confirm', 'You are about to convert ' + total + ' file(s)',
- 'Cancel', mxUtils.bind(this, function()
+ if (res.nextPageToken != null)
{
- print('Cancelled by user.<br><br>This window can now be closed.');
- }), null, 'OK', doConvert, 'Help', function()
+ count(res.nextPageToken);
+ }
+ else
{
- window.open('https://desk.draw.io/support/solutions/articles/16000092210');
- }, 340, 120);
- }
- }));
- });
-
- count();
- }));
- }
- else
- {
- this.ui.spinner.stop();
- print('Busy. <br><br>This window can now be closed.');
+ this.ui.spinner.stop();
+
+ this.ui.showError('Confirm', 'You are about to convert ' + total + ' file(s)',
+ 'Cancel', mxUtils.bind(this, function()
+ {
+ print('Cancelled by user.<br><br>This window can now be closed.');
+ }), null, 'OK', doConvert, 'Help', function()
+ {
+ window.open('https://desk.draw.io/support/solutions/articles/16000092210');
+ }, 340, 120);
+ }
+ }));
+ });
+
+ count();
+ }));
+ }
+ else
+ {
+ this.ui.spinner.stop();
+ print('Busy. <br><br>This window can now be closed.');
+ }
}
};
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index d122b41c..9885908c 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -435,12 +435,7 @@
if (diagramNode != null)
{
- var tmp = Graph.decompress(mxUtils.getTextContent(diagramNode));
-
- if (tmp != null && tmp.length > 0)
- {
- node = mxUtils.parseXml(tmp).documentElement;
- }
+ node = Editor.parseDiagramNode(diagramNode);
}
}
@@ -455,6 +450,59 @@
/**
* Extracts the XML from the compressed or non-compressed text chunk.
*/
+ Editor.parseDiagramNode = function(diagramNode)
+ {
+ var text = mxUtils.trim(mxUtils.getTextContent(diagramNode));
+ var node = null;
+
+ if (text.length > 0)
+ {
+ var tmp = Graph.decompress(text);
+
+ if (tmp != null && tmp.length > 0)
+ {
+ node = mxUtils.parseXml(tmp).documentElement;
+ }
+ }
+ else
+ {
+ var temp = mxUtils.getChildNodes(diagramNode);
+
+ if (temp.length > 0)
+ {
+ // Creates new document for unique IDs within mxGraphModel
+ var doc = mxUtils.createXmlDocument();
+ doc.appendChild(doc.importNode(temp[0], true));
+ node = doc.documentElement;
+ }
+ }
+
+ return node;
+ };
+
+ /**
+ * Extracts the XML from the compressed or non-compressed text chunk.
+ */
+ Editor.getDiagramNodeXml = function(diagramNode)
+ {
+ var text = mxUtils.getTextContent(diagramNode);
+ var xml = null;
+
+ if (text.length > 0)
+ {
+ xml = Graph.decompress(text);
+ }
+ else if (diagramNode.firstChild != null)
+ {
+ xml = mxUtils.getXml(diagramNode.firstChild);
+ }
+
+ return xml;
+ };
+
+ /**
+ * Extracts the XML from the compressed or non-compressed text chunk.
+ */
Editor.extractGraphModelFromPng = function(data)
{
var result = null;
@@ -3620,8 +3668,18 @@
{
var rackLayout = new mxStackLayout(this.graph, false);
+ var unitSize = 20;
+
+ if (style['rackUnitSize'] != null)
+ {
+ rackLayout.gridSize = parseFloat(style['rackUnitSize']);
+ }
+ else
+ {
+ rackLayout.gridSize = (typeof mxRackContainer !== 'undefined') ? mxRackContainer.unitSize : unitSize;
+ }
+
rackLayout.fill = true;
- rackLayout.gridSize = (typeof mxRackContainer !== 'undefined') ? mxRackContainer.unitSize : 20;
rackLayout.marginLeft = style['marginLeft'] || 0;
rackLayout.marginRight = style['marginRight'] || 0;
rackLayout.marginTop = style['marginTop'] || 0;
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 354e4c19..82025346 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -262,7 +262,18 @@
}
while (n);
};
-
+
+ /**
+ * Removes any values, styles and geometries from the given XML node.
+ */
+ EditorUi.removeChildNodes = function(node)
+ {
+ while (node.firstChild != null)
+ {
+ node.removeChild(node.firstChild);
+ }
+ };
+
/**
* Contains the default XML for an empty diagram.
*/
@@ -834,7 +845,8 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
- EditorUi.prototype.createFileData = function(node, graph, file, url, forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, compact)
+ EditorUi.prototype.createFileData = function(node, graph, file, url, forceXml, forceSvg, forceHtml,
+ embeddedCallback, ignoreSelection, compact, nonCompressed)
{
graph = (graph != null) ? graph : this.editor.graph;
forceXml = (forceXml != null) ? forceXml : false;
@@ -864,25 +876,37 @@
// Ignores case for possible HTML or XML nodes
if (fileNode.nodeName.toLowerCase() != 'mxfile')
{
- // Removes control chars in input for correct roundtrip check
- var text = Graph.zapGremlins(mxUtils.getXml(node));
- var data = Graph.compress(text);
-
- // Fallback to plain XML for invalid compression
- // TODO: Remove this fallback with active pages
- if (Graph.decompress(data) != text)
- {
- return text;
- }
- else
+ if (nonCompressed)
{
var diagramNode = node.ownerDocument.createElement('diagram');
diagramNode.setAttribute('id', Editor.guid());
- mxUtils.setTextContent(diagramNode, data);
+ diagramNode.appendChild(node);
fileNode = node.ownerDocument.createElement('mxfile');
fileNode.appendChild(diagramNode);
}
+ else
+ {
+ // Removes control chars in input for correct roundtrip check
+ var text = Graph.zapGremlins(mxUtils.getXml(node));
+ var data = Graph.compress(text);
+
+ // Fallback to plain XML for invalid compression
+ // TODO: Remove this fallback with active pages
+ if (Graph.decompress(data) != text)
+ {
+ return text;
+ }
+ else
+ {
+ var diagramNode = node.ownerDocument.createElement('diagram');
+ diagramNode.setAttribute('id', Editor.guid());
+ mxUtils.setTextContent(diagramNode, data);
+
+ fileNode = node.ownerDocument.createElement('mxfile');
+ fileNode.appendChild(diagramNode);
+ }
+ }
}
if (!compact)
@@ -906,6 +930,11 @@
{
fileNode.setAttribute('type', md);
}
+
+ if (nonCompressed)
+ {
+ fileNode.setAttribute('compressed', 'false');
+ }
}
else
{
@@ -916,7 +945,7 @@
fileNode.removeAttribute('type');
}
- var xml = mxUtils.getXml(fileNode);
+ var xml = (nonCompressed) ? mxUtils.getPrettyXml(fileNode) : mxUtils.getXml(fileNode);
// Writes the file as an embedded HTML file
if (!forceSvg && !forceXml && (forceHtml || (file != null && /(\.html)$/i.test(file.getTitle()))))
@@ -944,7 +973,7 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
- EditorUi.prototype.getXmlFileData = function(ignoreSelection, currentPage)
+ EditorUi.prototype.getXmlFileData = function(ignoreSelection, currentPage, nonCompressed)
{
ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;
currentPage = (currentPage != null) ? currentPage : false;
@@ -953,8 +982,17 @@
if (ignoreSelection && this.fileNode != null && this.currentPage != null)
{
- var data = Graph.compressNode(node);
- mxUtils.setTextContent(this.currentPage.node, data);
+ if (nonCompressed)
+ {
+ EditorUi.removeChildNodes(this.currentPage.node);
+ this.currentPage.node.appendChild(node);
+ }
+ else
+ {
+ var data = Graph.compressNode(node);
+ mxUtils.setTextContent(this.currentPage.node, data);
+ }
+
node = this.fileNode.cloneNode(false);
if (currentPage)
@@ -966,15 +1004,33 @@
// Restores order of pages
for (var i = 0; i < this.pages.length; i++)
{
- if (this.currentPage != this.pages[i] && this.pages[i].needsUpdate)
+ if (this.currentPage != this.pages[i])
{
- var enc = new mxCodec(mxUtils.createXmlDocument());
- var temp = enc.encode(new mxGraphModel(this.pages[i].root));
- this.editor.graph.saveViewState(this.pages[i].viewState, temp);
- mxUtils.setTextContent(this.pages[i].node, Graph.compressNode(temp));
-
- // Marks the page as up-to-date
- delete this.pages[i].needsUpdate;
+ if (this.pages[i].needsUpdate)
+ {
+ var enc = new mxCodec(mxUtils.createXmlDocument());
+ var temp = enc.encode(new mxGraphModel(this.pages[i].root));
+ this.editor.graph.saveViewState(this.pages[i].viewState, temp);
+
+ if (nonCompressed)
+ {
+ EditorUi.removeChildNodes(this.pages[i].node);
+ this.pages[i].node.appendChild(temp);
+ }
+ else
+ {
+ mxUtils.setTextContent(this.pages[i].node, Graph.compressNode(temp));
+ }
+
+ // Marks the page as up-to-date
+ delete this.pages[i].needsUpdate;
+ }
+ else if (nonCompressed)
+ {
+ var temp = Editor.parseDiagramNode(this.pages[i].node);
+ EditorUi.removeChildNodes(this.pages[i].node);
+ this.pages[i].node.appendChild(temp);
+ }
}
node.appendChild(this.pages[i].node);
@@ -1247,12 +1303,13 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
- EditorUi.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, currentPage, node, compact, file)
+ EditorUi.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection,
+ currentPage, node, compact, file, nonCompressed)
{
ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;
currentPage = (currentPage != null) ? currentPage : false;
- node = (node != null) ? node : this.getXmlFileData(ignoreSelection, currentPage);
+ node = (node != null) ? node : this.getXmlFileData(ignoreSelection, currentPage, nonCompressed);
file = (file != null) ? file : this.getCurrentFile();
var graph = this.editor.graph;
@@ -1284,7 +1341,8 @@
}
var result = this.createFileData(node, graph, file, window.location.href,
- forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, compact);
+ forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, compact,
+ nonCompressed);
// Removes temporary graph from DOM
if (graph != this.editor.graph)
@@ -1433,7 +1491,7 @@
this.pages = null;
var node = (data != null && data.length > 0) ? mxUtils.parseXml(data).documentElement : null;
-
+
// Checks for parser errors
var errors = (node != null) ? node.getElementsByTagName('parsererror') : null;
@@ -1459,7 +1517,7 @@
{
node = tmp;
}
-
+
if (node != null && node.nodeName == 'mxfile')
{
var nodes = node.getElementsByTagName('diagram');
@@ -1568,8 +1626,8 @@
if (format == 'xml')
{
var data = '<?xml version="1.0" encoding="UTF-8"?>\n' +
- ((nonCompressed) ? mxUtils.getXml(this.editor.getGraphXml(ignoreSelection)) :
- this.getFileData(true, null, null, null, ignoreSelection, currentPage));
+ this.getFileData(true, null, null, null, ignoreSelection, currentPage,
+ null, null, null, nonCompressed);
this.saveData(filename, format, data, 'text/xml');
}
@@ -2343,6 +2401,7 @@
// Makes sure the file does not save the invalid UI model and overwrites anything important
if (window.console != null)
{
+ console.error(e);
console.log('error in fileLoaded:', file, e);
}
@@ -3137,8 +3196,7 @@
for (var i = 0; i < pages.length; i++)
{
- var temp = mxUtils.getTextContent(pages[i]);
- var cells = this.stringToCells(Graph.decompress(temp));
+ var cells = this.stringToCells(Editor.getDiagramNodeXml(pages[i]));
var size = this.editor.graph.getBoundingBoxFromGeometry(cells);
addCells(cells, new mxRectangle(0, 0, size.width, size.height), evt);
}
@@ -3988,7 +4046,7 @@
}
else
{
- win.document.write(mxUtils.htmlEntities(data, false));
+ win.document.write('<pre>' + mxUtils.htmlEntities(data, false) + '<pre>');
win.document.close();
}
}
@@ -5736,12 +5794,7 @@
if (diagramNode != null)
{
- var tmp = Graph.decompress(mxUtils.getTextContent(diagramNode));
-
- if (tmp != null && tmp.length > 0)
- {
- node = mxUtils.parseXml(tmp).documentElement;
- }
+ node = Editor.parseDiagramNode(diagramNode);
}
}
@@ -6570,7 +6623,7 @@
if (diagrams.length == 1)
{
- node = mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(diagrams[0]))).documentElement;
+ node = Editor.parseDiagramNode(diagrams[0]);
}
else if (diagrams.length > 1)
{
@@ -6581,7 +6634,7 @@
// Adds first page to current page if current page is only page and empty
if (this.pages != null && this.pages.length == 1 && this.isDiagramEmpty())
{
- node = mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(diagrams[0]))).documentElement;
+ node = Editor.parseDiagramNode(diagrams[0]);
crop = false;
i0 = 1;
}
@@ -10810,7 +10863,8 @@
Editor.defaultCsvValue, mxUtils.bind(this, function(newValue)
{
this.importCsv(newValue);
- }), null, null, 620, 430, null, true, true, mxResources.get('import'));
+ }), null, null, 620, 430, null, true, true, mxResources.get('import'),
+ !this.isOffline() ? 'https://about.draw.io/import-from-csv-to-drawio/' : null);
}
this.showDialog(this.importCsvDialog.container, 640, 520, true, true, null, null, null, null, true);
@@ -11663,7 +11717,7 @@
*/
EditorUi.prototype.getServiceCount = function(allowBrowser, splash)
{
- var serviceCount = 0;
+ var serviceCount = 1;
if (this.drive != null || typeof window.DriveClient === 'function')
{
@@ -11685,16 +11739,12 @@
serviceCount++
}
- if (!splash && (this.trello != null || typeof window.TrelloClient === 'function'))
+ if (!splash && (this.gitLab != null))
{
serviceCount++
}
- if (allowBrowser && isLocalStorage && urlParams['browser'] == '1')
- {
- serviceCount++
- }
- else
+ if (splash && allowBrowser && isLocalStorage && urlParams['browser'] == '1')
{
serviceCount++
}
@@ -12159,7 +12209,7 @@
var libsSection = document.createElement('div');
libsSection.style.cssText = 'border:1px solid lightGray;overflow: auto;height:300px';
- libsSection.innerHTML = '<img src="/images/spin.gif">';
+ libsSection.innerHTML = '<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
var loadedLibs = {};
@@ -12222,10 +12272,17 @@
})(lib, libCheck)
}
}
- }, function()
+ }, mxUtils.bind(this, function(e)
{
- this.handleError(null, mxResources.get('errorLoadingFile'));
- });
+ libsSection.innerHTML = '';
+ var status = document.createElement('div');
+ status.style.padding = '8px';
+ status.style.textAlign = 'center';
+ mxUtils.write(status, mxResources.get('error') + ': ');
+ mxUtils.write(status, (e != null && e.message != null) ?
+ e.message : mxResources.get('unknownError'));
+ libsSection.appendChild(status);
+ }));
div.appendChild(libsSection);
@@ -12277,7 +12334,7 @@
if (pendingLibs == 0) this.spinner.stop();
}), null, null, 'https://desk.draw.io/support/solutions/articles/16000092763');
- this.showDialog(dlg.container, 340, 375, true, true);
+ this.showDialog(dlg.container, 340, 375, true, true, null, null, null, null, true);
};
//Remote invokation, currently limited to functions in EditorUi (and its sub objects) for security reasons
@@ -12320,9 +12377,27 @@
EditorUi.prototype.remoteInvoke = function(remoteFn, remoteFnArgs, msgMarkers, callback, error)
{
+ var acceptResponse = true;
+
+ var timeoutThread = window.setTimeout(mxUtils.bind(this, function()
+ {
+ acceptResponse = false;
+ error({code: App.ERROR_TIMEOUT, message: mxResources.get('timeout')});
+ }), this.timeout);
+
+ var wrapper = mxUtils.bind(this, function()
+ {
+ window.clearTimeout(timeoutThread);
+
+ if (acceptResponse)
+ {
+ callback.apply(this, arguments);
+ }
+ });
+
msgMarkers = msgMarkers || {};
msgMarkers.callbackId = this.remoteInvokeCallbacks.length;
- this.remoteInvokeCallbacks.push({callback: callback, error: error});
+ this.remoteInvokeCallbacks.push({callback: wrapper, error: error});
var msg = JSON.stringify({event: 'remoteInvoke', funtionName: remoteFn, functionArgs: remoteFnArgs, msgMarkers: msgMarkers});
if (this.remoteWin != null) //remote invoke is ready
diff --git a/src/main/webapp/js/diagramly/GitHubClient.js b/src/main/webapp/js/diagramly/GitHubClient.js
index 6650c583..1cb76386 100644
--- a/src/main/webapp/js/diagramly/GitHubClient.js
+++ b/src/main/webapp/js/diagramly/GitHubClient.js
@@ -2,9 +2,9 @@
* Copyright (c) 2006-2017, JGraph Ltd
* Copyright (c) 2006-2017, Gaudenz Alder
*/
-GitHubClient = function(editorUi)
+GitHubClient = function(editorUi, authName)
{
- DrawioClient.call(this, editorUi, 'ghauth');
+ DrawioClient.call(this, editorUi, authName || 'ghauth');
};
// Extends DrawioClient
@@ -47,7 +47,7 @@ GitHubClient.prototype.updateUser = function(success, error, failOnAuth)
var timeoutThread = window.setTimeout(mxUtils.bind(this, function()
{
acceptResponse = false;
- error({code: App.ERROR_TIMEOUT});
+ error({code: App.ERROR_TIMEOUT, message: mxResources.get('timeout')});
}), this.ui.timeout);
mxUtils.get(this.baseUrl + '/user?access_token=' + this.token, mxUtils.bind(this, function(userReq)
@@ -78,8 +78,7 @@ GitHubClient.prototype.updateUser = function(success, error, failOnAuth)
}
else
{
- var userInfo = JSON.parse(userReq.getText());
- this.setUser(new DrawioUser(userInfo.id, userInfo.email, userInfo.name));
+ this.setUser(this.createUser(JSON.parse(userReq.getText())));
success();
}
}
@@ -89,6 +88,14 @@ GitHubClient.prototype.updateUser = function(success, error, failOnAuth)
/**
* Authorizes the client, gets the userId and calls <open>.
*/
+GitHubClient.prototype.createUser = function(userInfo)
+{
+ return new DrawioUser(userInfo.id, userInfo.email, userInfo.name);
+};
+
+/**
+ * Authorizes the client, gets the userId and calls <open>.
+ */
GitHubClient.prototype.authenticate = function(success, error)
{
if (window.onGitHubCallback == null)
@@ -552,8 +559,9 @@ GitHubClient.prototype.showCommitDialog = function(filename, isNew, success, can
}), mxResources.get('commitMessage'), null, null, null, null, mxUtils.bind(this, function()
{
cancel();
- }));
- this.ui.showDialog(dlg.container, 300, 80, true, false);
+ }), null, 280);
+
+ this.ui.showDialog(dlg.container, 400, 80, true, false);
dlg.init();
};
@@ -739,6 +747,9 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
var div = document.createElement('div');
div.style.whiteSpace = 'nowrap';
+ div.style.border = '1px solid lightgray';
+ div.style.boxSizing = 'border-box';
+ div.style.padding = '4px';
div.style.overflow = 'auto';
div.style.lineHeight = '1.2em';
div.style.height = '194px';
@@ -759,6 +770,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
{
var link = document.createElement('a');
link.setAttribute('href', 'javascript:void(0);');
+ link.setAttribute('title', label);
mxUtils.write(link, label);
mxEvent.addListener(link, 'click', fn);
@@ -864,15 +876,35 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
}
else
{
+ var gray = true;
+
var listFiles = mxUtils.bind(this, function(showFolders)
{
for (var i = 0; i < files.length; i++)
{
- (mxUtils.bind(this, function(file)
+ (mxUtils.bind(this, function(file, idx)
{
if (showFolders == (file.type == 'dir'))
{
- div.appendChild(createLink(file.name + ((file.type == 'dir') ? '/' : ''), mxUtils.bind(this, function()
+ var temp = document.createElement('div');
+ temp.style.textOverflow = 'ellipsis';
+ temp.style.boxSizing = 'border-box';
+ temp.style.overflow = 'hidden';
+ temp.style.padding = '4px';
+ temp.style.width = '100%';
+
+ temp.style.backgroundColor = (gray) ? '#eeeeee' : '';
+ gray = !gray;
+
+ var typeImg = document.createElement('img');
+ typeImg.src = IMAGE_PATH + '/' + (file.type == 'dir'? 'folder.png' : 'file.png');
+ typeImg.setAttribute('align', 'absmiddle');
+ typeImg.style.marginRight = '4px';
+ typeImg.style.marginTop = '-4px';
+ typeImg.width = 20;
+ temp.appendChild(typeImg);
+
+ temp.appendChild(createLink(file.name + ((file.type == 'dir') ? '/' : ''), mxUtils.bind(this, function()
{
if (file.type == 'dir')
{
@@ -885,9 +917,10 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + file.path);
}
})));
- mxUtils.br(div);
+
+ div.appendChild(temp);
}
- }))(files[i]);
+ }))(files[i], i);
}
});
@@ -1097,9 +1130,18 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
for (var i = 0; i < repos.length; i++)
{
- (mxUtils.bind(this, function(repository)
+ (mxUtils.bind(this, function(repository, idx)
{
- div.appendChild(createLink(repository.full_name, mxUtils.bind(this, function()
+ var temp = document.createElement('div');
+ temp.style.textOverflow = 'ellipsis';
+ temp.style.boxSizing = 'border-box';
+ temp.style.overflow = 'hidden';
+ temp.style.padding = '4px';
+ temp.style.width = '100%';
+
+ temp.style.backgroundColor = (idx % 2 == 0) ? '#eeeeee' : '';
+
+ temp.appendChild(createLink(repository.full_name, mxUtils.bind(this, function()
{
org = repository.owner.login;
repo = repository.name;
@@ -1108,8 +1150,9 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
selectFile();
})));
- mxUtils.br(div);
- }))(repos[i]);
+
+ div.appendChild(temp);
+ }))(repos[i], i);
}
}
diff --git a/src/main/webapp/js/diagramly/GitLabClient.js b/src/main/webapp/js/diagramly/GitLabClient.js
new file mode 100644
index 00000000..08d3a32f
--- /dev/null
+++ b/src/main/webapp/js/diagramly/GitLabClient.js
@@ -0,0 +1,1018 @@
+/**
+ * Copyright (c) 2006-2017, JGraph Ltd
+ * Copyright (c) 2006-2017, Gaudenz Alder
+ */
+GitLabClient = function(editorUi)
+{
+ GitHubClient.call(this, editorUi, 'gitlabauth');
+};
+
+// Extends DrawioClient
+mxUtils.extend(GitLabClient, GitHubClient);
+
+/**
+ * Gitlab Client ID, see https://gitlab.com/oauth/applications/135239
+ */
+GitLabClient.prototype.clientId = '5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44';
+
+/**
+ * OAuth scope.
+ */
+GitLabClient.prototype.scope = 'api%20read_repository%20write_repository';
+
+/**
+ * Base URL for API calls.
+ */
+GitLabClient.prototype.baseUrl = 'https://gitlab.com/api/v4';
+
+/**
+ * Authorizes the client, gets the userId and calls <open>.
+ */
+GitLabClient.prototype.authenticate = function(success, error)
+{
+ if (window.onGitLabCallback == null)
+ {
+ var auth = mxUtils.bind(this, function()
+ {
+ var acceptAuthResponse = true;
+
+ this.ui.showAuthDialog(this, true, mxUtils.bind(this, function(remember, authSuccess)
+ {
+ var state = '123';
+ var redirectUri = encodeURIComponent(window.location.origin + '/gitlab.html');
+ var win = window.open('https://gitlab.com/oauth/authorize?client_id=' +
+ this.clientId + '&scope=' + this.scope + '&redirect_uri=' + redirectUri +
+ '&response_type=token&state=' + state, 'gitlabauth');
+
+ if (win != null)
+ {
+ window.onGitLabCallback = mxUtils.bind(this, function(code, authWindow)
+ {
+ if (acceptAuthResponse)
+ {
+ window.onGitLabCallback = null;
+ acceptAuthResponse = false;
+
+ if (code == null)
+ {
+ error({message: mxResources.get('accessDenied'), retry: auth});
+ }
+ else
+ {
+ if (authSuccess != null)
+ {
+ authSuccess();
+ }
+
+ this.token = code;
+ this.setUser(null);
+
+ if (remember)
+ {
+ this.setPersistentToken(this.token);
+ }
+
+ success();
+ }
+ }
+ else if (authWindow != null)
+ {
+ authWindow.close();
+ }
+ });
+ }
+ else
+ {
+ error({message: mxResources.get('serviceUnavailableOrBlocked'), retry: auth});
+ }
+
+ }), mxUtils.bind(this, function()
+ {
+ if (acceptAuthResponse)
+ {
+ window.onGitLabCallback = null;
+ acceptAuthResponse = false;
+ error({message: mxResources.get('accessDenied'), retry: auth});
+ }
+ }));
+ });
+
+ auth();
+ }
+ else
+ {
+ error({code: App.ERROR_BUSY});
+ }
+};
+
+/**
+ * Authorizes the client, gets the userId and calls <open>.
+ */
+GitLabClient.prototype.executeRequest = function(req, success, error, ignoreNotFound)
+{
+ var doExecute = mxUtils.bind(this, function(failOnAuth)
+ {
+ var acceptResponse = true;
+
+ var timeoutThread = window.setTimeout(mxUtils.bind(this, function()
+ {
+ acceptResponse = false;
+ error({code: App.ERROR_TIMEOUT, message: mxResources.get('timeout')});
+ }), this.ui.timeout);
+
+ var temp = this.token;
+
+ req.setRequestHeaders = function(request, params)
+ {
+ request.setRequestHeader('Authorization', 'Bearer ' + temp);
+ request.setRequestHeader('PRIVATE_TOKEN', temp);
+ request.setRequestHeader('Content-Type', 'application/json');
+ };
+
+ req.send(mxUtils.bind(this, function()
+ {
+ window.clearTimeout(timeoutThread);
+
+ if (acceptResponse)
+ {
+ if ((req.getStatus() >= 200 && req.getStatus() <= 299) ||
+ (ignoreNotFound && req.getStatus() == 404))
+ {
+ success(req);
+ }
+ else if (req.getStatus() === 401)
+ {
+ if (!failOnAuth)
+ {
+ this.authenticate(function()
+ {
+ doExecute(true);
+ }, error);
+ }
+ else
+ {
+ error({message: mxResources.get('accessDenied'), retry: mxUtils.bind(this, function()
+ {
+ this.authenticate(function()
+ {
+ fn(true);
+ }, error);
+ })});
+ }
+ }
+ else if (req.getStatus() === 403)
+ {
+ var tooLarge = false;
+
+ try
+ {
+ var temp = JSON.parse(req.getText());
+
+ if (temp != null && temp.errors != null && temp.errors.length > 0)
+ {
+ tooLarge = temp.errors[0].code == 'too_large';
+ }
+ }
+ catch (e)
+ {
+ // ignore
+ }
+
+ error({message: mxResources.get((tooLarge) ? 'drawingTooLarge' : 'forbidden')});
+ }
+ else if (req.getStatus() === 404)
+ {
+ error({message: this.getErrorMessage(req, mxResources.get('fileNotFound'))});
+ }
+ else if (req.getStatus() === 400)
+ {
+ // Special case: flag to the caller that there was a conflict
+ error({status: 400});
+ }
+ else
+ {
+ error({status: req.getStatus(), message: this.getErrorMessage(req,
+ mxResources.get('error') + ' ' + req.getStatus())});
+ }
+ }
+ }), error);
+ });
+
+ var fn = mxUtils.bind(this, function(failOnAuth)
+ {
+ if (this.user == null)
+ {
+ this.updateUser(function()
+ {
+ fn(true);
+ }, error, failOnAuth);
+ }
+ else
+ {
+ doExecute(failOnAuth);
+ }
+ });
+
+ if (this.token == null)
+ {
+ this.authenticate(function()
+ {
+ fn(true);
+ }, error);
+ }
+ else
+ {
+ fn(false);
+ }
+};
+
+/**
+ * Checks if the client is authorized and calls the next step.
+ */
+GitLabClient.prototype.getFile = function(path, success, error, asLibrary, checkExists)
+{
+ asLibrary = (asLibrary != null) ? asLibrary : false;
+
+ var tokens = decodeURIComponent(path).split('/');
+ var refPos = tokens.indexOf('master');
+ var repoPos = Math.max(refPos-1, 0);
+ var org = tokens.slice(0, repoPos).join('/');
+ var repo = tokens[repoPos];
+ var ref = tokens[refPos];
+ var path = tokens.slice(refPos + 1, tokens.length).join('/');
+ var binary = /\.png$/i.test(path);
+
+ // Handles .vsdx, Gliffy and PNG+XML files by creating a temporary file
+ if (!checkExists && (/\.v(dx|sdx?)$/i.test(path) || /\.gliffy$/i.test(path) ||
+ (!this.ui.useCanvasForExport && binary)))
+ {
+ // Should never be null
+ if (this.token != null)
+ {
+
+ var url = this.baseUrl + '/projects/' + encodeURIComponent(org + '/' + repo) + '/repository/files/' + encodeURIComponent(ref);
+ var tokens = path.split('/');
+ var name = (tokens.length > 0) ? tokens[tokens.length - 1] : path;
+
+ this.ui.convertFile(url, name, null, this.extension, success, error);
+ }
+ else
+ {
+ error({message: mxResources.get('accessDenied')});
+ }
+ }
+ else
+ {
+ // Adds random parameter to bypass cache
+ var rnd = '&t=' + new Date().getTime();
+ url = this.baseUrl + '/projects/' + encodeURIComponent(org + '/' + repo) +
+ '/repository/files/' + encodeURIComponent(path) + '?ref=' + encodeURIComponent(ref);
+ var req = new mxXmlRequest(url + rnd, null, 'GET');
+
+ this.executeRequest(req, mxUtils.bind(this, function(req)
+ {
+ try
+ {
+ success(this.createGitLabFile(org, repo, ref, JSON.parse(req.getText()), asLibrary, url));
+ }
+ catch (e)
+ {
+ error(e);
+ }
+ }), error);
+ }
+};
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabClient.prototype.createGitLabFile = function(org, repo, ref, data, asLibrary)
+{
+ var gitLabUrl = 'https://gitlab.com/';
+ var htmlUrl = gitLabUrl + org + '/' + repo + '/blob/' + ref + '/' + data.file_path;
+ var downloadUrl = gitLabUrl + org + '/' + repo + '/raw/' + ref + '/' + data.file_path + '?inline=false';
+ var fileName = data.file_name;
+
+ var meta = {'org': org, 'repo': repo, 'ref': ref, 'name': fileName,
+ 'path': data.file_path, 'sha': data.content_sha256, 'html_url': htmlUrl,
+ 'download_url': downloadUrl, 'last_commit_id': data.last_commit_id};
+ var content = data.content;
+
+ if (data.encoding === 'base64')
+ {
+ // Checks for base64 encoded mxfile
+ if (content.substring(0, 10) == 'PG14ZmlsZS')
+ {
+ content = (window.atob && !mxClient.IS_SF) ? atob(content) : Base64.decode(content);
+ }
+ else if (/\.jpe?g$/i.test(fileName))
+ {
+ content = 'data:image/jpeg;base64,' + content;
+ }
+ else if (/\.gif$/i.test(fileName))
+ {
+ content = 'data:image/gif;base64,' + content;
+ }
+ else
+ {
+ if (/\.png$/i.test(fileName))
+ {
+ var xml = this.ui.extractGraphModelFromPng(content);
+
+ if (xml != null && xml.length > 0)
+ {
+ content = xml;
+ }
+ else
+ {
+ content = 'data:image/png;base64,' + content;
+ }
+ }
+ else
+ {
+ content = Base64.decode(content);
+ }
+ }
+ }
+
+ return (asLibrary) ? new GitLabLibrary(this.ui, content, meta) : new GitLabFile(this.ui, content, meta);
+};
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabClient.prototype.insertFile = function(filename, data, success, error, asLibrary, folderId, base64Encoded)
+{
+ asLibrary = (asLibrary != null) ? asLibrary : false;
+
+ var tokens = decodeURIComponent(folderId).split('/');
+ var refPos = tokens.indexOf('master');
+ var repoPos = Math.max(refPos-1, 0);
+ var org = tokens.slice(0, repoPos).join('/');
+ var repo = tokens[repoPos];
+ var ref = tokens[refPos];
+ var path = tokens.slice(refPos + 1, tokens.length).join('/');
+
+ if (path.length > 0)
+ {
+ path = path + '/';
+ }
+
+ path = path + filename;
+
+ this.checkExists(org + '/' + repo + '/' + ref + '/' + path, true, mxUtils.bind(this, function(checked, sha)
+ {
+ if (checked)
+ {
+ // Does not insert file here as there is another writeFile implicit via fileCreated
+ if (!asLibrary)
+ {
+ success(new GitLabFile(this.ui, data, {'org': org, 'repo': repo, 'ref': ref,
+ 'name': filename, 'path': path, 'sha': sha, isNew: true}));
+ }
+ else
+ {
+ if (!base64Encoded)
+ {
+ data = Base64.encode(data);
+ }
+
+ this.showCommitDialog(filename, true, mxUtils.bind(this, function(message)
+ {
+ this.writeFile(org, repo, ref, path, message, data, sha, mxUtils.bind(this, function(req)
+ {
+ try
+ {
+ var msg = JSON.parse(req.getText());
+ success(this.createGitLabFile(org, repo, ref, msg.content, asLibrary));
+ }
+ catch (e)
+ {
+ error(e);
+ }
+ }), error);
+ }), error);
+ }
+ }
+ else
+ {
+ // create if it does not exists
+ error();
+ }
+ }))
+};
+
+/**
+ *
+ */
+GitLabClient.prototype.writeFile = function(org, repo, ref, path, message, data, last_commit_id, success, error)
+{
+ if (data.length >= this.maxFileSize)
+ {
+ error({message: mxResources.get('drawingTooLarge') + ' (' +
+ this.ui.formatFileSize(data.length) + ' / 1 MB)'});
+ }
+ else
+ {
+ var entity =
+ {
+ path: encodeURIComponent(path),
+ branch: decodeURIComponent(ref),
+ commit_message: message,
+ content: data,
+ encoding: 'base64'
+ };
+
+ if (last_commit_id != null)
+ {
+ entity.last_commit_id = last_commit_id;
+ }
+
+ var method = !this.ui.currentFile ? 'POST' : 'PUT'
+
+ // {"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname", "content": "some content", "commit_message": "update file"}
+ // https://docs.gitlab.com/ee/api/repository_files.html#update-existing-file-in-repository
+ var url = this.baseUrl + '/projects/' + encodeURIComponent(org + '/' + repo) + '/repository/files/' + encodeURIComponent(path);
+ var req = new mxXmlRequest(url, JSON.stringify(entity), method);
+ this.executeRequest(req, mxUtils.bind(this, function(req)
+ {
+ success(req);
+ }), error);
+ }
+};
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabClient.prototype.saveFile = function(file, success, error, overwrite, message)
+{
+ var org = file.meta.org;
+ var repo = file.meta.repo;
+ var ref = file.meta.ref;
+ var path = file.meta.path;
+
+ var fn = mxUtils.bind(this, function(last_commit_id, data)
+ {
+ this.writeFile(org, repo, ref, path, message, data, last_commit_id,
+ mxUtils.bind(this, function(req)
+ {
+ delete file.meta.isNew;
+ success({
+ content: file.meta
+ });
+ }), mxUtils.bind(this, function(err)
+ {
+ error(err);
+ }));
+ });
+
+ var fn2 = mxUtils.bind(this, function()
+ {
+ if (this.ui.useCanvasForExport && /(\.png)$/i.test(path))
+ {
+ this.ui.getEmbeddedPng(mxUtils.bind(this, function(data)
+ {
+ fn(file.meta.last_commit_id, data);
+ }), error, (this.ui.getCurrentFile() != file) ? file.getData() : null);
+ }
+ else
+ {
+ fn(file.meta.last_commit_id, Base64.encode(file.getData()));
+ }
+ });
+
+ // TODO: Get only sha not content for overwrite
+ if (overwrite)
+ {
+ this.getFile(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + path,
+ mxUtils.bind(this, function(tempFile)
+ {
+ file.meta.last_commit_id = tempFile.meta.last_commit_id;
+ fn2();
+ }), error);
+ }
+ else
+ {
+ fn2();
+ }
+};
+
+/**
+ * Checks if the client is authorized and calls the next step.
+ */
+GitLabClient.prototype.pickFolder = function(fn)
+{
+ this.showGitLabDialog(false, fn);
+};
+
+/**
+ * Checks if the client is authorized and calls the next step.
+ */
+GitLabClient.prototype.pickFile = function(fn)
+{
+ fn = (fn != null) ? fn : mxUtils.bind(this, function(path)
+ {
+ this.ui.loadFile('A' + encodeURIComponent(path));
+ });
+
+ this.showGitLabDialog(true, fn);
+};
+
+/**
+ * LATER: Refactor to use common code with GitHubClient
+ */
+GitLabClient.prototype.showGitLabDialog = function(showFiles, fn)
+{
+ var org = null;
+ var repo = null;
+ var ref = null;
+ var path = null;
+
+ var content = document.createElement('div');
+ content.style.whiteSpace = 'nowrap';
+ content.style.overflow = 'hidden';
+ content.style.height = '224px';
+
+ var hd = document.createElement('h3');
+ mxUtils.write(hd, mxResources.get((showFiles) ? 'selectFile' : 'selectFolder'));
+ hd.style.cssText = 'width:100%;text-align:center;margin-top:0px;margin-bottom:12px';
+ content.appendChild(hd);
+
+ var div = document.createElement('div');
+ div.style.whiteSpace = 'nowrap';
+ div.style.border = '1px solid lightgray';
+ div.style.boxSizing = 'border-box';
+ div.style.padding = '4px';
+ div.style.overflow = 'auto';
+ div.style.lineHeight = '1.2em';
+ div.style.height = '194px';
+ content.appendChild(div);
+
+ var dlg = new CustomDialog(this.ui, content, mxUtils.bind(this, function()
+ {
+ fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + path);
+ }));
+ this.ui.showDialog(dlg.container, 340, 270, true, true);
+
+ if (showFiles)
+ {
+ dlg.okButton.parentNode.removeChild(dlg.okButton);
+ }
+
+ var createLink = mxUtils.bind(this, function(label, fn)
+ {
+ var link = document.createElement('a');
+ link.setAttribute('href', 'javascript:void(0);');
+ mxUtils.write(link, label);
+ mxEvent.addListener(link, 'click', fn);
+
+ return link;
+ });
+
+ var updatePathInfo = mxUtils.bind(this, function(hideRef)
+ {
+ var pathInfo = document.createElement('div');
+ pathInfo.style.marginBottom = '8px';
+
+ pathInfo.appendChild(createLink(org + '/' + repo, mxUtils.bind(this, function()
+ {
+ path = null;
+ selectRepo();
+ })));
+
+ if (!hideRef)
+ {
+ mxUtils.write(pathInfo, ' / ');
+ pathInfo.appendChild(createLink(decodeURIComponent(ref), mxUtils.bind(this, function()
+ {
+ path = null;
+ selectRef();
+ })));
+ }
+
+ if (path != null && path.length > 0)
+ {
+ var tokens = path.split('/');
+
+ for (var i = 0; i < tokens.length; i++)
+ {
+ (function(index)
+ {
+ mxUtils.write(pathInfo, ' / ');
+ pathInfo.appendChild(createLink(tokens[index], mxUtils.bind(this, function()
+ {
+ path = tokens.slice(0, index + 1).join('/');
+ selectFile();
+ })));
+ })(i);
+ }
+ }
+
+ div.appendChild(pathInfo);
+ });
+
+ var error = mxUtils.bind(this, function(err)
+ {
+ this.ui.handleError(err, null, mxUtils.bind(this, function()
+ {
+ this.ui.spinner.stop();
+
+ if (this.getUser() != null)
+ {
+ org = null;
+ repo = null;
+ ref = null;
+ path = null;
+
+ selectRepo();
+ }
+ else
+ {
+ this.ui.hideDialog();
+ }
+ }));
+ });
+
+ var selectFile = mxUtils.bind(this, function()
+ {
+ var req = new mxXmlRequest(this.baseUrl + '/projects/' + encodeURIComponent(org + '/' + repo) +
+ '/repository/tree?path=' + path, null, 'GET');
+ dlg.okButton.removeAttribute('disabled');
+ div.innerHTML = '';
+ this.ui.spinner.spin(div, mxResources.get('loading'));
+
+ this.executeRequest(req, mxUtils.bind(this, function(req)
+ {
+ updatePathInfo(!ref);
+ this.ui.spinner.stop();
+ var files = JSON.parse(req.getText());
+ div.appendChild(createLink('../ [Up]', mxUtils.bind(this, function()
+ {
+ if (path == '')
+ {
+ path = null;
+ selectRepo();
+ }
+ else
+ {
+ var tokens = path.split('/');
+ path = tokens.slice(0, tokens.length - 1).join('/');
+ selectFile();
+ }
+ })));
+ mxUtils.br(div);
+
+ if (files == null || files.length == 0)
+ {
+ mxUtils.write(div, mxResources.get('noFiles'));
+ }
+ else
+ {
+ var gray = true;
+
+ var listFiles = mxUtils.bind(this, function(showFolders)
+ {
+ for (var i = 0; i < files.length; i++)
+ {
+ (mxUtils.bind(this, function(file)
+ {
+ if (showFolders == (file.type == 'tree'))
+ {
+ var temp = document.createElement('div');
+ temp.style.textOverflow = 'ellipsis';
+ temp.style.boxSizing = 'border-box';
+ temp.style.overflow = 'hidden';
+ temp.style.padding = '4px';
+ temp.style.width = '100%';
+
+ temp.style.backgroundColor = (gray) ? '#eeeeee' : '';
+ gray = !gray;
+
+ var typeImg = document.createElement('img');
+ typeImg.src = IMAGE_PATH + '/' + (file.type == 'tree'? 'folder.png' : 'file.png');
+ typeImg.setAttribute('align', 'absmiddle');
+ typeImg.style.marginRight = '4px';
+ typeImg.style.marginTop = '-4px';
+ typeImg.width = 20;
+ temp.appendChild(typeImg);
+
+ temp.appendChild(createLink(file.name + ((file.type == 'tree') ? '/' : ''), mxUtils.bind(this, function()
+ {
+ if (file.type == 'tree')
+ {
+ path = file.path;
+ selectFile();
+ }
+ else if (showFiles && file.type == 'blob')
+ {
+ this.ui.hideDialog();
+ fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + file.path);
+ }
+ })));
+
+ div.appendChild(temp);
+ }
+ }))(files[i]);
+ }
+ });
+
+ listFiles(true);
+
+ if (showFiles)
+ {
+ listFiles(false);
+ }
+ }
+ }), error, true);
+ });
+
+ // Adds paging for repos and branches (files limited to 1000 by API)
+ var pageSize = 100;
+ var nextPageDiv = null;
+ var scrollFn = null;
+
+ var selectRef = mxUtils.bind(this, function(page)
+ {
+ if (page == null)
+ {
+ div.innerHTML = '';
+ page = 1;
+ }
+
+ var req = new mxXmlRequest(this.baseUrl + '/projects/' + encodeURIComponent(org + '/' + repo) +
+ '/repository/branches?per_page=' + pageSize + '&page=' + page, null, 'GET');
+ dlg.okButton.setAttribute('disabled', 'disabled');
+ this.ui.spinner.spin(div, mxResources.get('loading'));
+
+ if (nextPageDiv != null && nextPageDiv.parentNode != null)
+ {
+ nextPageDiv.parentNode.removeChild(nextPageDiv);
+ }
+
+ nextPageDiv = document.createElement('a');
+ nextPageDiv.style.display = 'block';
+ nextPageDiv.setAttribute('href', 'javascript:void(0);');
+ mxUtils.write(nextPageDiv, mxResources.get('more') + '...');
+
+ var nextPage = mxUtils.bind(this, function()
+ {
+ mxEvent.removeListener(div, 'scroll', scrollFn);
+ selectRef(page + 1);
+ });
+
+ mxEvent.addListener(nextPageDiv, 'click', nextPage);
+
+ this.executeRequest(req, mxUtils.bind(this, function(req)
+ {
+ this.ui.spinner.stop();
+
+ if (page == 1)
+ {
+ updatePathInfo(true);
+
+ div.appendChild(createLink('../ [Up]', mxUtils.bind(this, function()
+ {
+ path = null;
+ selectRepo();
+ })));
+
+ mxUtils.br(div);
+ }
+
+ var branches = JSON.parse(req.getText());
+
+ if (branches == null || branches.length == 0)
+ {
+ mxUtils.write(div, mxResources.get('noFiles'));
+ }
+ else
+ {
+ for (var i = 0; i < branches.length; i++)
+ {
+ (mxUtils.bind(this, function(branch)
+ {
+ div.appendChild(createLink(branch.name, mxUtils.bind(this, function()
+ {
+ ref = branch.name;
+ path = '';
+ selectFile();
+ })));
+ mxUtils.br(div);
+ }))(branches[i]);
+ }
+
+ if (branches.length == pageSize)
+ {
+ div.appendChild(nextPageDiv);
+
+ scrollFn = function()
+ {
+ if (div.scrollTop >= div.scrollHeight - div.offsetHeight)
+ {
+ nextPage();
+ }
+ };
+
+ mxEvent.addListener(div, 'scroll', scrollFn);
+ }
+ }
+ }), error);
+ });
+
+ var selectRepo = mxUtils.bind(this, function(page)
+ {
+ if (page == null)
+ {
+ div.innerHTML = '';
+ page = 1;
+ }
+
+ dlg.okButton.setAttribute('disabled', 'disabled');
+ this.ui.spinner.spin(div, mxResources.get('loading'));
+
+ if (nextPageDiv != null && nextPageDiv.parentNode != null)
+ {
+ nextPageDiv.parentNode.removeChild(nextPageDiv);
+ }
+
+ nextPageDiv = document.createElement('a');
+ nextPageDiv.style.display = 'block';
+ nextPageDiv.setAttribute('href', 'javascript:void(0);');
+ mxUtils.write(nextPageDiv, mxResources.get('more') + '...');
+
+ var nextPage = mxUtils.bind(this, function()
+ {
+ mxEvent.removeListener(div, 'scroll', scrollFn);
+ selectRepo(page + 1);
+ });
+
+ mxEvent.addListener(nextPageDiv, 'click', nextPage);
+
+ var listGroups = mxUtils.bind(this, function(callback)
+ {
+ var req = new mxXmlRequest(this.baseUrl + '/groups?per_page=100', null, 'GET');
+ this.executeRequest(req, function(req)
+ {
+ callback(JSON.parse(req.getText()));
+ }, error);
+ });
+
+ var listProjects = mxUtils.bind(this, function(group, callback)
+ {
+ var req = new mxXmlRequest(this.baseUrl + '/groups/' + group.id + '/projects?per_page=100', null, 'GET');
+ this.executeRequest(req, function(req)
+ {
+ callback(group, JSON.parse(req.getText()));
+ }, error);
+ });
+
+
+ listGroups(mxUtils.bind(this, function(groups) {
+ this.ui.spinner.stop();
+ var req = new mxXmlRequest(this.baseUrl + '/users/' + this.user.id + '/projects?per_page=' +
+ pageSize + '&page=' + page, null, 'GET');
+ this.executeRequest(req, mxUtils.bind(this, function(req)
+ {
+ this.ui.spinner.stop();
+ var repos = JSON.parse(req.getText());
+
+
+ if ((repos == null || repos.length == 0) && (groups == null || groups.length == 0))
+ {
+ mxUtils.write(div, mxResources.get('noFiles'));
+ }
+ else
+ {
+ if (page == 1)
+ {
+ div.appendChild(createLink(mxResources.get('enterValue') + '...', mxUtils.bind(this, function()
+ {
+ var dlg = new FilenameDialog(this.ui, 'org/repo/ref', mxResources.get('ok'), mxUtils.bind(this, function(value)
+ {
+ if (value != null)
+ {
+ var tokens = value.split('/');
+
+ if (tokens.length > 1)
+ {
+ org = tokens[0];
+ repo = tokens[1];
+ ref = 'master';
+ path = null;
+ if (tokens.length > 2)
+ {
+ path = encodeURIComponent(tokens.slice(2, tokens.length).join('/'));
+ }
+ selectFile();
+ }
+ else
+ {
+ this.ui.spinner.stop();
+ this.ui.handleError({message: mxResources.get('invalidName')});
+ }
+ }
+ }), mxResources.get('enterValue'));
+ this.ui.showDialog(dlg.container, 300, 80, true, false);
+ dlg.init();
+ })));
+
+ mxUtils.br(div);
+ mxUtils.br(div);
+ }
+
+ for (var i = 0; i < repos.length; i++)
+ {
+ (mxUtils.bind(this, function(repository, idx)
+ {
+ var temp = document.createElement('div');
+ temp.style.textOverflow = 'ellipsis';
+ temp.style.boxSizing = 'border-box';
+ temp.style.overflow = 'hidden';
+ temp.style.padding = '4px';
+ temp.style.width = '100%';
+
+ temp.style.backgroundColor = (idx % 2 == 0) ? '#eeeeee' : '';
+
+ temp.appendChild(createLink(repository.name_with_namespace, mxUtils.bind(this, function()
+ {
+ org = repository.owner.username;
+ repo = repository.name;
+ ref = repository.default_branch || 'master';
+ path = '';
+
+ selectFile();
+ })));
+
+ div.appendChild(temp);
+ }))(repos[i], i);
+ }
+
+ for (var i = 0; i < groups.length; i++)
+ {
+ listProjects(groups[i], (mxUtils.bind(this, function(group, projects)
+ {
+ for (var j = 0; j < projects.length; j++) {
+ var project = projects[j];
+ div.appendChild(createLink(project.name_with_namespace, mxUtils.bind(this, function()
+ {
+ org = group.full_path;
+ repo = project.path;
+ ref = project.default_branch || 'master';
+ path = '';
+
+ selectFile();
+ })));
+ mxUtils.br(div);
+ }
+ })));
+ }
+ }
+
+ if (repos.length == pageSize)
+ {
+ div.appendChild(nextPageDiv);
+
+ scrollFn = function()
+ {
+ if (div.scrollTop >= div.scrollHeight - div.offsetHeight)
+ {
+ nextPage();
+ }
+ };
+
+ mxEvent.addListener(div, 'scroll', scrollFn);
+ }
+ }), error);
+ }));
+ });
+
+ if (!this.token) {
+ this.authenticate(mxUtils.bind(this, function()
+ {
+ this.updateUser(function() { selectRepo(); }, error, true);
+ }), error);
+ } else if (!this.user) {
+ this.updateUser(function() { selectRepo(); }, error, true);
+ } else {
+ selectRepo();
+ }
+};
+
+/**
+ * Checks if the client is authorized and calls the next step.
+ */
+GitLabClient.prototype.logout = function()
+{
+ this.clearPersistentToken();
+ this.setUser(null);
+ this.token = null;
+};
diff --git a/src/main/webapp/js/diagramly/GitLabFile.js b/src/main/webapp/js/diagramly/GitLabFile.js
new file mode 100644
index 00000000..88d92746
--- /dev/null
+++ b/src/main/webapp/js/diagramly/GitLabFile.js
@@ -0,0 +1,278 @@
+/**
+ * Copyright (c) 2006-2017, JGraph Ltd
+ * Copyright (c) 2006-2017, Gaudenz Alder
+ */
+GitLabFile = function(ui, data, meta)
+{
+ DrawioFile.call(this, ui, data);
+
+ this.meta = meta;
+};
+
+//Extends mxEventSource
+mxUtils.extend(GitLabFile, GitHubFile);
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabFile.prototype.getId = function()
+{
+ return encodeURIComponent(this.meta.org) + '/' +
+ ((this.meta.repo != null) ? encodeURIComponent(this.meta.repo) + '/' +
+ ((this.meta.ref != null) ? this.meta.ref +
+ ((this.meta.path != null) ? '/' + this.meta.path : '') : '') : '');
+};
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabFile.prototype.getHash = function()
+{
+ return encodeURIComponent('A' + this.getId());
+};
+
+/**
+ * Returns true if copy, export and print are not allowed for this file.
+ */
+GitLabFile.prototype.getPublicUrl = function(fn)
+{
+ // LATER: Check if download_url is always null for private repos
+ if (this.meta.download_url != null)
+ {
+ mxUtils.get(this.meta.download_url, mxUtils.bind(this, function(req)
+ {
+ fn((req.getStatus() >= 200 && req.getStatus() <= 299) ? this.meta.download_url : null);
+ }), mxUtils.bind(this, function()
+ {
+ fn(null);
+ }));
+ }
+ else
+ {
+ fn(null);
+ }
+};
+
+/**
+ * Adds the listener for automatically saving the diagram for local changes.
+ */
+GitLabFile.prototype.isConflict = function(err)
+{
+ return err != null && err.status == 400;
+};
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabFile.prototype.getMode = function()
+{
+ return App.MODE_GITLAB;
+};
+
+/**
+ * Adds the listener for automatically saving the diagram for local changes.
+ */
+GitLabFile.prototype.getLatestVersion = function(success, error)
+{
+ this.ui.gitLab.getFile(this.getId(), success, error);
+};
+
+/**
+ * Adds all listeners.
+ */
+GitLabFile.prototype.getDescriptorEtag = function(desc)
+{
+ return desc.last_commit_id;
+};
+
+/**
+ * Adds the listener for automatically saving the diagram for local changes.
+ */
+GitLabFile.prototype.setDescriptorEtag = function(desc, etag)
+{
+ desc.last_commit_id = etag;
+};
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabFile.prototype.saveFile = function(title, revision, success, error, unloading, overwrite, message)
+{
+ if (!this.isEditable())
+ {
+ if (success != null)
+ {
+ success();
+ }
+ }
+ else if (!this.savingFile)
+ {
+ var doSave = mxUtils.bind(this, function(message)
+ {
+ if (this.getTitle() == title)
+ {
+ var prevModified = null;
+ var modified = null;
+
+ try
+ {
+ // Makes sure no changes get lost while the file is saved
+ prevModified = this.isModified;
+ modified = this.isModified();
+ this.savingFile = true;
+ this.savingFileTime = new Date();
+
+ // Makes sure no changes get lost while the file is saved
+ var prepare = mxUtils.bind(this, function()
+ {
+ this.setModified(false);
+
+ this.isModified = function()
+ {
+ return modified;
+ };
+ });
+
+ var savedEtag = this.getCurrentEtag();
+ var savedData = this.data;
+ prepare();
+
+ this.ui.gitLab.saveFile(this, mxUtils.bind(this, function(commit)
+ {
+ this.isModified = prevModified;
+ this.savingFile = false;
+
+ this.meta.sha = commit.content.sha;
+ this.meta.html_url = commit.content.html_url;
+ this.meta.download_url = commit.content.download_url;
+ this.meta.last_commit_id = commit.content.last_commit_id;
+
+ this.fileSaved(savedData, savedEtag, mxUtils.bind(this, function()
+ {
+ this.contentChanged();
+
+ if (success != null)
+ {
+ success();
+ }
+ }), error);
+ }),
+ mxUtils.bind(this, function(err)
+ {
+ this.savingFile = false;
+ this.isModified = prevModified;
+ this.setModified(modified || this.isModified());
+
+ if (this.isConflict(err))
+ {
+ this.inConflictState = true;
+
+ if (error != null)
+ {
+ // Passes current commit message to avoid
+ // multiple dialogs after synchronize
+ error({commitMessage: message});
+ }
+ }
+ else if (error != null)
+ {
+ // Handles modified state for retries
+ if (err != null && err.retry != null)
+ {
+ var retry = err.retry;
+
+ err.retry = function()
+ {
+ prepare();
+ retry();
+ };
+ }
+
+ error(err);
+ }
+ }), overwrite, message);
+ }
+ catch (e)
+ {
+ this.savingFile = false;
+
+ if (prevModified != null)
+ {
+ this.isModified = prevModified;
+ }
+
+ if (modified != null)
+ {
+ this.setModified(modified || this.isModified());
+ }
+
+ if (error != null)
+ {
+ error(e);
+ }
+ else
+ {
+ throw e;
+ }
+ }
+ }
+ else
+ {
+ this.savingFile = true;
+
+ this.ui.pickFolder(App.MODE_GITLAB, mxUtils.bind(this, function(folderId)
+ {
+ this.ui.gitLab.insertFile(title, this.getData(), mxUtils.bind(this, function(file)
+ {
+ this.savingFile = false;
+
+ if (success != null)
+ {
+ success();
+ }
+
+ this.ui.fileLoaded(file);
+ }), mxUtils.bind(this, function()
+ {
+ this.savingFile = false;
+
+ if (error != null)
+ {
+ error();
+ }
+ }), false, folderId, message);
+ }));
+ }
+ });
+
+ if (message != null)
+ {
+ doSave(message);
+ }
+ else
+ {
+ this.ui.gitLab.showCommitDialog(this.meta.name,
+ this.meta.last_commit_id == null || this.meta.isNew,
+ mxUtils.bind(this, function(message)
+ {
+ doSave(message);
+ }), error);
+ }
+ }
+ else if (error != null)
+ {
+ error({code: App.ERROR_BUSY});
+ }
+};
diff --git a/src/main/webapp/js/diagramly/GitLabLibrary.js b/src/main/webapp/js/diagramly/GitLabLibrary.js
new file mode 100644
index 00000000..13252f3c
--- /dev/null
+++ b/src/main/webapp/js/diagramly/GitLabLibrary.js
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2006-2017, JGraph Ltd
+ * Copyright (c) 2006-2017, Gaudenz Alder
+ */
+GitLabLibrary = function(ui, data, meta)
+{
+ GitLabFile.call(this, ui, data, meta);
+};
+
+//Extends mxEventSource
+mxUtils.extend(GitLabLibrary, GitLabFile);
+
+/**
+ * Overridden to avoid updating data with current file.
+ */
+GitLabLibrary.prototype.doSave = function(title, success, error)
+{
+ this.saveFile(title, false, success, error);
+};
+
+/**
+ * Returns the location as a new object.
+ * @type mx.Point
+ */
+GitLabLibrary.prototype.open = function()
+{
+ // Do nothing - this should never be called
+};
diff --git a/src/main/webapp/js/diagramly/GraphViewer.js b/src/main/webapp/js/diagramly/GraphViewer.js
index 314062b5..58bbf6ae 100644
--- a/src/main/webapp/js/diagramly/GraphViewer.js
+++ b/src/main/webapp/js/diagramly/GraphViewer.js
@@ -213,8 +213,7 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
return;
this.currentPage = mxUtils.mod(number, this.diagrams.length);
- this.updateGraphXml(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(
- this.diagrams[this.currentPage]))).documentElement);
+ this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage]));
};
this.selectPageById = function(id)
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 5a3ca9aa..e043f8b5 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -133,21 +133,26 @@
})).isEnabled = isGraphEnabled;
if (window.mxFreehand)
- {
- graph.addListener('freehandInserted', function()
- {
- graph.container.style.cursor = '';
- editorUi.editor.setStatus('');
- });
-
+ {
editorUi.actions.put('insertFreehand', new Action(mxResources.get('freehand') + '...', function(evt)
{
if (graph.isEnabled())
{
- graph.freehand.setEnabled(true);
- graph.freehand.setClosedPath(evt != null && mxEvent.isShiftDown(evt));
- editorUi.editor.setStatus(mxResources.get('startDrawing'));
- graph.container.style.cursor = 'crosshair';
+ if (this.freehandWindow == null)
+ {
+ this.freehandWindow = new FreehandWindow(editorUi, document.body.offsetWidth - 420, 102, 176, 104);
+ }
+
+ if (graph.freehand.isDrawing())
+ {
+ graph.freehand.stopDrawing();
+ }
+ else
+ {
+ graph.freehand.startDrawing();
+ }
+
+ this.freehandWindow.window.setVisible(graph.freehand.isDrawing());
}
})).isEnabled = isGraphEnabled;
}
@@ -165,7 +170,10 @@
var selection = editorUi.addCheckbox(div, mxResources.get('selectionOnly'),
false, graph.isSelectionEmpty());
- var pages = editorUi.addCheckbox(div, mxResources.get((noPages) ? 'compressed' : 'allPages'), true);
+ var compressed = editorUi.addCheckbox(div, mxResources.get('compressed'),
+ !noPages, noPages);
+ var pages = editorUi.addCheckbox(div, mxResources.get('allPages'),
+ true, noPages);
pages.style.marginBottom = '16px';
mxEvent.addListener(selection, 'change', function()
@@ -182,11 +190,11 @@
var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
{
- editorUi.downloadFile('xml', (noPages) ? !pages.checked : null, null,
- !selection.checked, (!noPages) ? !pages.checked : null);
+ editorUi.downloadFile('xml', noPages || !compressed.checked, null,
+ !selection.checked, noPages || !pages.checked);
}), null, mxResources.get('export'));
- editorUi.showDialog(dlg.container, 300, 146, true, true);
+ editorUi.showDialog(dlg.container, 300, 176, true, true);
}));
editorUi.actions.put('exportUrl', new Action(mxResources.get('url') + '...', function()
@@ -1968,6 +1976,14 @@
pickFileFromService(editorUi.gitHub);
}, parent);
}
+
+ if (editorUi.gitLab != null)
+ {
+ menu.addItem(mxResources.get('gitlab') + '...', null, function()
+ {
+ pickFileFromService(editorUi.gitLab);
+ }, parent);
+ }
if (editorUi.trello != null)
{
@@ -2544,6 +2560,14 @@
editorUi.pickFile(App.MODE_GITHUB);
}, parent);
}
+
+ if (editorUi.gitLab != null)
+ {
+ menu.addItem(mxResources.get('gitlab') + '...', null, function()
+ {
+ editorUi.pickFile(App.MODE_GITLAB);
+ }, parent);
+ }
if (editorUi.trello != null)
{
@@ -2666,6 +2690,14 @@
}, parent);
}
+ if (editorUi.gitLab != null)
+ {
+ menu.addItem(mxResources.get('gitlab') + '...', null, function()
+ {
+ editorUi.showLibraryDialog(null, null, null, null, App.MODE_GITLAB);
+ }, parent);
+ }
+
if (editorUi.trello != null)
{
menu.addItem(mxResources.get('trello') + '...', null, function()
@@ -2758,6 +2790,14 @@
}, parent);
}
+ if (editorUi.gitLab != null)
+ {
+ menu.addItem(mxResources.get('gitlab') + '...', null, function()
+ {
+ editorUi.pickLibrary(App.MODE_GITLAB);
+ }, parent);
+ }
+
if (editorUi.trello != null)
{
menu.addItem(mxResources.get('trello') + '...', null, function()
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 82efa875..98f113b0 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -1165,6 +1165,10 @@ EditorUi.initMinimalTheme = function()
{
mode = 'gitHub';
}
+ else if (mode == 'gitlab')
+ {
+ mode = 'gitLab';
+ }
else if (mode == 'onedrive')
{
mode = 'oneDrive';
diff --git a/src/main/webapp/js/diagramly/mxFreehand.js b/src/main/webapp/js/diagramly/mxFreehand.js
index b4f8b3b1..22aedaa3 100644
--- a/src/main/webapp/js/diagramly/mxFreehand.js
+++ b/src/main/webapp/js/diagramly/mxFreehand.js
@@ -11,10 +11,12 @@ function mxFreehand(graph)
var bufferSize = mxFreehand.prototype.NORMAL_SMOOTHING;
var path = null;
+ var partPathes = [];
var strPath;
- var drawPoints;
+ var drawPoints = [];
var lastPart;
var closedPath = false;
+ var autoClose = true;
var buffer = []; // Contains the last positions of the mouse cursor
var enabled = false;
@@ -23,6 +25,11 @@ function mxFreehand(graph)
closedPath = isClosed;
};
+ this.setAutoClose = function(isAutoClose)//TODO add auto closed settings
+ {
+ autoClose = isAutoClose;
+ };
+
this.setSmoothing = function(smoothing)//TODO add smoothing settings
{
bufferSize = smoothing;
@@ -34,19 +41,56 @@ function mxFreehand(graph)
graph.getRubberband().setEnabled(!isEnabled);
graph.graphHandler.setSelectEnabled(!isEnabled);
graph.graphHandler.setMoveEnabled(!isEnabled);
+ graph.container.style.cursor = (isEnabled) ? 'crosshair' : '';
+ graph.fireEvent(new mxEventObject('freehandStateChanged'));
};
- this.setEnabled = setEnabled;
-
- var finishPath = function (e)
+ this.startDrawing = function()
+ {
+ setEnabled(true);
+ }
+
+ this.isDrawing = function()
+ {
+ return enabled;
+ };
+
+ var endPath = mxUtils.bind(this, function(e)
{
if (path)
{
- drawPoints.push.apply(drawPoints, lastPart);
+ // Click stops drawing
+ var doStop = drawPoints.length > 0 && lastPart != null && lastPart.length < 2;
+
+ if (!doStop)
+ {
+ drawPoints.push.apply(drawPoints, lastPart);
+ }
+
+ lastPart = [];
+ drawPoints.push(null);
+ partPathes.push(path);
+ path = null;
+
+ if (doStop)
+ {
+ this.stopDrawing();
+ }
+
+ mxEvent.consume(e);
+ }
+ });
+
+ this.stopDrawing = function()
+ {
+ if (partPathes.length > 0)
+ {
var maxX = drawPoints[0].x, minX = drawPoints[0].x, maxY = drawPoints[0].y, minY = drawPoints[0].y;
for (var i = 1; i < drawPoints.length; i++)
{
+ if (drawPoints[i] == null) continue;
+
maxX = Math.max(maxX, drawPoints[i].x);
minX = Math.min(minX, drawPoints[i].x);
maxY = Math.max(maxY, drawPoints[i].y);
@@ -62,28 +106,56 @@ function mxFreehand(graph)
drawPoints.map(function(p)
{
+ if (p == null) return p;
+
p.x = (p.x - minX) * xScale;
p.y = (p.y - minY) * yScale;
return p;
});
- if (closedPath)
- {
- drawPoints.push(drawPoints[0]);
- }
-
//toFixed(2) to reduce size of output
- var drawShape = '<shape strokewidth="inherit"><foreground><path><move x="'+ drawPoints[0].x.toFixed(2) + '" y="' + drawPoints[0].y.toFixed(2) + '"/>';
+ var drawShape = '<shape strokewidth="inherit"><foreground>';
- for (var i = 1; i < drawPoints.length; i++)
+ var start = 0;
+
+ for (var i = 0; i < drawPoints.length; i++)
{
var p = drawPoints[i];
- drawShape += '<line x="'+ p.x.toFixed(2) + '" y="' + p.y.toFixed(2) + '"/>';
+
+ if (p == null)
+ {
+ var tmpClosedPath = false;
+ var startP = drawPoints[start], endP = drawPoints[i - 1];
+
+ if (!closedPath && autoClose)
+ {
+ var xdiff = startP.x - endP.x, ydiff = startP.y - endP.y;
+ var startEndDist = Math.sqrt(xdiff * xdiff + ydiff * ydiff);
+
+ tmpClosedPath = startEndDist <= graph.tolerance;
+ }
+
+ if (closedPath || tmpClosedPath)
+ {
+ drawShape += '<line x="'+ startP.x.toFixed(2) + '" y="' + startP.y.toFixed(2) + '"/>';
+ }
+
+ drawShape += '</path>' + ((closedPath || tmpClosedPath)? '<fillstroke/>' : '<stroke/>');
+ start = i + 1;
+ }
+ else if (i == start)
+ {
+ drawShape += '<path><move x="'+ p.x.toFixed(2) + '" y="' + p.y.toFixed(2) + '"/>'
+ }
+ else
+ {
+ drawShape += '<line x="'+ p.x.toFixed(2) + '" y="' + p.y.toFixed(2) + '"/>';
+ }
}
- drawShape += '</path>' + (closedPath? '<fillstroke/>' : '<stroke/>') + '</foreground></shape>';
+ drawShape += '</foreground></shape>';
- var style = mxConstants.STYLE_SHAPE + '=stencil(' + Graph.compress(drawShape) + ')';
+ var style = mxConstants.STYLE_SHAPE + '=stencil(' + Graph.compress(drawShape) + ');fillColor=none;';
var s = graph.view.scale;
var tr = graph.view.translate;
@@ -106,11 +178,17 @@ function mxFreehand(graph)
setTimeout(function(){graph.setSelectionCells([cell]); }, 10);
}
- path.parentNode.removeChild(path);
+ for (var i = 0; i < partPathes.length; i++)
+ {
+ partPathes[i].parentNode.removeChild(partPathes[i]);
+ }
+
path = null;
- setEnabled(false);
- mxEvent.consume(e);
+ partPathes = [];
+ drawPoints = [];
}
+
+ setEnabled(false);
};
mxEvent.addGestureListeners(svgElement, function (e)
@@ -122,7 +200,6 @@ function mxFreehand(graph)
var strokeWidth = parseFloat(graph.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH] || 1);
strokeWidth = Math.max(1, strokeWidth * graph.view.scale);
- finishPath();
path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.setAttribute("fill", "none");
path.setAttribute("stroke", graph.currentVertexStyle[mxConstants.STYLE_STROKECOLOR] || "#000");
@@ -143,7 +220,7 @@ function mxFreehand(graph)
var pt = getMousePosition(e);
appendToBuffer(pt);
strPath = "M" + pt.x + " " + pt.y;
- drawPoints = [pt];
+ drawPoints.push(pt);
lastPart = [];
path.setAttribute("d", strPath);
svgElement.appendChild(path);
@@ -156,7 +233,7 @@ function mxFreehand(graph)
updateSvgPath();
mxEvent.consume(e);
}
- }, finishPath);
+ }, endPath);
var getMousePosition = function (e)
{
diff --git a/src/main/webapp/js/mxgraph/Dialogs.js b/src/main/webapp/js/mxgraph/Dialogs.js
index 71ccb924..5fdc583f 100644
--- a/src/main/webapp/js/mxgraph/Dialogs.js
+++ b/src/main/webapp/js/mxgraph/Dialogs.js
@@ -374,7 +374,7 @@ var AboutDialog = function(editorUi)
/**
* Constructs a new filename dialog.
*/
-var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validateFn, content, helpLink, closeOnBtn, cancelFn, hints)
+var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validateFn, content, helpLink, closeOnBtn, cancelFn, hints, w)
{
closeOnBtn = (closeOnBtn != null) ? closeOnBtn : true;
var row, td;
@@ -396,7 +396,7 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat
var nameInput = document.createElement('input');
nameInput.setAttribute('value', filename || '');
nameInput.style.marginLeft = '4px';
- nameInput.style.width = '180px';
+ nameInput.style.width = (w != null) ? w + 'px' : '180px';
var genericBtn = mxUtils.button(buttonText, function()
{
@@ -628,7 +628,8 @@ FilenameDialog.createTypeHint = function(ui, nameInput, hints)
/**
* Constructs a new textarea dialog.
*/
-var TextareaDialog = function(editorUi, title, url, fn, cancelFn, cancelTitle, w, h, addButtons, noHide, noWrap, applyTitle)
+var TextareaDialog = function(editorUi, title, url, fn, cancelFn, cancelTitle, w, h,
+ addButtons, noHide, noWrap, applyTitle, helpLink)
{
w = (w != null) ? w : 300;
h = (h != null) ? h : 120;
@@ -687,6 +688,17 @@ var TextareaDialog = function(editorUi, title, url, fn, cancelFn, cancelTitle, w
td.style.whiteSpace = 'nowrap';
td.setAttribute('align', 'right');
+ if (helpLink != null)
+ {
+ var helpBtn = mxUtils.button(mxResources.get('help'), function()
+ {
+ editorUi.editor.graph.openLink(helpLink);
+ });
+ helpBtn.className = 'geBtn';
+
+ td.appendChild(helpBtn);
+ }
+
var cancelBtn = mxUtils.button(cancelTitle || mxResources.get('cancel'), function()
{
editorUi.hideDialog();
diff --git a/src/main/webapp/js/mxgraph/Format.js b/src/main/webapp/js/mxgraph/Format.js
index 5082bb8c..2d84484f 100644
--- a/src/main/webapp/js/mxgraph/Format.js
+++ b/src/main/webapp/js/mxgraph/Format.js
@@ -3287,7 +3287,7 @@ TextFormatPanel.prototype.addFont = function(container)
{
if (currentTable != null)
{
- graph.selectNode(graph.insertColumn(currentTable, (tableCell != null) ? tableCell.cellIndex : 0));
+ graph.insertColumn(currentTable, (tableCell != null) ? tableCell.cellIndex : 0);
}
}
catch (e)
@@ -3302,7 +3302,7 @@ TextFormatPanel.prototype.addFont = function(container)
{
if (currentTable != null)
{
- graph.selectNode(graph.insertColumn(currentTable, (tableCell != null) ? tableCell.cellIndex + 1 : -1));
+ graph.insertColumn(currentTable, (tableCell != null) ? tableCell.cellIndex + 1 : -1);
}
}
catch (e)
@@ -3332,7 +3332,7 @@ TextFormatPanel.prototype.addFont = function(container)
{
if (currentTable != null && tableRow != null)
{
- graph.selectNode(graph.insertRow(currentTable, tableRow.sectionRowIndex));
+ graph.insertRow(currentTable, tableRow.sectionRowIndex);
}
}
catch (e)
@@ -3347,7 +3347,7 @@ TextFormatPanel.prototype.addFont = function(container)
{
if (currentTable != null && tableRow != null)
{
- graph.selectNode(graph.insertRow(currentTable, tableRow.sectionRowIndex + 1));
+ graph.insertRow(currentTable, tableRow.sectionRowIndex + 1);
}
}
catch (e)
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index f4665af2..e397c4d6 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -107,7 +107,7 @@ ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefin
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(c){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";b=window.location.host;"test.draw.io"!=b&&(a=b.length-7,b=b.lastIndexOf("draw.io",a),-1!==b&&b===a&&(window.DRAWIO_LOG_URL=
"https://log.draw.io"))})();if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);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:"4.0.2",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:"4.0.3",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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg",
@@ -1501,8 +1501,8 @@ mxGraphHandler.prototype.selectDelayed=function(a){this.graph.isCellSelected(thi
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));var g=this.graph.getModel().getParent(this.cell);null==e&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(g,a,f)&&(e=this.graph.getDefaultParent());d=d&&!this.graph.isCellLocked(e||this.graph.getDefaultParent());this.graph.getModel().beginUpdate();try{g=[];if(!d&&null!=e&&this.removeEmptyParents){for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(l=0;l<a.length;l++){var m=
this.graph.model.getParent(a[l]);null==m||k.get(m)||(k.put(m,!0),g.push(m))}}a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);b=[];for(l=0;l<g.length;l++)this.shouldRemoveParent(g[l])&&b.push(g[l]);this.graph.removeCells(b,!1)}finally{this.graph.getModel().endUpdate()}d&&this.graph.setSelectionCells(a);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0])};
-mxGraphHandler.prototype.shouldRemoveParent=function(a){var b=this.graph.view.getState(a);console.log("state",b,this.graph.model.getChildCount(b.cell));return null!=b&&(this.graph.model.isEdge(b.cell)||this.graph.model.isVertex(b.cell))&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)?(a=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),a==mxConstants.NONE&&b==mxConstants.NONE):
-!1};mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};
+mxGraphHandler.prototype.shouldRemoveParent=function(a){var b=this.graph.view.getState(a);return null!=b&&(this.graph.model.isEdge(b.cell)||this.graph.model.isVertex(b.cell))&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)?(a=mxUtils.getValue(b.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),a==mxConstants.NONE&&b==mxConstants.NONE):!1};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};
mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.refreshHandler&&(this.graph.getModel().removeListener(this.refreshHandler),this.refreshHandler=null);this.destroyShapes();this.removeHint()};
function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var b=c.getProperty("eventName"),e=c.getProperty("event");b==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",e)),e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,c){if(this.isPinchEnabled()){var b=
c.getProperty("event");mxEvent.isConsumed(b)||"gesturestart"!=b.type?"gestureend"==b.type&&null!=this.initialScale&&(this.initialScale=null):(this.initialScale=this.graph.view.scale,this.active||null==this.mouseDownEvent||(this.start(this.mouseDownEvent),this.mouseDownEvent=null));if(null!=this.initialScale){var e=Math.round(this.initialScale*b.scale*100)/100;null!=this.minScale&&(e=Math.max(this.minScale,e));null!=this.maxScale&&(e=Math.min(this.maxScale,e));this.graph.view.scale!=e&&(this.graph.zoomTo(e),
@@ -2010,14 +2010,14 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
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":this.defaultGraphOverflow,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,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(b,e){var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes);a.getModel();for(var l=[],u=0;u<d.length;u++)null!=a.view.getState(d[u])&&l.push(d[u]);a.setSelectionCells(l)};
+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(b,e){var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes);a.getModel();for(var l=[],t=0;t<d.length;t++)null!=a.view.getState(d[t])&&l.push(d[t]);a.setSelectionCells(l)};
b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};
OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,d,l,m,r,u,x,A,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var k=e,q=d,n=mxUtils.getDocumentSize(),g=n.height,y=Math.max(1,Math.round((n.width-e-64)/2)),z=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,g-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=g+"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));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";y+=n.x;z+=n.y;l&&document.body.appendChild(this.bg);var t=a.createDiv(x?"geTransDialog":"geDialog");l=this.getPosition(y,z,e,d);y=l.x;z=l.y;t.style.width=
-e+"px";t.style.height=d+"px";t.style.left=y+"px";t.style.top=z+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.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=z+14+"px",m.style.left=y+e+38-f+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
-document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var c=A();null!=c&&(k=e=c.w,q=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";y=Math.max(1,Math.round((c.width-e-64)/2));z=Math.max(1,Math.round((g-d-a.footerHeight)/3));e=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(q,g-64);c=this.getPosition(y,
-z,e,d);y=c.x;z=c.y;t.style.left=y+"px";t.style.top=z+"px";t.style.width=e+"px";t.style.height=d+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=y+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=r;this.container=t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,e,d,l,m,r,t,y,A,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var k=e,p=d,n=mxUtils.getDocumentSize(),g=n.height,x=Math.max(1,Math.round((n.width-e-64)/2)),z=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,g-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=g+"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));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";x+=n.x;z+=n.y;l&&document.body.appendChild(this.bg);var u=a.createDiv(y?"geTransDialog":"geDialog");l=this.getPosition(x,z,e,d);x=l.x;z=l.y;u.style.width=
+e+"px";u.style.height=d+"px";u.style.left=x+"px";u.style.top=z+"px";u.style.zIndex=this.zIndex;u.appendChild(b);document.body.appendChild(u);!t&&b.clientHeight>u.clientHeight-64&&(b.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=z+14+"px",m.style.left=x+e+38-f+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
+document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var c=A();null!=c&&(k=e=c.w,p=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";x=Math.max(1,Math.round((c.width-e-64)/2));z=Math.max(1,Math.round((g-d-a.footerHeight)/3));e=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(p,g-64);c=this.getPosition(x,
+z,e,d);x=c.x;z=c.y;u.style.left=x+"px";u.style.top=z+"px";u.style.width=e+"px";u.style.height=d+"px";!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=x+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=r;this.container=u;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2026,32 +2026,32 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,e,d,l,m,r,u,x,A,c){x=null!=x?x:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);f.appendChild(k)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=c&&c()}),A.className="geBtn",e.appendChild(A));var q=mxUtils.button(d,function(){x&&a.hideDialog();null!=l&&l()});
-q.className="geBtn";e.appendChild(q);null!=r&&(d=mxUtils.button(r,function(){x&&a.hideDialog();null!=u&&u()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){q.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||A.checked,d=parseInt(f.value)/100;isNaN(d)&&(d=1,f.value="100%");var d=.75*d,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/e.pageScale;if(b){var t=u.checked?1:parseInt(c.value);isNaN(t)||(q=mxUtils.getScaleForPageCount(t,e,k))}e.getGraphBounds();var l=t=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);q*=d;!b&&e.pageVisible?(d=e.getPageLayout(),t-=d.x*k.width,l-=d.y*k.height):
-b=!0;b=PrintDialog.createPrintPreview(e,q,k,0,t,l,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,l,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var r=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";l.appendChild(u);var x=document.createElement("span");mxUtils.write(x," "+mxResources.get("fitPage"));
-l.appendChild(x);mxEvent.addListener(x,"click",function(a){u.checked=!u.checked;A.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){A.checked=!u.checked});d.appendChild(l);r.appendChild(d);d=d.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(A);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("posterPrint")+":");l.appendChild(x);mxEvent.addListener(x,
-"click",function(a){A.checked=!A.checked;u.checked=!A.checked;mxEvent.consume(a)});d.appendChild(l);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(c);mxUtils.write(l," "+mxResources.get("pages")+" (max)");d.appendChild(l);r.appendChild(d);mxEvent.addListener(A,"change",
-function(){A.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");u.checked=!A.checked});d=d.cloneNode(!1);l=document.createElement("td");mxUtils.write(l,mxResources.get("pageScale")+":");d.appendChild(l);l=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";l.appendChild(f);d.appendChild(l);r.appendChild(d);d=document.createElement("tr");l=document.createElement("td");l.colSpan=2;
-l.style.paddingTop="20px";l.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});x.className="geBtn";a.editor.cancelFirst&&l.appendChild(x);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});k.className="geBtn";l.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||
-l.appendChild(x);d.appendChild(l);r.appendChild(d);m.appendChild(r);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
-PrintDialog.createPrintPreview=function(a,b,e,d,l,m,r){b=new mxPrintPreview(a,b,e,d,l,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=r;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.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};
+var ErrorDialog=function(a,b,e,d,l,m,r,t,y,A,c){y=null!=y?y:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);f.appendChild(k)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=c&&c()}),A.className="geBtn",e.appendChild(A));var p=mxUtils.button(d,function(){y&&a.hideDialog();null!=l&&l()});
+p.className="geBtn";e.appendChild(p);null!=r&&(d=mxUtils.button(r,function(){y&&a.hideDialog();null!=t&&t()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){p.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var b=t.checked||A.checked,d=parseInt(f.value)/100;isNaN(d)&&(d=1,f.value="100%");var d=.75*d,k=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/e.pageScale;if(b){var u=t.checked?1:parseInt(c.value);isNaN(u)||(p=mxUtils.getScaleForPageCount(u,e,k))}e.getGraphBounds();var l=u=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);p*=d;!b&&e.pageVisible?(d=e.getPageLayout(),u-=d.x*k.width,l-=d.y*k.height):
+b=!0;b=PrintDialog.createPrintPreview(e,p,k,0,u,l,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,l,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var r=document.createElement("tbody");d=document.createElement("tr");var t=document.createElement("input");t.setAttribute("type","checkbox");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";l.appendChild(t);var y=document.createElement("span");mxUtils.write(y," "+mxResources.get("fitPage"));
+l.appendChild(y);mxEvent.addListener(y,"click",function(a){t.checked=!t.checked;A.checked=!t.checked;mxEvent.consume(a)});mxEvent.addListener(t,"change",function(){A.checked=!t.checked});d.appendChild(l);r.appendChild(d);d=d.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(A);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("posterPrint")+":");l.appendChild(y);mxEvent.addListener(y,
+"click",function(a){A.checked=!A.checked;t.checked=!A.checked;mxEvent.consume(a)});d.appendChild(l);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(c);mxUtils.write(l," "+mxResources.get("pages")+" (max)");d.appendChild(l);r.appendChild(d);mxEvent.addListener(A,"change",
+function(){A.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");t.checked=!A.checked});d=d.cloneNode(!1);l=document.createElement("td");mxUtils.write(l,mxResources.get("pageScale")+":");d.appendChild(l);l=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";l.appendChild(f);d.appendChild(l);r.appendChild(d);d=document.createElement("tr");l=document.createElement("td");l.colSpan=2;
+l.style.paddingTop="20px";l.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst&&l.appendChild(y);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});k.className="geBtn";l.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||
+l.appendChild(y);d.appendChild(l);r.appendChild(d);m.appendChild(r);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
+PrintDialog.createPrintPreview=function(a,b,e,d,l,m,r){b=new mxPrintPreview(a,b,e,d,l,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=r;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var t=b.writeHead;b.writeHead=function(a){t.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(A.style.backgroundColor="",A.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(A.style.backgroundColor=c,A.style.backgroundImage="")}function e(){null==q?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",q.src),k.style.fontSize="11px",k.innerHTML=q.src.substring(0,42)+"...")}var d=a.editor.graph,l,m,r=document.createElement("table");r.style.width=
-"100%";r.style.height="100%";var u=document.createElement("tbody");l=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");l.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var x=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");
+var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(A.style.backgroundColor="",A.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(A.style.backgroundColor=c,A.style.backgroundImage="")}function e(){null==p?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",p.src),k.style.fontSize="11px",k.innerHTML=p.src.substring(0,42)+"...")}var d=a.editor.graph,l,m,r=document.createElement("table");r.style.width=
+"100%";r.style.height="100%";var t=document.createElement("tbody");l=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");l.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var y=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);l.appendChild(m);t.appendChild(l);l=document.createElement("tr");m=document.createElement("td");
mxUtils.write(m,mxResources.get("background")+":");l.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var A=document.createElement("button");A.style.width="18px";A.style.height="18px";A.style.marginRight="20px";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(A,"click",function(f){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(f)});
-m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=d.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?d.getGridSize():a)});l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
-":");l.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var q=d.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){q=a;e()});mxEvent.consume(c)});e();m.appendChild(k);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==f.value&&d.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,c,q,x.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=q?q.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&&
-b.ignoreColor&&b.ignoreImage||d.model.execute(b)});g.className="geBtn gePrimaryBtn";m.appendChild(g);a.editor.cancelFirst||m.appendChild(n);l.appendChild(m);u.appendChild(l);r.appendChild(u);this.container=r};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function l(a,b,d){if(d||f!=document.activeElement&&k!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],t?"custom"==d.key&&(u.value=d.key,t=!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?(u.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,r.removeAttribute("checked"),r.defaultChecked=!1,r.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(u.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,r.setAttribute("checked","checked"),r.defaultChecked=!0,a=r.checked=!0));a?(x.style.display="",c.style.display="none"):(f.value=e.width/100,k.value=e.height/100,m.setAttribute("checked","checked"),
-u.value="custom",x.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var r=document.createElement("input");r.setAttribute("name",b);r.setAttribute("type","radio");r.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var x=document.createElement("div");x.style.marginLeft="4px";x.style.width="210px";
-x.style.height="24px";m.style.marginRight="6px";x.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));x.appendChild(b);r.style.marginLeft="10px";r.style.marginRight="6px";x.appendChild(r);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));x.appendChild(A);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");x.style.display="none";c.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var y=n[g];q[y.key]=y;var z=document.createElement("option");z.setAttribute("value",y.key);mxUtils.write(z,y.title);u.appendChild(z)}var t=!1;l();a.appendChild(u);mxUtils.br(a);
-a.appendChild(x);a.appendChild(c);var F=e,v=function(a,b){var g=q[u.value];null!=g.format?(f.value=g.format.width/100,k.value=g.format.height/100,c.style.display="none",x.style.display=""):(x.style.display="none",c.style.display="");g=parseFloat(f.value);if(isNaN(g)||0>=g)f.value=e.width/100;g=parseFloat(k.value);if(isNaN(g)||0>=g)k.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(k.value)));"custom"!=u.value&&r.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&t||g.width==F.width&&g.height==F.height||(F=g,null!=d&&d(F))};mxEvent.addListener(b,"click",function(a){m.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){r.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",v);mxEvent.addListener(f,"click",v);mxEvent.addListener(k,"blur",v);mxEvent.addListener(k,"click",v);mxEvent.addListener(r,"change",v);mxEvent.addListener(m,"change",v);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
+m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=d.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?d.getGridSize():a)});l.appendChild(m);t.appendChild(l);l=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
+":");l.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var p=d.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){p=a;e()});mxEvent.consume(c)});e();m.appendChild(k);l.appendChild(m);t.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==f.value&&d.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,c,p,y.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=p?p.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&&
+b.ignoreColor&&b.ignoreImage||d.model.execute(b)});g.className="geBtn gePrimaryBtn";m.appendChild(g);a.editor.cancelFirst||m.appendChild(n);l.appendChild(m);t.appendChild(l);r.appendChild(t);this.container=r};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function l(a,b,d){if(d||f!=document.activeElement&&k!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],u?"custom"==d.key&&(t.value=d.key,u=!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?(t.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,r.removeAttribute("checked"),r.defaultChecked=!1,r.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(t.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,r.setAttribute("checked","checked"),r.defaultChecked=!0,a=r.checked=!0));a?(y.style.display="",c.style.display="none"):(f.value=e.width/100,k.value=e.height/100,m.setAttribute("checked","checked"),
+t.value="custom",y.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var r=document.createElement("input");r.setAttribute("name",b);r.setAttribute("type","radio");r.setAttribute("value","landscape");var t=document.createElement("select");t.style.marginBottom="8px";t.style.width="202px";var y=document.createElement("div");y.style.marginLeft="4px";y.style.width="210px";
+y.style.height="24px";m.style.marginRight="6px";y.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));y.appendChild(b);r.style.marginLeft="10px";r.style.marginRight="6px";y.appendChild(r);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));y.appendChild(A);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input");
+f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");y.style.display="none";c.style.display="none";for(var p={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var x=n[g];p[x.key]=x;var z=document.createElement("option");z.setAttribute("value",x.key);mxUtils.write(z,x.title);t.appendChild(z)}var u=!1;l();a.appendChild(t);mxUtils.br(a);
+a.appendChild(y);a.appendChild(c);var F=e,v=function(a,b){var g=p[t.value];null!=g.format?(f.value=g.format.width/100,k.value=g.format.height/100,c.style.display="none",y.style.display=""):(y.style.display="none",c.style.display="");g=parseFloat(f.value);if(isNaN(g)||0>=g)f.value=e.width/100;g=parseFloat(k.value);if(isNaN(g)||0>=g)k.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(k.value)));"custom"!=t.value&&r.checked&&(g=new mxRectangle(0,0,
+g.height,g.width));b&&u||g.width==F.width&&g.height==F.height||(F=g,null!=d&&d(F))};mxEvent.addListener(b,"click",function(a){m.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){r.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",v);mxEvent.addListener(f,"click",v);mxEvent.addListener(k,"blur",v);mxEvent.addListener(k,"click",v);mxEvent.addListener(r,"change",v);mxEvent.addListener(m,"change",v);mxEvent.addListener(t,"change",function(a){u="custom"==t.value;
v(a,!0)});v();return{set:function(a){e=a;l(null,null,!0)},get:function(){return F},widthInput:f,heightInput:k}};
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}]};
@@ -2063,8 +2063,8 @@ c="url("+this.gridImage+")";var k=d=0;null!=a.view.backgroundPageShape&&(k=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],f=1;f<this.gridSteps;f++){var k=f*b;c.push("M 0 "+k+" L "+d+" "+k+" M "+k+" 0 L "+k+" "+d)}return'<svg width="'+
d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,f=this.view.translate,k=this.pageFormat,e=c*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;d=n.height;var g=
-new mxRectangle(c*f.x,c*f.y,k.width*e,k.height*e),y=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,l=a?Math.ceil(b/g.width)-1:0,t=n.x+b,u=n.y+d;null==this.horizontalPageBreaks&&0<y&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<l&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?y:l,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(f+1)*g.height)),
-new mxPoint(Math.round(t),Math.round(n.y+(f+1)*g.height))]:[new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(u))];null!=a[f]?(a[f].points=b,a[f].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[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+new mxRectangle(c*f.x,c*f.y,k.width*e,k.height*e),x=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,l=a?Math.ceil(b/g.width)-1:0,u=n.x+b,t=n.y+d;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<l&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:l,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(f+1)*g.height)),
+new mxPoint(Math.round(u),Math.round(n.y+(f+1)*g.height))]:[new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*g.width),Math.round(t))];null!=a[f]?(a[f].points=b,a[f].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[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,e){for(var c=0;c<d.length;c++)if(this.graph.getModel().isVertex(d[c])){var f=this.graph.getCellGeometry(d[c]);if(null!=f&&f.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(b,d){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,f=this.graph.pageScale,k=c.width*f,c=c.height*f,f=Math.floor(Math.min(0,b)/k),e=Math.floor(Math.min(0,
d)/c);return new mxRectangle(this.scale*(this.translate.x+f*k),this.scale*(this.translate.y+e*c),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/k)-f)*k,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/c)-e)*c)};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=
@@ -2076,24 +2076,24 @@ this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=
l,this.toolbarContainer.onselectstart=l,this.toolbarContainer.onmousedown=l,this.diagramContainer.onselectstart=l,this.diagramContainer.onmousedown=l,this.sidebarContainer.onselectstart=l,this.sidebarContainer.onmousedown=l,this.formatContainer.onselectstart=l,this.formatContainer.onmousedown=l,this.footerContainer.onselectstart=l,this.footerContainer.onmousedown=l,null!=this.tabContainer&&(this.tabContainer.onselectstart=l));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var c=
mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return l(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 m=!1,r=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return m||r.apply(this,
-arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var u=d.panningHandler.isForcePanningEvent;
-d.panningHandler.isForcePanningEvent=function(a){return u.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 x=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return x.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 A=!1,c=null,f=null,k=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&A!=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==k)this.toolbar.createTextToolbar();else{for(var g=0;g<k.length;g++)this.toolbar.container.appendChild(k[g]);this.toolbar.fontMenu=
-c;this.toolbar.sizeMenu=f}A=d.cellEditor.isContentEditing();c=a;f=e;k=b}}),n=this,g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){g.apply(this,arguments);q();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!=n.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-
-1)&&(b=b.substring(0,b.length-1));n.toolbar.setFontName(b);n.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 y=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){y.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor=
-"default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(J){}var z=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();z.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=
-this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),F="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var b=a.clone();b.style="";var f=d.getCellStyle(b);a=[];var b=[],k;for(k in c.style)f[k]!=c.style[k]&&(a.push(c.style[k]),b.push(k));for(var e=d.getModel().getStyle(c.cell),g=null!=e?e.split(";"):
-[],e=0;e<g.length;e++){var n=g[e],p=n.indexOf("=");if(0<=p){k=n.substring(0,p);var q=n.substring(p+1);null!=f[k]&&"none"==q&&(a.push(q),b.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[c.cell]))}}catch(D){this.handleError(D)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]))};var v=["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),p=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<p.length;a++)for(b=0;b<p[a].length;b++)t.push(p[a][b]);for(a=0;a<F.length;a++)0>mxUtils.indexOf(t,F[a])&&t.push(F[a]);
-var C=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(n),k=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var g=k[f[e]];null!=g&&d.setCellStyles(f[e],g,a)}else for(g=0;g<a.length;g++){for(var n=a[g],q=b.getStyle(n),C=null!=q?q.split(";"):[],D=t.slice(),e=0;e<C.length;e++){var y=C[e],l=y.indexOf("=");if(0<=l){var J=y.substring(0,l),z=mxUtils.indexOf(D,J);0<=z&&D.splice(z,1);for(var v=0;v<p.length;v++){var m=p[v];if(0<=
-mxUtils.indexOf(m,J))for(var u=0;u<m.length;u++){var r=mxUtils.indexOf(D,m[u]);0<=r&&D.splice(r,1)}}}}for(var k=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,Q=b.getStyle(n),e=0;e<D.length;e++){var J=D[e],x=k[J];null==x||"shape"==J&&!f||f&&!(0>mxUtils.indexOf(F,J))||(Q=mxUtils.setStyle(Q,J,x))}b.setStyle(n,Q)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){C(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){C(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));C(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,k=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(k=d.getModel().isEdge(b[e])||k)||!f);e++);else k=f=!0;for(var b=c.getProperty("keys"),g=c.getProperty("values"),e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(v,b[e]);if("strokeColor"!=b[e]||null!=g[e]&&"none"!=
-g[e])if(0<=mxUtils.indexOf(F,b[e]))k||0<=mxUtils.indexOf(E,b[e])?null==g[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=g[e]:f&&0<=mxUtils.indexOf(t,b[e])&&(null==g[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=g[e]);else if(0<=mxUtils.indexOf(t,b[e])){if(f||n)null==g[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=g[e];if(k||n||0<=mxUtils.indexOf(E,b[e]))null==g[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=g[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(m=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var t=d.panningHandler.isForcePanningEvent;
+d.panningHandler.isForcePanningEvent=function(a){return t.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 y=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return y.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 A=!1,c=null,f=null,k=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&A!=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==k)this.toolbar.createTextToolbar();else{for(var g=0;g<k.length;g++)this.toolbar.container.appendChild(k[g]);this.toolbar.fontMenu=
+c;this.toolbar.sizeMenu=f}A=d.cellEditor.isContentEditing();c=a;f=e;k=b}}),n=this,g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){g.apply(this,arguments);p();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=n.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-
+1)&&(f=f.substring(0,f.length-1));n.toolbar.setFontName(f);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){x.apply(this,arguments);p()};d.container.setAttribute("tabindex","0");d.container.style.cursor=
+"default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(J){}var z=d.fireMouseEvent;d.fireMouseEvent=function(a,c,f){a==mxEvent.MOUSE_DOWN&&this.container.focus();z.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,f){this.menus.createPopupMenu(a,c,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=
+this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),F="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],k;for(k in c.style)b[k]!=c.style[k]&&(a.push(c.style[k]),f.push(k));for(var e=d.getModel().getStyle(c.cell),g=null!=e?e.split(";"):
+[],e=0;e<g.length;e++){var n=g[e],q=n.indexOf("=");if(0<=q){k=n.substring(0,q);var p=n.substring(q+1);null!=b[k]&&"none"==p&&(a.push(p),f.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",a,"cells",[c.cell]))}}catch(D){this.handleError(D)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged",
+"keys",[],"values",[],"cells",[]))};var v=["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),q=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<q.length;a++)for(b=0;b<q[a].length;b++)u.push(q[a][b]);for(a=0;a<F.length;a++)0>mxUtils.indexOf(u,F[a])&&u.push(F[a]);
+var C=function(a,c){var f=d.getModel();f.beginUpdate();try{if(c)for(var b=f.isEdge(n),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],e=0;e<b.length;e++){var g=k[b[e]];null!=g&&d.setCellStyles(b[e],g,a)}else for(g=0;g<a.length;g++){for(var n=a[g],p=f.getStyle(n),C=null!=p?p.split(";"):[],D=u.slice(),e=0;e<C.length;e++){var x=C[e],l=x.indexOf("=");if(0<=l){var J=x.substring(0,l),z=mxUtils.indexOf(D,J);0<=z&&D.splice(z,1);for(var v=0;v<q.length;v++){var m=q[v];if(0<=
+mxUtils.indexOf(m,J))for(var t=0;t<m.length;t++){var r=mxUtils.indexOf(D,m[t]);0<=r&&D.splice(r,1)}}}}for(var k=(b=f.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,P=f.getStyle(n),e=0;e<D.length;e++){var J=D[e],y=k[J];null==y||"shape"==J&&!b||b&&!(0>mxUtils.indexOf(F,J))||(P=mxUtils.setStyle(P,J,y))}f.setStyle(n,P)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){C(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){C(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));C(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,k=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(k=d.getModel().isEdge(f[e])||k)||!b);e++);else k=b=!0;for(var f=c.getProperty("keys"),g=c.getProperty("values"),e=0;e<f.length;e++){var n=0<=mxUtils.indexOf(v,f[e]);if("strokeColor"!=f[e]||null!=g[e]&&"none"!=
+g[e])if(0<=mxUtils.indexOf(F,f[e]))k||0<=mxUtils.indexOf(E,f[e])?null==g[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=g[e]:b&&0<=mxUtils.indexOf(u,f[e])&&(null==g[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=g[e]);else if(0<=mxUtils.indexOf(u,f[e])){if(b||n)null==g[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=g[e];if(k||n||0<=mxUtils.indexOf(E,f[e]))null==g[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=g[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.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),f=d.getView().getState(d.getSelectionCell());null!=f&&(a=f.style[mxConstants.STYLE_FONTFAMILY]||a,c=f.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);
+this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var f=c.getProperty("cells"),b=c.getProperty("parent");d.getModel().isLayer(b)&&!d.isCellVisible(b)&&null!=f&&0<f.length&&d.getModel().setVisible(b,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,
"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();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=40;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;
@@ -2110,31 +2110,31 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var 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 l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);a.updatePasteActionStates()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,f,d){if(null!=a.container){f=null!=f?f:0;d=null!=d?d:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),k=mxUtils.hasScrollbars(a.container),g=a.view.translate,n=a.view.scale,p=mxRectangle.fromRectangle(e);
-p.x=p.x/n-g.x;p.y=p.y/n-g.y;p.width/=n;p.height/=n;var g=a.container.scrollTop,q=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var D=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,D/p.width)):n;b=(D-c*p.width)/2/c;var C=0==this.lightboxVerticalDivider?0:(t-c*p.height)/this.lightboxVerticalDivider/c;k&&(b=Math.max(b,0),C=Math.max(C,0));if(k||e.width<D||e.height<t)a.view.scaleAndTranslate(c,
-Math.floor(b-p.x),Math.floor(C-p.y)),a.container.scrollTop=g*c/n,a.container.scrollLeft=q*c/n;else if(0!=f||0!=d)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+f/n),Math.floor(e.y+d/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",
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,b,d){if(null!=a.container){b=null!=b?b:0;d=null!=d?d:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),k=mxUtils.hasScrollbars(a.container),g=a.view.translate,n=a.view.scale,q=mxRectangle.fromRectangle(e);
+q.x=q.x/n-g.x;q.y=q.y/n-g.y;q.width/=n;q.height/=n;var g=a.container.scrollTop,p=a.container.scrollLeft,C=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)C+=3;var D=a.container.offsetWidth-C,C=a.container.offsetHeight-C;c=c?Math.max(.3,Math.min(f||1,D/q.width)):n;f=(D-c*q.width)/2/c;var u=0==this.lightboxVerticalDivider?0:(C-c*q.height)/this.lightboxVerticalDivider/c;k&&(f=Math.max(f,0),u=Math.max(u,0));if(k||e.width<D||e.height<C)a.view.scaleAndTranslate(c,
+Math.floor(f-q.x),Math.floor(u-q.y)),a.container.scrollTop=g*c/n,a.container.scrollLeft=p*c/n;else if(0!=b||0!=d)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+b/n),Math.floor(e.y+d/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){var l=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);
-this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var r=0,m=mxUtils.bind(this,function(a,c,b){r++;var f=document.createElement("span");f.style.paddingLeft="8px";f.style.paddingRight="8px";f.style.cursor="pointer";mxEvent.addListener(f,"click",a);null!=b&&f.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",
-c);f.appendChild(a);this.chromelessToolbar.appendChild(f);return f});null!=l.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=l.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),x=document.createElement("div");x.style.display="inline-block";x.style.verticalAlign="top";x.style.fontFamily=
-"Helvetica,Arial";x.style.marginTop="8px";x.style.fontSize="14px";x.style.color="#ffffff";this.chromelessToolbar.appendChild(x);var A=m(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&&(x.innerHTML="",mxUtils.write(x,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";
-u.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",u.style.display="",x.style.display="inline-block"):(A.style.display="none",u.style.display="none",x.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,
-mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var k=null,q=null,n=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),
-fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);k=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||
-30)});if("1"==urlParams.layers){this.layersDialog=null;var y=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=y.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")),z=a.getModel();z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
-a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var t=this.lightboxToolbarActions[f];m(t.fn,t.icon,t.tooltip)}null!=l.refreshBtn&&m(mxUtils.bind(this,function(a){l.refreshBtn.url?window.location.href=l.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=l.fullscreenBtn&&
+this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var r=0,m=mxUtils.bind(this,function(a,c,f){r++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=f&&b.setAttribute("title",f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",
+c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=l.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=l.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var t=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),y=document.createElement("div");y.style.display="inline-block";y.style.verticalAlign="top";y.style.fontFamily=
+"Helvetica,Arial";y.style.marginTop="8px";y.style.fontSize="14px";y.style.color="#ffffff";this.chromelessToolbar.appendChild(y);var A=m(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&&(y.innerHTML="",mxUtils.write(y,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});t.style.paddingLeft="0px";
+t.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",t.style.display="",y.style.display="inline-block"):(A.style.display="none",t.style.display="none",y.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,
+mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var k=null,p=null,n=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),
+fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);k=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||
+30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
+"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),z=a.getModel();z.addListener(mxEvent.CHANGE,function(){x.style.display=1<z.getChildCount(z.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
+a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var u=this.lightboxToolbarActions[f];m(u.fn,u.icon,u.tooltip)}null!=l.refreshBtn&&m(mxUtils.bind(this,function(a){l.refreshBtn.url?window.location.href=l.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=l.fullscreenBtn&&
window.self!==window.top&&m(mxUtils.bind(this,function(c){l.fullscreenBtn.url?a.openLink(l.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(l.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,function(a){"1"==urlParams.close||l.closeBtn?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)||g(30),n())}));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)?n():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var F=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)<F&&Math.abs(this.scrollTop-a.container.scrollTop)<F&&Math.abs(this.startX-b.getGraphX())<F&&Math.abs(this.startY-b.getGraphY())<F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=
-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}v.apply(this,arguments)};var E=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),f=this.getPageSize(),d=Math.ceil(2*b.x+c.width*
-f.width),e=Math.ceil(2*b.y+c.height*f.height),k=a.minimumGraphSize;if(null==k||k.width!=d||k.height!=e)a.minimumGraphSize=new mxRectangle(0,0,d,e);d=b.x-c.x*f.width;b=b.y-c.y*f.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==b?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,f=a.view.translate.y,a.view.setTranslate(d,b),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((b-f)*a.view.scale),
-this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var p=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*
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var F=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=
+f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<F&&Math.abs(this.scrollTop-a.container.scrollTop)<F&&Math.abs(this.startX-f.getGraphX())<F&&Math.abs(this.startY-f.getGraphY())<F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=
+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}v.apply(this,arguments)};var E=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*f.x+c.width*
+b.width),e=Math.ceil(2*f.y+c.height*b.height),k=a.minimumGraphSize;if(null==k||k.width!=d||k.height!=e)a.minimumGraphSize=new mxRectangle(0,0,d,e);d=f.x-c.x*b.width;f=f.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==f?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,f),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((f-b)*a.view.scale),
+this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var q=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),
-f=0,d=0;null!=p&&(f=a.container.offsetWidth/2-p.x+c.x,d=a.container.offsetHeight/2-p.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,f*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==d||(a.container.scrollLeft-=f*(this.cumulativeZoomFactor-1),a.container.scrollTop-=d*(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 f=mxEvent.getSource(c);null!=f;){if(f==a.container)return p=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(b),mxEvent.consume(c),!1;f=f.parentNode}}),a.container)};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+f=0,d=0;null!=q&&(f=a.container.offsetWidth/2-q.x+c.x,d=a.container.offsetHeight/2-q.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,f*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==d||(a.container.scrollLeft-=f*(this.cumulativeZoomFactor-1),a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};
+mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var b=mxEvent.getSource(c);null!=b;){if(b==a.container)return q=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),mxEvent.consume(c),!1;b=b.parentNode}}),a.container)};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
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))};
@@ -2166,12 +2166,12 @@ this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell(
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 l=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),r=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",r+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",r+=this.toolbarHeight);0<r&&!mxClient.IS_QUIRKS&&(r+=1);var u=0;if(null!=this.sidebarFooterContainer){var x=
-this.footerHeight+l,u=Math.max(0,Math.min(d-r-x,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=x+"px"}x=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=r+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=r+"px";this.formatContainer.style.width=x+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),r=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",r+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",r+=this.toolbarHeight);0<r&&!mxClient.IS_QUIRKS&&(r+=1);var t=0;if(null!=this.sidebarFooterContainer){var y=
+this.footerHeight+l,t=Math.max(0,Math.min(d-r-y,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=t+"px";this.sidebarFooterContainer.style.bottom=y+"px"}y=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=r+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=r+"px";this.formatContainer.style.width=y+"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+l+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=
-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-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-x)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=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+l+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px"),this.diagramContainer.style.right=x+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),
-this.sidebarContainer.style.bottom=this.footerHeight+u+l+"px",this.formatContainer.style.bottom=this.footerHeight+l+"px",this.diagramContainer.style.bottom=this.footerHeight+l+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+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-t+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-y)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,t=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+l+"px",t-=this.tabContainer.clientHeight),this.diagramContainer.style.height=t+"px",this.hsplit.style.height=t+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px"),this.diagramContainer.style.right=y+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),
+this.sidebarContainer.style.bottom=this.footerHeight+t+l+"px",this.formatContainer.style.bottom=this.footerHeight+l+"px",this.diagramContainer.style.bottom=this.footerHeight+l+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};
@@ -2180,10 +2180,10 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function l(a){if(null!=r){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?f.x-r.x:r.y-f.y)-e));mxEvent.consume(a);u!=c()&&(x=!0,A=null)}}function m(a){l(a);r=u=null}var r=null,u=null,x=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=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){r=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));u=c();x=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!x&&this.hsplitClickEnabled){var b=null!=A?A-e:0;A=c();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function l(a){if(null!=r){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,t+(b?f.x-r.x:r.y-f.y)-e));mxEvent.consume(a);t!=c()&&(y=!0,A=null)}}function m(a){l(a);r=t=null}var r=null,t=null,y=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=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){r=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));t=c();y=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!y&&this.hsplitClickEnabled){var f=null!=A?A-e:0;A=c();d(f);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})};
EditorUi.prototype.handleError=function(a,b,e,d,l){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(l=mxUtils.htmlEntities(a.message));this.showError(b,l,m,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(a,b,e,d,l,m,r,u,x,A,c,f,k){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,l,m,r,f,u,x);this.showDialog(a.container,A||340,c||(null!=b&&120<b.length?180:150),!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,l,m,r,u,x,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,l,m,r,u,x,A);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(a,b,e,d,l,m,r,t,y,A,c,f,k){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,l,m,r,f,t,y);this.showDialog(a.container,A||340,c||(null!=b&&120<b.length?180:150),!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,l,m,r,t,y,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,l,m,r,t,y,A);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),l=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,l,!0,!1);m.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
@@ -2199,10 +2199,10 @@ EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bin
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){r.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),e=0;e<f.length;e++)if(d.getModel().isVertex(f[e])&&d.isCellResizable(f[e])){var k=d.getCellGeometry(f[e]);null!=k&&(k=k.clone(),37==a?k.width=Math.max(0,k.width-c):38==a?k.height=Math.max(0,k.height-c):39==a?k.width+=c:40==a&&(k.height+=c),d.getModel().setGeometry(f[e],k))}}finally{d.getModel().endUpdate()}}else f=
-d.getSelectionCell(),e=d.model.getParent(f),k=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(k=d.layoutManager.getLayout(e)),null!=k&&k.constructor==mxStackLayout?(k=e.getIndex(f),37==a||38==a?d.model.add(e,f,Math.max(0,k-1)):39!=a&&40!=a||d.model.add(e,f,Math.min(d.model.getChildCount(e),k+1))):(e=f=0,37==a?f=-c:38==a?e=-c:39==a?f=c:40==a&&(e=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,e))});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<
+d.getSelectionCell(),e=d.model.getParent(f),k=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(k=d.layoutManager.getLayout(e)),null!=k&&k.constructor==mxStackLayout?(k=e.getIndex(f),37==a||38==a?d.model.add(e,f,Math.max(0,k-1)):39!=a&&40!=a||d.model.add(e,f,Math.min(d.model.getChildCount(e),k+1))):(e=f=0,37==a?f=-c:38==a?e=-c:39==a?f=c:40==a&&(e=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,e))});null!=t&&window.clearTimeout(t);t=window.setTimeout(function(){if(0<
r.length){d.getModel().beginUpdate();try{for(var a=0;a<r.length;a++)r[a]();r=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,l=new mxKeyHandler(d),m=l.isEventIgnored;l.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)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var r=[],u=null,x={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
-mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=x[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(),x[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
+!mxClient.IS_SF)&&m.apply(this,arguments)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var r=[],t=null,y={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
+mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=y[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(),y[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 A.apply(this,arguments)};l.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?l.bindControlShiftKey(a,b):l.bindControlKey(a,b):d?l.bindShiftKey(a,b):l.bindKey(a,b))});var c=l.escape;l.escape=function(a){c.apply(this,arguments)};l.enter=function(){};l.bindControlShiftKey(36,function(){d.exitGroup()});l.bindControlShiftKey(35,function(){d.enterGroup()});l.bindKey(36,function(){d.home()});l.bindKey(35,function(){d.refresh()});l.bindAction(107,!0,"zoomIn");l.bindAction(109,!0,"zoomOut");l.bindAction(80,!0,"print");l.bindAction(79,
!0,"outline",!0);l.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)l.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),l.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),l.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),l.bindAction(8,!1,"delete"),l.bindAction(8,!0,"deleteAll"),l.bindAction(46,!1,"delete"),l.bindAction(46,!0,"deleteAll"),l.bindAction(72,!0,"resetView"),l.bindAction(72,
@@ -2216,25 +2216,25 @@ Date.now||(Date.now=function(){return(new Date).getTime()});mxConstants.SHADOW_O
mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
mxShape.prototype.getConstraints=function(a,b,e){return null};
Graph=function(a,b,e,d,l){mxGraph.call(this,a,b,e,d);this.themes=l||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 null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var m=null,r=null,u=null,x=null,A=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var b=c.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()),A=this.isCellSelected(f.cell),u=
-f,r=b,null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,b.getGraphX(),b.getGraphY())?x=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(x=f.getHandleForEvent(b))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,c){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(c.getEvent())&&
-!mxEvent.isShiftDown(c.getEvent())&&!mxEvent.isAltDown(c.getEvent()))if(f=this.tolerance,null!=m&&null!=u&&null!=r){if(b=u,Math.abs(m.x-c.getGraphX())>f||Math.abs(m.y-c.getGraphY())>f){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var d=this.selectionCellsHandler.getHandler(b.cell);if(null!=d&&null!=d.bends&&0<d.bends.length){var e=d.getHandleForEvent(r),k=this.view.getEdgeStyle(b);f=k==mxEdgeStyle.EntityRelation;A||x!=mxEvent.LABEL_HANDLE||(e=x);if(f&&0!=e&&e!=d.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==d.bends.length-1||null!=b.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=b.absolutePoints,null!=f&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=x,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=d.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)),d.start(c.getGraphX(),c.getGraphX(),e),x=m=r=u=null,A=!1,c.consume(),this.graphHandler.reset()}}}else if(b=c.getState(),null!=b&&this.model.isEdge(b.cell)){d=null;f=b.absolutePoints;if(null!=f)if(e=new mxRectangle(c.getGraphX(),
-c.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,c.getGraphX(),c.getGraphY()))d="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))d="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)k=this.view.getEdgeStyle(b),d="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(k=mxUtils.findNearestSegment(b,c.getGraphX(),c.getGraphY()),
-k<f.length-1&&0<=k&&(d=0==Math.round(f[k].x-f[k+1].x)?"col-resize":"row-resize"));null!=d&&b.setCursor(d)}}),mouseUp:mxUtils.bind(this,function(a,c){x=m=r=u=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);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var m=null,r=null,t=null,y=null,A=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var f=c.getProperty("event");if(!mxEvent.isControlDown(f.getEvent())&&!mxEvent.isShiftDown(f.getEvent())){var b=f.getState();null!=b&&this.model.isEdge(b.cell)&&(m=new mxPoint(f.getGraphX(),f.getGraphY()),A=this.isCellSelected(b.cell),t=
+b,r=f,null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,f.getGraphX(),f.getGraphY())?y=mxEvent.LABEL_HANDLE:(b=this.selectionCellsHandler.getHandler(b.cell),null!=b&&null!=b.bends&&0<b.bends.length&&(y=b.getHandleForEvent(f))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,c){var f=this.selectionCellsHandler.handlers.map,b;for(b in f)if(null!=f[b].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&
+!mxEvent.isShiftDown(c.getEvent())&&!mxEvent.isAltDown(c.getEvent()))if(b=this.tolerance,null!=m&&null!=t&&null!=r){if(f=t,Math.abs(m.x-c.getGraphX())>b||Math.abs(m.y-c.getGraphY())>b){this.isCellSelected(f.cell)||this.setSelectionCell(f.cell);var d=this.selectionCellsHandler.getHandler(f.cell);if(null!=d&&null!=d.bends&&0<d.bends.length){var e=d.getHandleForEvent(r),k=this.view.getEdgeStyle(f);b=k==mxEdgeStyle.EntityRelation;A||y!=mxEvent.LABEL_HANDLE||(e=y);if(b&&0!=e&&e!=d.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!b||
+null==f.visibleSourceState&&null==f.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=f.visibleSourceState||e==d.bends.length-1||null!=f.visibleTargetState)b||e==mxEvent.LABEL_HANDLE||(b=f.absolutePoints,null!=b&&(null==k&&null==e||k==mxEdgeStyle.OrthConnector)&&(e=y,null==e&&(e=new mxRectangle(m.x,m.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,b[0].x,b[0].y)?e=0:mxUtils.contains(e,b[b.length-1].x,b[b.length-1].y)?
+e=d.bends.length-1:null!=k&&(2==b.length||3==b.length&&(0==Math.round(b[0].x-b[1].x)&&0==Math.round(b[1].x-b[2].x)||0==Math.round(b[0].y-b[1].y)&&0==Math.round(b[1].y-b[2].y)))?e=2:(e=mxUtils.findNearestSegment(f,m.x,m.y),e=null==k?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),d.start(c.getGraphX(),c.getGraphX(),e),y=m=r=t=null,A=!1,c.consume(),this.graphHandler.reset()}}}else if(f=c.getState(),null!=f&&this.model.isEdge(f.cell)){d=null;b=f.absolutePoints;if(null!=b)if(e=new mxRectangle(c.getGraphX(),
+c.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))d="move";else if(mxUtils.contains(e,b[0].x,b[0].y)||mxUtils.contains(e,b[b.length-1].x,b[b.length-1].y))d="pointer";else if(null!=f.visibleSourceState||null!=f.visibleTargetState)k=this.view.getEdgeStyle(f),d="crosshair",k!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(f)&&(k=mxUtils.findNearestSegment(f,c.getGraphX(),c.getGraphY()),
+k<b.length-1&&0<=k&&(d=0==Math.round(b[k].x-b[k+1].x)?"col-resize":"row-resize"));null!=d&&f.setCursor(d)}}),mouseUp:mxUtils.bind(this,function(a,c){y=m=r=t=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 c=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=c.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],f=this.graph.pageFormat,d=this.graph.pageScale,e=f.width*d,f=f.height*d,d=this.graph.view.translate,k=this.graph.view.scale,g=this.graph.getPageLayout(),p=0;p<g.width;p++)b.push(new mxRectangle(((g.x+p)*e+d.x)*k,(g.y*f+d.y)*k,e*k,f*k));for(p=0;p<g.height;p++)b.push(new mxRectangle((g.x*e+d.x)*k,((g.y+p)*f+d.y)*k,e*k,f*k));a=b.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=[],f=0;f<c.length;f++){var d=this.graph.view.getState(c[f]),d=null!=d?d.style:this.graph.getCellStyle(c[f]);
-"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}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 f=new mxRubberband(this);
-this.getRubberband=function(){return f};var k=(new Date).getTime(),q=0,n=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;n.apply(this,arguments);a!=this.currentState?(k=(new Date).getTime(),q=0):q=(new Date).getTime()-k};var g=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&g.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||mxEvent.isShiftDown(a)};var z=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return z.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var t=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(t=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=t)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var F=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 F.apply(this,
+function(){var a=c.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],f=this.graph.pageFormat,d=this.graph.pageScale,e=f.width*d,f=f.height*d,d=this.graph.view.translate,k=this.graph.view.scale,g=this.graph.getPageLayout(),n=0;n<g.width;n++)b.push(new mxRectangle(((g.x+n)*e+d.x)*k,(g.y*f+d.y)*k,e*k,f*k));for(n=0;n<g.height;n++)b.push(new mxRectangle((g.x*e+d.x)*k,((g.y+n)*f+d.y)*k,e*k,f*k));a=b.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),f=[],b=0;b<c.length;b++){var d=this.graph.view.getState(c[b]),d=null!=d?d.style:this.graph.getCellStyle(c[b]);
+"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[b]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&f.push(d)):f.push(c[b])}return f};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 f=new mxRubberband(this);
+this.getRubberband=function(){return f};var k=(new Date).getTime(),p=0,n=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;n.apply(this,arguments);a!=this.currentState?(k=(new Date).getTime(),p=0):p=(new Date).getTime()-k};var g=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<p||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&g.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var z=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return z.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var u=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(u=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=u)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var F=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 F.apply(this,
arguments);var b=c?a.sourceState.cell:a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var v=this.getCursorForCell;this.getCursorForCell=
-function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,f,d,e){e=null!=e?e:[];if(0<b||0<f){var k=this.getModel(),g=a+b,p=c+f;null==d&&(d=this.getCurrentRoot(),null==d&&(d=k.getRoot()));if(null!=d)for(var n=k.getChildCount(d),D=0;D<
-n;D++){var q=k.getChildAt(d,D),t=this.view.getState(q);if(null!=t&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var B=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=B&&(t=mxUtils.getBoundingBox(t,B));(k.isEdge(q)||k.isVertex(q))&&t.x>=a&&t.y+t.height<=p&&t.y>=c&&t.x+t.width<=g&&e.push(q);this.getAllCells(a,c,b,f,q,e)}}}return e};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?
-!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var p=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();p=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)),f.start(b.x,b.y)):null!=p?this.addSelectionCells(p):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);p=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,f,d,e){e=null!=e?e:[];if(0<b||0<f){var k=this.getModel(),g=a+b,n=c+f;null==d&&(d=this.getCurrentRoot(),null==d&&(d=k.getRoot()));if(null!=d)for(var q=k.getChildCount(d),D=0;D<
+q;D++){var p=k.getChildAt(d,D),u=this.view.getState(p);if(null!=u&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var B=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=B&&(u=mxUtils.getBoundingBox(u,B));(k.isEdge(p)||k.isVertex(p))&&u.x>=a&&u.y+u.height<=n&&u.y>=c&&u.x+u.width<=g&&e.push(p);this.getAllCells(a,c,b,f,p,e)}}}return e};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?
+!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var q=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();q=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)),f.start(b.x,b.y)):null!=q?this.addSelectionCells(q):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);q=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 C=this.updateMouseEvent;this.updateMouseEvent=function(a){a=C.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,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)};
@@ -2243,15 +2243,15 @@ Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
-Graph.prototype.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,l=!0,m=null,r=mxUtils.bind(this,function(a){l=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){l=l&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),x=mxUtils.bind(this,function(b){if(l)for(var c=mxEvent.getSource(b);null!=
-c&&c!=e.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,b);break}c=c.parentNode}});mxEvent.addGestureListeners(e.node,r,u,x);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,r,u,x){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,r,u,x){r=null!=r?r:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var c=this.model.getChildAt(e,d),f=this.getScaledCellAt(a,b,c,r,u,x);if(null!=f)return f;if(this.isCellVisible(c)&&(u&&this.model.isEdge(c)||r&&this.model.isVertex(c))&&(f=this.view.getState(c),null!=f&&(null==x||!x(f,a,b))&&this.intersects(f,a,b)))return c}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
+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,l=!0,m=null,r=mxUtils.bind(this,function(a){l=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),t=mxUtils.bind(this,function(a){l=l&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),y=mxUtils.bind(this,function(b){if(l)for(var c=mxEvent.getSource(b);null!=
+c&&c!=e.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,b);break}c=c.parentNode}});mxEvent.addGestureListeners(e.node,r,t,y);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,r,t,y){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,r,t,y){r=null!=r?r:!0;t=null!=t?t:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var c=this.model.getChildAt(e,d),f=this.getScaledCellAt(a,b,c,r,t,y);if(null!=f)return f;if(this.isCellVisible(c)&&(t&&this.model.isEdge(c)||r&&this.model.isVertex(c))&&(f=this.view.getState(c),null!=f&&(null==y||!y(f,a,b))&&this.intersects(f,a,b)))return c}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(r){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
-mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,l=this.view.scale,x=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=l,this.view.translate=x,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)}};
+mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,l=this.view.scale,y=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=l,this.view.translate=y,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;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var l=a.split("#")[1];window.location.hash=="#"+l&&(window.location.hash="");window.location.hash=l}else d=window.open(a,b),null==d||e||(d.opener=null)}catch(m){}return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
@@ -2267,27 +2267,27 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
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,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,r=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 u=e?"getUTC":"get",x=a[u+"Date"](),A=a[u+"Day"](),c=a[u+"Month"](),f=a[u+"FullYear"](),k=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),g=e?0:a.getTimezoneOffset(),y={d:x,dd:r(x),ddd:d.i18n.dayNames[A],dddd:d.i18n.dayNames[A+7],m:c+1,mm:r(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+
-12],yy:String(f).slice(2),yyyy:f,h:k%12||12,hh:r(k%12||12),H:k,HH:r(k),M:q,MM:r(q),s:n,ss:r(n),l:r(u,3),L:r(99<u?Math.round(u/10):u),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(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+r(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<x%10?0:(10!=x%100-x%10)*x%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1,
+/\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 t=e?"getUTC":"get",y=a[t+"Date"](),A=a[t+"Day"](),c=a[t+"Month"](),f=a[t+"FullYear"](),k=a[t+"Hours"](),p=a[t+"Minutes"](),n=a[t+"Seconds"](),t=a[t+"Milliseconds"](),g=e?0:a.getTimezoneOffset(),x={d:y,dd:r(y),ddd:d.i18n.dayNames[A],dddd:d.i18n.dayNames[A+7],m:c+1,mm:r(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+
+12],yy:String(f).slice(2),yyyy:f,h:k%12||12,hh:r(k%12||12),H:k,HH:r(k),M:p,MM:r(p),s:n,ss:r(n),l:r(t,3),L:r(99<t?Math.round(t/10):t),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(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+r(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<y%10?0:(10!=y%100-y%10)*y%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),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 l=document.createElement("input");l.style.display="inline-block";l.setAttribute("type","checkbox");b.isVisible(d)&&(l.setAttribute("checked","checked"),
-l.defaultChecked=!0);e.appendChild(l);var u=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(l,"click",function(){null!=l.getAttribute("checked")?l.removeAttribute("checked"):l.setAttribute("checked","checked");b.setVisible(d,l.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 l=match[0];if(2<l.length&&"%label%"!=l&&"%tooltip%"!=l){var m=null;if(match.index>d&&"%"==b.charAt(match.index-1))m=l.substring(1);else{var r=l.substring(1,l.length-1);if(0>r.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(r)?null!=u.getAttribute(r)?u.getAttribute(r):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(r))}e.push(b.substring(d,
+l.defaultChecked=!0);e.appendChild(l);var t=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",t);mxUtils.write(e,t);a.appendChild(e);mxEvent.addListener(l,"click",function(){null!=l.getAttribute("checked")?l.removeAttribute("checked"):l.setAttribute("checked","checked");b.setVisible(d,l.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 l=match[0];if(2<l.length&&"%label%"!=l&&"%tooltip%"!=l){var m=null;if(match.index>d&&"%"==b.charAt(match.index-1))m=l.substring(1);else{var r=l.substring(1,l.length-1);if(0>r.indexOf("{"))for(var t=a;null==m&&null!=t;)null!=t.value&&"object"==typeof t.value&&(m=t.hasAttribute(r)?null!=t.getAttribute(r)?t.getAttribute(r):"":null),t=this.model.getParent(t);null==m&&(m=this.getGlobalVariable(r))}e.push(b.substring(d,
match.index)+(null!=m?m:l));d=match.index+l.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),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,l,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var r=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?(r.x+=a.geometry.width/2,r.y-=e):b==mxConstants.DIRECTION_SOUTH?(r.x+=a.geometry.width/2,r.y+=a.geometry.height+e):(r.x=b==mxConstants.DIRECTION_WEST?r.x-e:r.x+(a.geometry.width+
-e),r.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,x=this.view.translate,A=x.x*u,x=x.y*u;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,x=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(A+r.x*u,x+r.y*u);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),
-u=this.view.getState(m),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(m=null));if(l=!mxEvent.isShiftDown(d)||l)b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.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{u=m;if(null==u&&l){for(var A=a,c=this.getCellGeometry(a);null!=c&&c.relative;)A=this.getModel().getParent(A),c=this.getCellGeometry(A);var f=this.view.getState(A),k=null!=f?f.style:this.getCellStyle(A);if(mxUtils.getValue(k,"part",!1)){var q=this.model.getParent(A);this.model.isVertex(q)&&(A=q)}u=this.duplicateCells([A],!1)[0];c=this.getCellGeometry(u);null!=c&&(c.x=r.x-c.width/2,c.y=r.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));
-var n=mxEvent.isControlDown(d)&&l||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var g=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(g=d.parent.getIndex(d),this.model.add(d.parent,n,g))}null==m&&null!=u&&null!=c&&null!=a.parent&&c.constructor==
-mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(g=a.parent.getIndex(a),this.model.add(a.parent,u,g));null!=n&&e.push(n);null==m&&null!=u&&e.push(u);null==u&&null!=n&&n.geometry.setTerminalPoint(r,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e};
+e),r.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var t=this.view.scale,y=this.view.translate,A=y.x*t,y=y.y*t;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,y=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(A+r.x*t,y+r.y*t);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),
+t=this.view.getState(m),null!=e&&null!=t&&mxUtils.intersects(e,t)&&(m=null));if(l=!mxEvent.isShiftDown(d)||l)b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.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{t=m;if(null==t&&l){for(var A=a,c=this.getCellGeometry(a);null!=c&&c.relative;)A=this.getModel().getParent(A),c=this.getCellGeometry(A);var f=this.view.getState(A),k=null!=f?f.style:this.getCellStyle(A);if(mxUtils.getValue(k,"part",!1)){var p=this.model.getParent(A);this.model.isVertex(p)&&(A=p)}t=this.duplicateCells([A],!1)[0];c=this.getCellGeometry(t);null!=c&&(c.x=r.x-c.width/2,c.y=r.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));
+var n=mxEvent.isControlDown(d)&&l||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,t,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var g=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(g=d.parent.getIndex(d),this.model.add(d.parent,n,g))}null==m&&null!=t&&null!=c&&null!=a.parent&&c.constructor==
+mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(g=a.parent.getIndex(a),this.model.add(a.parent,t,g));null!=n&&e.push(n);null==m&&null!=t&&e.push(t);null==t&&null!=n&&n.geometry.setTerminalPoint(r,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){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 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,l){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var r=this.view.getState(e[m]),u=this.getCellGeometry(e[m]);if(null!=r&&null!=u){var x=Math.round(u.width-r.width/this.view.scale),A=Math.round(u.height-r.height/this.view.scale);if(0!=A||0!=x){var c=this.model.getParent(e[m]),f=this.layoutManager.getLayout(c);
-null==f?null!=l&&this.isMoveCellsEvent(l)&&this.moveSiblings(r,c,x,A):null!=l&&mxEvent.isAltDown(l)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,x,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.foldCells=function(a,b,e,d,l){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var r=this.view.getState(e[m]),t=this.getCellGeometry(e[m]);if(null!=r&&null!=t){var y=Math.round(t.width-r.width/this.view.scale),A=Math.round(t.height-r.height/this.view.scale);if(0!=A||0!=y){var c=this.model.getParent(e[m]),f=this.layoutManager.getLayout(c);
+null==f?null!=l&&this.isMoveCellsEvent(l)&&this.moveSiblings(r,c,y,A):null!=l&&mxEvent.isAltDown(l)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,y,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var l=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<l.length;b++)if(l[b]!=a.cell){var m=this.view.getState(l[b]),r=this.getCellGeometry(l[b]);null!=m&&null!=r&&(r=r.clone(),r.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(l[b],r))}}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 l=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==l&&!b.resizeLast;){var m=this.getCellGeometry(a),r=this.view.getState(a);null!=r&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,r.width/this.view.scale-m.width):m.height+=d+Math.min(0,r.height/this.view.scale-m.height),this.model.setGeometry(a,
m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.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&&null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2332,15 +2332,15 @@ this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHa
(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,d){d=null!=d?d:!0;var c=this.getState(a);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,
arguments);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.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 b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,f=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,b,d){var e=new mxPoint(b,d);e.type=c;f.push(e);e=null!=a.routedPoints?a.routedPoints[f.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=d},e=.5*this.scale,c=!1,f=[],n=0;n<b.length-1;n++){for(var g=
-b[n+1],y=b[n],l=[],t=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(y.x,y.y,t.x,t.y,g.x,g.y)<1*this.scale*this.scale;)g=t,n++,t=b[n+2];for(var c=d(0,y.x,y.y)||c,u=0;u<this.validEdges.length;u++){var v=this.validEdges[u],m=v.absolutePoints;if(null!=m&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<m.length-1;v++){for(var p=m[v+1],C=m[v],t=m[v+2];v<m.length-2&&mxUtils.ptSegDistSq(C.x,C.y,t.x,t.y,p.x,p.y)<1*this.scale*this.scale;)p=t,v++,t=m[v+2];t=mxUtils.intersection(y.x,y.y,g.x,g.y,C.x,C.y,p.x,
-p.y);if(null!=t&&(Math.abs(t.x-y.x)>e||Math.abs(t.y-y.y)>e)&&(Math.abs(t.x-g.x)>e||Math.abs(t.y-g.y)>e)&&(Math.abs(t.x-C.x)>e||Math.abs(t.y-C.y)>e)&&(Math.abs(t.x-p.x)>e||Math.abs(t.y-p.y)>e)){p=t.x-y.x;C=t.y-y.y;t={distSq:p*p+C*C,x:t.x,y:t.y};for(p=0;p<l.length;p++)if(l[p].distSq>t.distSq){l.splice(p,0,t);t=null;break}null==t||0!=l.length&&l[l.length-1].x===t.x&&l[l.length-1].y===t.y||l.push(t)}}}for(v=0;v<l.length;v++)c=d(1,l[v].x,l[v].y)||c}t=b[b.length-1];c=d(0,t.x,t.y)||c}a.routedPoints=f;return c}return!1};
+b[n+1],x=b[n],l=[],u=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,u.x,u.y,g.x,g.y)<1*this.scale*this.scale;)g=u,n++,u=b[n+2];for(var c=d(0,x.x,x.y)||c,t=0;t<this.validEdges.length;t++){var v=this.validEdges[t],m=v.absolutePoints;if(null!=m&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<m.length-1;v++){for(var q=m[v+1],C=m[v],u=m[v+2];v<m.length-2&&mxUtils.ptSegDistSq(C.x,C.y,u.x,u.y,q.x,q.y)<1*this.scale*this.scale;)q=u,v++,u=m[v+2];u=mxUtils.intersection(x.x,x.y,g.x,g.y,C.x,C.y,q.x,
+q.y);if(null!=u&&(Math.abs(u.x-x.x)>e||Math.abs(u.y-x.y)>e)&&(Math.abs(u.x-g.x)>e||Math.abs(u.y-g.y)>e)&&(Math.abs(u.x-C.x)>e||Math.abs(u.y-C.y)>e)&&(Math.abs(u.x-q.x)>e||Math.abs(u.y-q.y)>e)){q=u.x-x.x;C=u.y-x.y;u={distSq:q*q+C*C,x:u.x,y:u.y};for(q=0;q<l.length;q++)if(l[q].distSq>u.distSq){l.splice(q,0,u);u=null;break}null==u||0!=l.length&&l[l.length-1].x===u.x&&l[l.length-1].y===u.y||l.push(u)}}}for(v=0;v<l.length;v++)c=d(1,l[v].x,l[v].y)||c}u=b[b.length-1];c=d(0,u.x,u.y)||c}a.routedPoints=f;return c}return!1};
var l=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)l.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
-"jumpStyle","none"),n,g=!0,y=null,z=null;n=[];var t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var v=this.state.routedPoints[u],m=new mxPoint(v.x/this.scale,v.y/this.scale);0==u?m=b[0]:u==this.state.routedPoints.length-1&&(m=b[b.length-1]);var p=!1;if(null!=y&&1==v.type){var C=this.state.routedPoints[u+1],v=C.x/this.scale-m.x,C=C.y/this.scale-m.y,v=v*v+C*C;null==t&&(t=new mxPoint(m.x-y.x,m.y-y.y),z=Math.sqrt(t.x*t.x+t.y*t.y),0<z?(t.x=t.x*d/z,t.y=t.y*d/z):t=null);v>d*d&&0<z&&
-(v=y.x-m.x,C=y.y-m.y,v=v*v+C*C,v>d*d&&(p=new mxPoint(m.x-t.x,m.y-t.y),v=new mxPoint(m.x+t.x,m.y+t.y),n.push(p),this.addPoints(a,n,c,f,!1,null,g),n=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(p.x-t.y*n,p.y+t.x*n),a.lineTo(v.x-t.y*n,v.y+t.x*n),a.lineTo(v.x,v.y)):"arc"==e?(n*=1.3,a.curveTo(p.x-t.y*n,p.y+t.x*n,v.x-t.y*n,v.y+t.x*n,v.x,v.y)):(a.moveTo(v.x,v.y),g=!0),n=[v],p=!0))}else t=null;p||(n.push(m),y=m)}this.addPoints(a,n,c,f,!1,null,g);a.stroke()}};var m=
-mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var y=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,y,l,g);
-y=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);y+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&e,y);0!=n&&(y=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,y,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e=
-0;e<a.length;e++){var k=this.graph.getConnectionPoint(b,a[e]);if(null!=k){var g=(k.x-d.x)*(k.x-d.x)+(k.y-d.y)*(k.y-d.y);if(null==f||g<f)c=k,f=g}}null!=c&&(d=c)}return d};var r=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var f=r.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,f));return f};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
+"jumpStyle","none"),n,g=!0,x=null,z=null;n=[];var u=null;a.begin();for(var t=0;t<this.state.routedPoints.length;t++){var v=this.state.routedPoints[t],m=new mxPoint(v.x/this.scale,v.y/this.scale);0==t?m=b[0]:t==this.state.routedPoints.length-1&&(m=b[b.length-1]);var q=!1;if(null!=x&&1==v.type){var C=this.state.routedPoints[t+1],v=C.x/this.scale-m.x,C=C.y/this.scale-m.y,v=v*v+C*C;null==u&&(u=new mxPoint(m.x-x.x,m.y-x.y),z=Math.sqrt(u.x*u.x+u.y*u.y),0<z?(u.x=u.x*d/z,u.y=u.y*d/z):u=null);v>d*d&&0<z&&
+(v=x.x-m.x,C=x.y-m.y,v=v*v+C*C,v>d*d&&(q=new mxPoint(m.x-u.x,m.y-u.y),v=new mxPoint(m.x+u.x,m.y+u.y),n.push(q),this.addPoints(a,n,c,f,!1,null,g),n=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(q.x-u.y*n,q.y+u.x*n),a.lineTo(v.x-u.y*n,v.y+u.x*n),a.lineTo(v.x,v.y)):"arc"==e?(n*=1.3,a.curveTo(q.x-u.y*n,q.y+u.x*n,v.x-u.y*n,v.y+u.x*n,v.x,v.y)):(a.moveTo(v.x,v.y),g=!0),n=[v],q=!0))}else u=null;q||(n.push(m),x=m)}this.addPoints(a,n,c,f,!1,null,g);a.stroke()}};var m=
+mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var x=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,x,l,g);
+x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);x+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&e,x);0!=n&&(x=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,x,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e=
+0;e<a.length;e++){var k=this.graph.getConnectionPoint(b,a[e]);if(null!=k){var g=(k.x-d.x)*(k.x-d.x)+(k.y-d.y)*(k.y-d.y);if(null==f||g<f)c=k,f=g}}null!=c&&(d=c)}return d};var r=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var f=r.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,f));return f};var t=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
+function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return t.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 l=b[d];if(".xml"==l.toLowerCase().substring(l.length-4,l.length))mxStencilRegistry.loadStencilSet(l,null);else if(".js"==l.toLowerCase().substring(l.length-3,l.length))try{if(mxStencilRegistry.allowEval){var m=
mxUtils.load(l);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(r){null!=window.console&&console.log("error in getStencil:",l,r)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
@@ -2348,7 +2348,7 @@ mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"stri
mxStencilRegistry.loadStencilSet=function(a,b,e,d){var l=mxStencilRegistry.packages[a];if(null!=e&&e||null==l){var m=!1;if(null==l)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}l=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=l;m=!0}catch(r){null!=window.console&&console.log("error in loadStencilSet:",a,r)}null!=l&&null!=
l.documentElement&&mxStencilRegistry.parseStencilSet(l.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,l="";a=a.getAttribute("name");for(null!=a&&(l=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var l=l.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(l+m.toLowerCase(),new mxStencil(d));if(null!=b){var r=d.getAttribute("w"),
-u=d.getAttribute("h"),r=null==r?80:parseInt(r,10),u=null==u?80:parseInt(u,10);b(l,m,a,r,u)}}d=d.nextSibling}}};
+t=d.getAttribute("h"),r=null==r?80:parseInt(r,10),t=null==t?80:parseInt(t,10);b(l,m,a,r,t)}}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;mxGraphHandler.prototype.removeEmptyParents=!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,
@@ -2359,12 +2359,12 @@ null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";")
this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};
Graph.prototype.importGraphModel=function(a,c,b,f){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];d=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges()));if(null!=d){d=d.slice();this.model.beginUpdate();try{if(1!=d.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<d.length;e++)a=a.concat(this.model.getChildren(this.moveCells([d[e]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(e.getChildren(d[0]),c,b,!1,this.getDefaultParent());
if(f){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var k=this.getBoundingBoxFromGeometry(a,!0);null!=k&&this.moveCells(a,c-k.x,b-k.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var f=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:
-0))}}catch(R){}return f}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;f=d.width/b;d=d.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=f,f=d,d=e;b=a.shape.getConstraints(a.style,f,d);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),
+0))}}catch(Q){}return f}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;f=d.width/b;d=d.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=f,f=d,d=e;b=a.shape.getConstraints(a.style,f,d);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.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,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.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 f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),k=c.getTerminal(d,!1);c.setTerminal(d,k,!0);c.setTerminal(d,e,!1);var g=c.getGeometry(d);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var p=g.getTerminalPoint(!0),n=g.getTerminalPoint(!1);g.setTerminalPoint(p,!1);g.setTerminalPoint(n,!0);c.setGeometry(d,g);var q=this.view.getState(d),D=this.view.getState(e),t=this.view.getState(k);if(null!=q){var B=null!=D?this.getConnectionConstraint(q,D,!0):null,l=
-null!=t?this.getConnectionConstraint(q,t,!1):null;this.setConnectionConstraint(d,e,!0,l);this.setConnectionConstraint(d,k,!1,B)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var y=g.width;g.width=g.height;g.height=y;c.setGeometry(d,g);var C=this.view.getState(d);if(null!=C){var v=C.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
+try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),k=c.getTerminal(d,!1);c.setTerminal(d,k,!0);c.setTerminal(d,e,!1);var g=c.getGeometry(d);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var n=g.getTerminalPoint(!0),q=g.getTerminalPoint(!1);g.setTerminalPoint(n,!1);g.setTerminalPoint(q,!0);c.setGeometry(d,g);var p=this.view.getState(d),D=this.view.getState(e),u=this.view.getState(k);if(null!=p){var B=null!=D?this.getConnectionConstraint(p,D,!0):null,x=
+null!=u?this.getConnectionConstraint(p,u,!1):null;this.setConnectionConstraint(d,e,!0,x);this.setConnectionConstraint(d,k,!1,B)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var l=g.width;g.width=g.height;g.height=l;c.setGeometry(d,g);var C=this.view.getState(d);if(null!=C){var v=C.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
v,[d])}b.push(d)}}}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 f=this.view.getState(c[b]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.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"),f=Array.prototype.slice.call(a.attributes);attr=f.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};
Graph.prototype.processElements=function(a,c){for(var b=a.getElementsByTagName("*"),f=0;f<b.length;f++)c(b[f])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var f=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){f.innerHTML=e;for(var k=f.getElementsByTagName(null!=b?b:"*"),g=0;g<k.length;g++)c(k[g]);f.innerHTML!=e&&this.cellLabelChanged(a[d],f.innerHTML)}}};Graph.prototype.cellLabelChanged=
@@ -2385,19 +2385,19 @@ c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=
d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-k.container.scrollLeft)<e&&Math.abs(this.scrollTop-k.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(g)||mxEvent.isMiddleMouseButton(g))&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(d=k.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(g,this.currentLink),mxEvent.isConsumed(g)||(g=mxEvent.isMiddleMouseButton(g)?
"_blank":d?k.linkTarget:"_top",k.openLink(this.currentLink,g),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-k.container.scrollLeft)<e&&Math.abs(this.scrollTop-k.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=k.getAbsoluteUrl(k.getLinkForCell(a.cell));null!=this.currentLink&&(k.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},
clear:function(){null!=k.container&&(k.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=k.tooltipHandler&&k.tooltipHandler.hide()}};k.click=function(a){};k.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.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(),f=this.gridSize,d=[];b.beginUpdate();try{for(var e=
-this.cloneCells(a,!1,null,!0),k=0;k<a.length;k++){var g=b.getParent(a[k]),p=this.moveCells([e[k]],f,f,!1)[0];d.push(p);if(c)b.add(g,e[k]);else{var n=g.getIndex(a[k]);b.add(g,e[k],n+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");
+this.cloneCells(a,!1,null,!0),k=0;k<a.length;k++){var g=b.getParent(a[k]),n=this.moveCells([e[k]],f,f,!1)[0];d.push(n);if(c)b.add(g,e[k]);else{var q=g.getIndex(a[k]);b.add(g,e[k],q+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");
if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==
b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].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=[],f=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var k=this.view.getState(c[e]);if(null!=k){var g=a?k.getCenterX():k.getCenterY(),f=null!=f?Math.max(f,g):g,d=null!=d?Math.min(d,g):g;b.push(k)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});k=this.view.translate;g=this.view.scale;d=d/g-(a?k.x:k.y);
-f=f/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var p=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),q=this.getCellGeometry(b[e].cell),f=f+p;null!=q&&null!=n&&(q=q.clone(),a?q.x=Math.round(f-q.width/2)-n.origin.x:q.y=Math.round(f-q.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,q))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
+f=f/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var n=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var q=this.view.getState(this.model.getParent(b[e].cell)),p=this.getCellGeometry(b[e].cell),f=f+n;null!=p&&null!=q&&(p=p.clone(),a?p.x=Math.round(f-p.width/2)-q.origin.x:p.y=Math.round(f-p.height/2)-q.origin.y,this.getModel().setGeometry(b[e].cell,p))}}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,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))||(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]);
-return b.encode(d)};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,f,d,e,k,g,p,n){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;k=null!=k?k:!0;var t=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());
-if(null==t)throw Error(mxResources.get("drawingEmpty"));var B=this.view.scale,l=mxUtils.createXmlDocument(),y=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=y.style?y.style.backgroundColor=a:y.setAttribute("style","background-color:"+a));null==l.createElementNS?(y.setAttribute("xmlns",mxConstants.NS_SVG),y.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):y.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);
-a=c/B;var C=Math.max(1,Math.ceil(t.width*a)+2*b)+(n?5:0),v=Math.max(1,Math.ceil(t.height*a)+2*b)+(n?5:0);y.setAttribute("version","1.1");y.setAttribute("width",C+"px");y.setAttribute("height",v+"px");y.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+C+" "+v);l.appendChild(y);var z=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g");y.appendChild(z);var D=this.createSvgCanvas(z);D.foOffset=d?-.5:0;D.textOffset=d?-.5:0;D.imageOffset=d?-.5:0;D.translate(Math.floor((b/
-c-t.x)/B),Math.floor((b/c-t.y)/B));var m=document.createElement("textarea"),u=D.createAlternateContent;D.createAlternateContent=function(a,c,b,f,d,e,k,g,p,n,q,t,B){var y=this.state;if(null!=this.foAltText&&(0==f||0!=y.fontSize&&e.length<5*f/y.fontSize)){var l=this.createElement("text");l.setAttribute("x",Math.round(f/2));l.setAttribute("y",Math.round((d+y.fontSize)/2));l.setAttribute("fill",y.fontColor||"black");l.setAttribute("text-anchor","middle");l.setAttribute("font-size",Math.round(y.fontSize)+
-"px");l.setAttribute("font-family",y.fontFamily);(y.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&l.setAttribute("font-weight","bold");(y.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&l.setAttribute("font-style","italic");(y.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.setAttribute("text-decoration","underline");try{return m.innerHTML=e,l.textContent=m.value,l}catch(sa){return u.apply(this,arguments)}}else return u.apply(this,arguments)};var G=this.backgroundImage;
-if(null!=G){c=B/c;var r=this.view.translate,J=new mxRectangle(r.x*c,r.y*c,G.width*c,G.height*c);mxUtils.intersects(t,J)&&D.image(r.x,r.y,G.width,G.height,G.src,!0)}D.scale(a);D.textEnabled=k;g=null!=g?g:this.createSvgImageExport();var F=g.drawCellState;g.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&F.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),
-D);this.updateSvgLinks(y,p,!0);return y}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
+return b.encode(d)};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,f,d,e,k,g,q,n){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;k=null!=k?k:!0;var u=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());
+if(null==u)throw Error(mxResources.get("drawingEmpty"));var B=this.view.scale,x=mxUtils.createXmlDocument(),l=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=a&&(null!=l.style?l.style.backgroundColor=a:l.setAttribute("style","background-color:"+a));null==x.createElementNS?(l.setAttribute("xmlns",mxConstants.NS_SVG),l.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):l.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);
+a=c/B;var C=Math.max(1,Math.ceil(u.width*a)+2*b)+(n?5:0),v=Math.max(1,Math.ceil(u.height*a)+2*b)+(n?5:0);l.setAttribute("version","1.1");l.setAttribute("width",C+"px");l.setAttribute("height",v+"px");l.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+C+" "+v);x.appendChild(l);var z=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");l.appendChild(z);var D=this.createSvgCanvas(z);D.foOffset=d?-.5:0;D.textOffset=d?-.5:0;D.imageOffset=d?-.5:0;D.translate(Math.floor((b/
+c-u.x)/B),Math.floor((b/c-u.y)/B));var m=document.createElement("textarea"),t=D.createAlternateContent;D.createAlternateContent=function(a,c,b,f,d,e,k,g,n,q,p,u,B){var l=this.state;if(null!=this.foAltText&&(0==f||0!=l.fontSize&&e.length<5*f/l.fontSize)){var x=this.createElement("text");x.setAttribute("x",Math.round(f/2));x.setAttribute("y",Math.round((d+l.fontSize)/2));x.setAttribute("fill",l.fontColor||"black");x.setAttribute("text-anchor","middle");x.setAttribute("font-size",Math.round(l.fontSize)+
+"px");x.setAttribute("font-family",l.fontFamily);(l.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&x.setAttribute("font-weight","bold");(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&x.setAttribute("font-style","italic");(l.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&x.setAttribute("text-decoration","underline");try{return m.innerHTML=e,x.textContent=m.value,x}catch(sa){return t.apply(this,arguments)}}else return t.apply(this,arguments)};var G=this.backgroundImage;
+if(null!=G){c=B/c;var r=this.view.translate,J=new mxRectangle(r.x*c,r.y*c,G.width*c,G.height*c);mxUtils.intersects(u,J)&&D.image(r.x,r.y,G.width,G.height,G.src,!0)}D.scale(a);D.textEnabled=k;g=null!=g?g:this.createSvgImageExport();var F=g.drawCellState;g.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&F.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),
+D);this.updateSvgLinks(l,q,!0);return l}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){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],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var k=f[e].getAttribute("colspan"),
d=d+(null!=k?parseInt(k):1);b=b.insertRow(c);for(e=0;e<d;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 f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
@@ -2410,19 +2410,19 @@ arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.grap
a.style.textAlign=null}));document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,f=a.rangeCount;b<f;++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(ka){}};var l=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));l.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 r=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){r.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),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.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 u=mxCellEditor.prototype.installListeners;
+null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.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 t=mxCellEditor.prototype.installListeners;
mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(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)}u.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,
+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)}t.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,
function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD,k=(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(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=
e?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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 g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+
-"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!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var x=mxCellEditor.prototype.resize;
+"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!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var y=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 f=null!=a.text?a.text.margin:null;null==f&&(f=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+=f.x*this.bounds.width;this.bounds.y+=f.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=
-"",x.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=
+"",y.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 A=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();A.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
function(){try{this.graph.container.focus()}catch(D){}};var c=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(c.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&f==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],
!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=
@@ -2442,22 +2442,22 @@ HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.protot
HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=
!0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var q=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){q.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
+function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var p=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){p.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
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,
f=null,d=null,e=null,k=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,k=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),k=this.graph.snap(k),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(k)<this.graph.tolerance&&(k=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),g=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<g.length;b++)if(this.graph.isCellMovable(g[b])){var p=this.graph.view.getState(g[b]),n=this.graph.getCellGeometry(g[b]);null!=p&&null!=n&&(n=n.clone(),n.translate(e,k),this.graph.model.setGeometry(g[b],n))}}finally{this.graph.model.endUpdate()}}else e=
+this.y,this.width,this.height),g=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<g.length;b++)if(this.graph.isCellMovable(g[b])){var n=this.graph.view.getState(g[b]),q=this.graph.getCellGeometry(g[b]);null!=n&&null!=q&&(q=q.clone(),q.translate(e,k),this.graph.model.setGeometry(g[b],q))}}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),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,k=this.graph.tolerance;if(null!=this.div||Math.abs(d)>k||Math.abs(e)>k)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=f-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 n=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);n.apply(this,arguments)};var g=(new Date).getTime(),y=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){z.apply(this,arguments);b!=this.currentTerminalState?(g=(new Date).getTime(),y=0):y=(new Date).getTime()-g;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&t.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,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+this.secondDiv=null);n.apply(this,arguments)};var g=(new Date).getTime(),x=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){z.apply(this,arguments);b!=this.currentTerminalState?(g=(new Date).getTime(),x=0):x=(new Date).getTime()-g;this.currentTerminalState=b};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&u.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,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?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 F=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 F.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]),
null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return v.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.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))):E.apply(this,arguments)};var p=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&p.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):E.apply(this,arguments)};var q=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&q.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 C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var Q=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Q.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.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),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
f);if(null!=b||null!=f&&0<f.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));
@@ -2465,92 +2465,92 @@ this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.cre
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.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 N=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){N.apply(this,
+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 L=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){L.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
-function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var L=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){L.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 V=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(V.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),
+function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.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 U=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(U.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ja=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ja.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ca=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ca.apply(this,arguments);null!=this.linkHint&&
-(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function r(){mxCylinder.call(this)}function u(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function k(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,c){this.canvas=
+(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 l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function r(){mxCylinder.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function A(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function k(){mxActor.call(this)}function p(){mxActor.call(this)}function n(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,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function t(){mxActor.call(this)}function F(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function p(){mxCylinder.call(this)}function C(){mxShape.call(this)}function J(){mxShape.call(this)}
-function Q(){mxEllipse.call(this)}function G(){mxShape.call(this)}function N(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function L(){mxShape.call(this)}function V(){mxShape.call(this)}function ja(){mxShape.call(this)}function ca(){mxShape.call(this)}function D(){mxCylinder.call(this)}function Y(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function ka(){mxArrowConnector.call(this);this.spacing=0}function la(){mxArrowConnector.call(this);
-this.spacing=0}function ga(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function W(){mxActor.call(this)}function na(){mxActor.call(this)}function da(){mxActor.call(this)}function S(){mxActor.call(this)}function ha(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function aa(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function I(){mxEllipse.call(this)}
-function oa(){mxRhombus.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function va(){mxActor.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function pa(){mxConnector.call(this)}function Ca(a,c,b,f,d,e,k,g,p,n){k+=p;var P=f.clone();f.x-=d*(2*k+p);f.y-=e*(2*k+p);d*=k+p;e*=k+p;return function(){a.ellipse(P.x-d-k,P.y-e-k,2*k,2*k);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),P=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),k=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,
-e);a.lineTo(f,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=P&&(a.setFillAlpha(Math.abs(P)),a.setFillColor(0>P?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,
+this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function u(){mxActor.call(this)}function F(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function q(){mxCylinder.call(this)}function C(){mxShape.call(this)}function J(){mxShape.call(this)}
+function P(){mxEllipse.call(this)}function G(){mxShape.call(this)}function L(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function M(){mxShape.call(this)}function U(){mxShape.call(this)}function ja(){mxShape.call(this)}function ca(){mxShape.call(this)}function D(){mxCylinder.call(this)}function Y(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function ka(){mxArrowConnector.call(this);this.spacing=0}function la(){mxArrowConnector.call(this);
+this.spacing=0}function ga(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function W(){mxActor.call(this)}function na(){mxActor.call(this)}function da(){mxActor.call(this)}function R(){mxActor.call(this)}function ha(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function aa(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function I(){mxEllipse.call(this)}
+function oa(){mxRhombus.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function va(){mxActor.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function pa(){mxConnector.call(this)}function Ca(a,c,b,f,d,e,k,g,q,n){k+=q;var V=f.clone();f.x-=d*(2*k+q);f.y-=e*(2*k+q);d*=k+q;e*=k+q;return function(){a.ellipse(V.x-d-k,V.y-e-k,2*k,2*k);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),V=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),k=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,
+e);a.lineTo(f,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=V&&(a.setFillAlpha(Math.abs(V)),a.setFillColor(0>V?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,
0),a.moveTo(e,e),a.lineTo(f,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var ra=Math.tan(mxUtils.toRadians(30)),ma=(.5-ra)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/ra);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*
c,c*ma);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ma)*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,f,d,e){c=Math.min(f,d/(.5+ra));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ma)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ma)*c),a.lineTo(.5*c,(1-ma)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ma),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ma)*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,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,
c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity=0;l.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),k=
Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.close(),a.fill()),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.end(),a.stroke())};
mxCellRenderer.registerShape("note",l);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(r,mxCylinder);r.prototype.tabWidth=60;r.prototype.tabHeight=20;r.prototype.tabPosition="right";r.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
-b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var k=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==k?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==k?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",r);mxUtils.extend(u,mxActor);u.prototype.size=
-30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,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(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(x,mxActor);x.prototype.size=.4;x.prototype.redrawPath=
-function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction==
-mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};mxCellRenderer.registerShape("tape",x);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.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};A.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,
+b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var k=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==k?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==k?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",r);mxUtils.extend(t,mxActor);t.prototype.size=
+30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,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(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=
+function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};y.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction==
+mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};mxCellRenderer.registerShape("tape",y);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.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};A.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",A);var Ja=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ja.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(c,mxActor);c.prototype.size=.2;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,b,f,d){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,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",c);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,f,d){c=f*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,
d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(k,mxActor);k.prototype.size=.5;k.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);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(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,
-d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",k);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);n.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
+d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",k);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",p);n.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
c;this.firstX=a;this.firstY=c};n.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)};n.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};n.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=e};n.prototype.arcTo=function(a,c,b,f,
-d,e,k){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=k};n.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},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var k=Math.round(e/10),g=this.defaultVariation;5>k&&(k=5,g/=3);for(var P=b(a-this.lastX)*f/k,b=b(c-this.lastY)*d/k,
-f=f/e,d=d/e,e=0;e<k;e++){var p=(Math.random()-.5)*g;this.originalLineTo.call(this.canvas,P*e+this.lastX-p*d,b*e+this.lastY-p*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.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};
+d,e,k){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=k};n.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},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var k=Math.round(e/10),g=this.defaultVariation;5>k&&(k=5,g/=3);for(var V=b(a-this.lastX)*f/k,b=b(c-this.lastY)*d/k,
+f=f/e,d=d/e,e=0;e<k;e++){var q=(Math.random()-.5)*g;this.originalLineTo.call(this.canvas,V*e+this.lastX-q*d,b*e+this.lastY-q*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.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 za=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 n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ka=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ka.apply(this,arguments)};var Aa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)Aa.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(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e),
a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var wa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&wa.apply(this,arguments)};mxUtils.extend(g,mxRectangleShape);g.prototype.size=.1;g.prototype.isHtmlAllowed=function(){return!1};g.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 f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};g.prototype.paintForeground=
-function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(y,
-mxRectangleShape);y.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};y.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",y);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable=
+function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(x,
+mxRectangleShape);x.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};x.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable=
function(){return!0};z.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),k=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+g),d-b),new mxPoint(k,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):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(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(F,mxHexagon);F.prototype.size=.25;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=
+this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+g),d-b),new mxPoint(k,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):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(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",u);mxUtils.extend(F,mxHexagon);F.prototype.size=.25;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=
function(a,c,b,f,d){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(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",F);mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.paintForeground=function(a,
c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",v);var ua=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,f,d){ua.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;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),ua.apply(this,[a,c,b,f,d]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};E.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,k;do{k=mxCellRenderer.defaultShapes[this.style["symbol"+
-e]];if(null!=k){var g=this.style["symbol"+e+"Align"],P=this.style["symbol"+e+"VerticalAlign"],p=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],q=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||q,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),q+=y,t+=y);var y=c,l=b,y=g==mxConstants.ALIGN_CENTER?y+(f-p)/2:g==mxConstants.ALIGN_RIGHT?y+(f-p-q):y+q,l=P==mxConstants.ALIGN_MIDDLE?l+(d-n)/2:P==mxConstants.ALIGN_BOTTOM?
-l+(d-n-t):l+t;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,y,l,p,n);a.restore()}e++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",p);mxUtils.extend(C,mxShape);
+e]];if(null!=k){var g=this.style["symbol"+e+"Align"],V=this.style["symbol"+e+"VerticalAlign"],q=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,u=this.style["symbol"+e+"VSpacing"]||p,l=this.style["symbol"+e+"ArcSpacing"];null!=l&&(l*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),p+=l,u+=l);var l=c,x=b,l=g==mxConstants.ALIGN_CENTER?l+(f-q)/2:g==mxConstants.ALIGN_RIGHT?l+(f-q-p):l+p,x=V==mxConstants.ALIGN_MIDDLE?x+(d-n)/2:V==mxConstants.ALIGN_BOTTOM?
+x+(d-n-u):x+u;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,l,x,q,n);a.restore()}e++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(q,mxCylinder);q.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",q);mxUtils.extend(C,mxShape);
C.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a,
-c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",Q);mxUtils.extend(G,
-mxShape);G.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",G);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()};
-N.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",N);mxUtils.extend(B,mxRectangleShape);B.prototype.size=40;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};B.prototype.paintBackground=function(a,c,b,f,
+c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",P);mxUtils.extend(G,
+mxShape);G.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",G);mxUtils.extend(L,mxShape);L.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};L.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()};
+L.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",L);mxUtils.extend(B,mxRectangleShape);B.prototype.size=40;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};B.prototype.paintBackground=function(a,c,b,f,
d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=B&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};B.prototype.paintForeground=function(a,
c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",B);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,k=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),P=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);P!=mxConstants.NONE&&(a.setFillColor(P),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,k=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),V=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);V!=mxConstants.NONE&&(a.setFillColor(V),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+k,b);a.lineTo(c+k,b+Math.max(0,g-1.5*e));a.lineTo(c+Math.max(0,k-e),b+g);a.lineTo(c,b+g);a.close();a.fillAndStroke();a.begin();a.moveTo(c+k,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=B.prototype.size;
null!=c&&(f=mxUtils.getValue(c.style,"size",f)*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+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=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()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",z.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,f,d){var e=c.prototype.size;
-null!=b&&(e=mxUtils.getValue(b.style,"size",e));var k=a.x,g=a.y,p=a.width,P=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=P*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p,g+e),new mxPoint(k+p,g+P),new mxPoint(k,g+P-e),new mxPoint(k,g)]):(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+p,g),new mxPoint(k+p-e,g+P),new mxPoint(k,
-g+P),new mxPoint(k+e,g)]);P=a.getCenterX();a=a.getCenterY();a=new mxPoint(P,a);d&&(f.x<k||f.x>k+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var k=a.x,g=a.y,p=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_EAST?(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+p-e,g),new mxPoint(k+p,g+n),new mxPoint(k,g+n),new mxPoint(k+e,g)]):c==mxConstants.DIRECTION_WEST?(e=p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p,g),new mxPoint(k+p-e,g+n),new mxPoint(k+e,g+n),new mxPoint(k,g)]):c==mxConstants.DIRECTION_NORTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g+e),new mxPoint(k+p,g),new mxPoint(k+p,g+n),new mxPoint(k,g+n-e),new mxPoint(k,g+e)]):(e=n*Math.max(0,
-Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p,g+e),new mxPoint(k+p,g+n-e),new mxPoint(k,g+n),new mxPoint(k,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<k||b.x>k+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
-"size",e));var k=a.x,g=a.y,p=a.width,n=a.height,P=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+p-d,g),new mxPoint(k+p,a),new mxPoint(k+p-d,g+n),new mxPoint(k,g+n),new mxPoint(k+d,a),new mxPoint(k,g)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,
-Math.min(1,e)),g=[new mxPoint(k+d,g),new mxPoint(k+p,g),new mxPoint(k+p-d,a),new mxPoint(k+p,g+n),new mxPoint(k+d,g+n),new mxPoint(k,a),new mxPoint(k+d,g)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g+d),new mxPoint(P,g),new mxPoint(k+p,g+d),new mxPoint(k+p,g+n),new mxPoint(P,g+n-d),new mxPoint(k,g+n),new mxPoint(k,g+d)]):(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(P,g+d),new mxPoint(k+
-p,g),new mxPoint(k+p,g+n-d),new mxPoint(P,g+n),new mxPoint(k,g+n-d),new mxPoint(k,g)]);P=new mxPoint(P,a);f&&(b.x<k||b.x>k+p?P.y=b.y:P.x=b.x);return mxUtils.getPerimeterPoint(g,P,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=F.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,k=a.y,g=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),k=[new mxPoint(n,k),new mxPoint(e+g,k+d),new mxPoint(e+g,k+p-d),new mxPoint(n,k+p),new mxPoint(e,k+p-d),new mxPoint(e,k+d),new mxPoint(n,k)]):(d=g*Math.max(0,Math.min(1,d)),k=[new mxPoint(e+d,k),new mxPoint(e+g-d,k),new mxPoint(e+g,a),new mxPoint(e+g-d,k+p),new mxPoint(e+d,k+p),new mxPoint(e,a),new mxPoint(e+d,k)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+
-g?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(k,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",L);mxUtils.extend(V,mxShape);V.prototype.size=
-10;V.prototype.inset=2;V.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+k);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-k,e/2);a.quadTo((f-e)/2-k,e+k,f/2,e+k);a.quadTo((f+e)/2+k,e+k,(f+e)/2+k,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",V);mxUtils.extend(ja,mxShape);ja.prototype.paintBackground=
+null!=b&&(e=mxUtils.getValue(b.style,"size",e));var k=a.x,g=a.y,q=a.width,n=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+q,g+e),new mxPoint(k+q,g+n),new mxPoint(k,g+n-e),new mxPoint(k,g)]):(e=q*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+q,g),new mxPoint(k+q-e,g+n),new mxPoint(k,
+g+n),new mxPoint(k+e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(f.x<k||f.x>k+q?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var k=a.x,g=a.y,q=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?(e=q*Math.max(0,Math.min(1,e)),g=[new mxPoint(k+e,g),new mxPoint(k+q-e,g),new mxPoint(k+q,g+n),new mxPoint(k,g+n),new mxPoint(k+e,g)]):c==mxConstants.DIRECTION_WEST?(e=q*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+q,g),new mxPoint(k+q-e,g+n),new mxPoint(k+e,g+n),new mxPoint(k,g)]):c==mxConstants.DIRECTION_NORTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g+e),new mxPoint(k+q,g),new mxPoint(k+q,g+n),new mxPoint(k,g+n-e),new mxPoint(k,g+e)]):(e=n*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+q,g+e),new mxPoint(k+q,g+n-e),new mxPoint(k,g+n),new mxPoint(k,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<k||b.x>k+q?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?u.prototype.fixedSize:u.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
+"size",e));var k=a.x,g=a.y,q=a.width,n=a.height,V=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(q,e)):q*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(k+q-d,g),new mxPoint(k+q,a),new mxPoint(k+q-d,g+n),new mxPoint(k,g+n),new mxPoint(k+d,a),new mxPoint(k,g)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(q,e)):q*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(k+d,g),new mxPoint(k+q,g),new mxPoint(k+q-d,a),new mxPoint(k+q,g+n),new mxPoint(k+d,g+n),new mxPoint(k,a),new mxPoint(k+d,g)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g+d),new mxPoint(V,g),new mxPoint(k+q,g+d),new mxPoint(k+q,g+n),new mxPoint(V,g+n-d),new mxPoint(k,g+n),new mxPoint(k,g+d)]):(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(k,g),new mxPoint(V,g+d),new mxPoint(k+
+q,g),new mxPoint(k+q,g+n-d),new mxPoint(V,g+n),new mxPoint(k,g+n-d),new mxPoint(k,g)]);V=new mxPoint(V,a);f&&(b.x<k||b.x>k+q?V.y=b.y:V.x=b.x);return mxUtils.getPerimeterPoint(g,V,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=F.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,k=a.y,g=a.width,q=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=q*Math.max(0,Math.min(1,d)),k=[new mxPoint(n,k),new mxPoint(e+g,k+d),new mxPoint(e+g,k+q-d),new mxPoint(n,k+q),new mxPoint(e,k+q-d),new mxPoint(e,k+d),new mxPoint(n,k)]):(d=g*Math.max(0,Math.min(1,d)),k=[new mxPoint(e+d,k),new mxPoint(e+g-d,k),new mxPoint(e+g,a),new mxPoint(e+g-d,k+q),new mxPoint(e+d,k+q),new mxPoint(e,a),new mxPoint(e+d,k)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+
+g?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(k,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(M,mxShape);M.prototype.size=10;M.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",M);mxUtils.extend(U,mxShape);U.prototype.size=
+10;U.prototype.inset=2;U.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+k);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-k,e/2);a.quadTo((f-e)/2-k,e+k,f/2,e+k);a.quadTo((f+e)/2+k,e+k,(f+e)/2+k,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",U);mxUtils.extend(ja,mxShape);ja.prototype.paintBackground=
function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ja);mxUtils.extend(ca,mxShape);ca.prototype.inset=2;ca.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-ca);mxUtils.extend(D,mxCylinder);D.prototype.jettyWidth=32;D.prototype.jettyHeight=12;D.prototype.redrawPath=function(a,c,b,f,d,e){var k=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=k/2;var k=b+k/2,g=.3*d-c/2,p=.7*d-c/2;e?(a.moveTo(b,g),a.lineTo(k,g),a.lineTo(k,g+c),a.lineTo(b,g+c),a.moveTo(b,p),a.lineTo(k,p),a.lineTo(k,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),
-a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(b,g),a.close());a.end()};mxCellRenderer.registerShape("component",D);mxUtils.extend(Y,mxDoubleEllipse);Y.prototype.outerStroke=!0;Y.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.registerShape("endState",Y);
+ca);mxUtils.extend(D,mxCylinder);D.prototype.jettyWidth=32;D.prototype.jettyHeight=12;D.prototype.redrawPath=function(a,c,b,f,d,e){var k=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=k/2;var k=b+k/2,g=.3*d-c/2,q=.7*d-c/2;e?(a.moveTo(b,g),a.lineTo(k,g),a.lineTo(k,g+c),a.lineTo(b,g+c),a.moveTo(b,q),a.lineTo(k,q),a.lineTo(k,q+c),a.lineTo(b,q+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),
+a.lineTo(b,q+c),a.lineTo(0,q+c),a.lineTo(0,q),a.lineTo(b,q),a.lineTo(b,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(b,g),a.close());a.end()};mxCellRenderer.registerShape("component",D);mxUtils.extend(Y,mxDoubleEllipse);Y.prototype.outerStroke=!0;Y.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.registerShape("endState",Y);
mxUtils.extend(qa,Y);qa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",qa);mxUtils.extend(ka,mxArrowConnector);ka.prototype.defaultWidth=4;ka.prototype.isOpenEnded=function(){return!0};ka.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ka.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ka);mxUtils.extend(la,mxArrowConnector);la.prototype.defaultWidth=
10;la.prototype.defaultArrowWidth=20;la.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};la.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};la.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",la);mxUtils.extend(ga,
-mxActor);ga.prototype.size=30;ga.prototype.isRoundable=function(){return!0};ga.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,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,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",ga);mxUtils.extend(R,mxRectangleShape);R.prototype.dx=20;R.prototype.dy=
-20;R.prototype.isHtmlAllowed=function(){return!1};R.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));k=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,
-b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+k,b);a.lineTo(c+k,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",R);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,
+mxActor);ga.prototype.size=30;ga.prototype.isRoundable=function(){return!0};ga.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,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,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",ga);mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy=
+20;Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*k,d*k));k=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,
+b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+k,b);a.lineTo(c+k,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",Q);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(na,mxActor);na.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.registerShape("crossbar",na);mxUtils.extend(da,mxActor);
da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),
-new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",da);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,k=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",S.prototype.arrowSize))));b=(d-e)/2;var e=b+e,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,c,
+new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",da);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,k=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",R.prototype.arrowSize))));b=(d-e)/2;var e=b+e,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,c,
b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(H,mxActor);H.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",H);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,
-0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",aa);mxUtils.extend(M,mxActor);M.prototype.size=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,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(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,
-d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",M);mxUtils.extend(T,mxActor);T.prototype.size=.375;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(a,c,b,f,d){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,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/
-2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",T);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);
+0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",aa);mxUtils.extend(N,mxActor);N.prototype.size=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,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(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,
+d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",N);mxUtils.extend(S,mxActor);S.prototype.size=.375;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(a,c,b,f,d){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,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/
+2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",S);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);
a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",fa);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};
mxCellRenderer.registerShape("sumEllipse",I);mxUtils.extend(oa,mxRhombus);oa.prototype.paintVertexShape=function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+
d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",X);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",
@@ -2559,47 +2559,47 @@ a.moveTo(c,b+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.
ya);mxUtils.extend(va,mxActor);va.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var k=(f-e)/2,e=k+e;a.moveTo(0,c);a.lineTo(k,c);a.lineTo(k,
0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(k,d);a.lineTo(k,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ia);mxUtils.extend(ba,mxActor);ba.prototype.size=.25;ba.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()};
mxCellRenderer.registerShape("display",ba);mxUtils.extend(pa,mxConnector);pa.prototype.origPaintEdgeShape=pa.prototype.paintEdgeShape;pa.prototype.paintEdgeShape=function(a,c,b){for(var f=[],d=0;d<c.length;d++)f.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;pa.prototype.origPaintEdgeShape.apply(this,[a,f,b]);3<=a.state.strokeWidth&&(f=mxUtils.getValue(this.style,"fillColor",null),null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),pa.prototype.origPaintEdgeShape.apply(this,
-[a,c,b])))};mxCellRenderer.registerShape("filledEdge",pa);"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,f,d,e,k,g,p,n){var q=d*(k+p+1),t=e*(k+p+1);return function(){a.begin();
-a.moveTo(f.x-q/2-t/2,f.y-t/2+q/2);a.lineTo(f.x+t/2-3*q/2,f.y-3*t/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,k,g,p,n){var q=d*(k+p+1),t=e*(k+p+1);return function(){a.begin();a.moveTo(f.x-q/2-t/2,f.y-t/2+q/2);a.lineTo(f.x+t/2-3*q/2,f.y-3*t/2-q/2);a.moveTo(f.x-q/2+t/2,f.y-t/2-q/2);a.lineTo(f.x-t/2-3*q/2,f.y-3*t/2+q/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,k,g,p,n){var q=f.clone(),t=Ca.apply(this,arguments),y=d*(k+
-2*p),l=e*(k+2*p);return function(){t.apply(this,arguments);a.begin();a.moveTo(q.x-d*p,q.y-e*p);a.lineTo(q.x-2*y+d*p,q.y-2*l+e*p);a.moveTo(q.x-y-l+e*p,q.y-l+y-d*p);a.lineTo(q.x+l-y-e*p,q.y-l-y+d*p);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,f,d,e,k,g,p,n){c=d*p*1.118;b=e*p*1.118;d*=k+p;e*=k+p;var q=f.clone();q.x-=c;q.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(q.x,q.y);g?a.lineTo(q.x-d-e/2,q.y-e+d/2):a.lineTo(q.x+e/2-d,q.y-e-d/2);a.lineTo(q.x-d,q.y-e);a.close();n?
-a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,k,g,p,n,q){e*=g+n;k*=g+n;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);p?c.lineTo(t.x-e-k/a,t.y-k+e/a):c.lineTo(t.x+k/a-e,t.y-k-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,b){return xa(a,["width"],c,function(c,f,d,e,k){k=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*k/2,e.y+d*c/4-f*k/2)},function(c,f,d,e,k,
-g){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-b})},xa=function(a,c,b,f,d){return U(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var k=a.view.scale,g=b?d[0]:d[e],d=b?d[1]:d[e-1],e=d.x-g.x,p=d.y-g.y,n=Math.sqrt(e*e+p*p),g=f.call(this,n,e/n,p/n,g,d);return new mxPoint(g.x/k-c.x,g.y/k-c.y)},function(c,f,e){var k=a.absolutePoints,g=k.length-1;c=a.view.translate;var p=a.view.scale,n=b?k[0]:k[g],k=b?k[1]:k[g-1],g=k.x-n.x,
-q=k.y-n.y,t=Math.sqrt(g*g+q*q);f.x=(f.x+c.x)*p;f.y=(f.y+c.y)*p;d.call(this,t,g/t,q/t,n,k,f,e)})},sa=function(a){return function(c){return[U(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*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))})]}},La=function(a,c,b){return function(f){var d=[U(f,["size"],function(b){var f=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+f,b.y+f)},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(f.style,mxConstants.STYLE_ROUNDED,
-!1)&&d.push(ta(f));return d}},Fa=function(a,c,b,f,d){b=null!=b?b:1;return function(e){var k=[U(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){var k=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=k?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));k&&!mxEvent.isAltDown(f.getEvent())&&
-(a=e.view.graph.snap(a));this.state.style.size=a},null,f)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&k.push(ta(e));return k}},Ma=function(a){return function(c){var b=[U(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.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(ta(c));return b}},Da=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ta(a));return c}},ta=function(a,c){return U(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,
+[a,c,b])))};mxCellRenderer.registerShape("filledEdge",pa);"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,f,d,e,k,g,q,n){var p=d*(k+q+1),u=e*(k+q+1);return function(){a.begin();
+a.moveTo(f.x-p/2-u/2,f.y-u/2+p/2);a.lineTo(f.x+u/2-3*p/2,f.y-3*u/2-p/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,k,g,q,n){var p=d*(k+q+1),u=e*(k+q+1);return function(){a.begin();a.moveTo(f.x-p/2-u/2,f.y-u/2+p/2);a.lineTo(f.x+u/2-3*p/2,f.y-3*u/2-p/2);a.moveTo(f.x-p/2+u/2,f.y-u/2-p/2);a.lineTo(f.x-u/2-3*p/2,f.y-3*u/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,k,g,q,n){var p=f.clone(),u=Ca.apply(this,arguments),l=d*(k+
+2*q),x=e*(k+2*q);return function(){u.apply(this,arguments);a.begin();a.moveTo(p.x-d*q,p.y-e*q);a.lineTo(p.x-2*l+d*q,p.y-2*x+e*q);a.moveTo(p.x-l-x+e*q,p.y-x+l-d*q);a.lineTo(p.x+x-l-e*q,p.y-x-l+d*q);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,f,d,e,k,g,q,n){c=d*q*1.118;b=e*q*1.118;d*=k+q;e*=k+q;var p=f.clone();p.x-=c;p.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(p.x,p.y);g?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);a.lineTo(p.x-d,p.y-e);a.close();n?
+a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,k,g,q,n,p){e*=g+n;k*=g+n;var u=d.clone();return function(){c.begin();c.moveTo(u.x,u.y);q?c.lineTo(u.x-e-k/a,u.y-k+e/a):c.lineTo(u.x+k/a-e,u.y-k-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,c,b){return xa(a,["width"],c,function(c,f,d,e,k){k=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*k/2,e.y+d*c/4-f*k/2)},function(c,f,d,e,k,
+g){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-b})},xa=function(a,c,b,f,d){return T(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var k=a.view.scale,g=b?d[0]:d[e],d=b?d[1]:d[e-1],e=d.x-g.x,q=d.y-g.y,n=Math.sqrt(e*e+q*q),g=f.call(this,n,e/n,q/n,g,d);return new mxPoint(g.x/k-c.x,g.y/k-c.y)},function(c,f,e){var k=a.absolutePoints,g=k.length-1;c=a.view.translate;var q=a.view.scale,n=b?k[0]:k[g],k=b?k[1]:k[g-1],g=k.x-n.x,
+p=k.y-n.y,u=Math.sqrt(g*g+p*p);f.x=(f.x+c.x)*q;f.y=(f.y+c.y)*q;d.call(this,u,g/u,p/u,n,k,f,e)})},sa=function(a){return function(c){return[T(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*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))})]}},La=function(a,c,b){return function(f){var d=[T(f,["size"],function(b){var f=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+f,b.y+f)},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(f.style,mxConstants.STYLE_ROUNDED,
+!1)&&d.push(ta(f));return d}},Fa=function(a,c,b,f,d){b=null!=b?b:1;return function(e){var k=[T(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){var k=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=k?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));k&&!mxEvent.isAltDown(f.getEvent())&&
+(a=e.view.graph.snap(a));this.state.style.size=a},null,f)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&k.push(ta(e));return k}},Ma=function(a){return function(c){var b=[T(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.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(ta(c));return b}},Da=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ta(a));return c}},ta=function(a,c){return T(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=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)*d),b.y+f)},function(c,b,f){"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))))})},
-U=function(a,c,b,f,d,e){var k=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);k.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};k.getPosition=b;k.setPosition=f;k.ignoreGrid=null!=d?d:!0;if(e){var g=k.positionChanged;k.positionChanged=function(){g.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return k},Ga={link:function(a){return[Ea(a,!0,10),Ea(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(xa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,
-e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE])})),b.push(xa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,
-k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-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(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
+T=function(a,c,b,f,d,e){var k=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);k.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};k.getPosition=b;k.setPosition=f;k.ignoreGrid=null!=d?d:!0;if(e){var g=k.positionChanged;k.positionChanged=function(){g.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return k},Ga={link:function(a){return[Ea(a,!0,10),Ea(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(xa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,k,g,q){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,
+e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(q.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(q.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(xa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,k,g,q){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,
+k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-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(q.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(q.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(xa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);
-mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(xa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+
-b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,k,g,p){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-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(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],
-a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[U(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
+5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,k,g,q){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(q.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);
+mxEvent.isAltDown(q.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(xa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+
+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,k,g,q){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,g.x,g.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-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(q.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],
+a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(q.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=[T(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(ta(a,b/2))}return c},label:Da(),ext:Da(),rectangle:Da(),triangle:Da(),rhombus:Da(),umlLifeline:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[U(a,
+parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ta(a,b/2))}return c},label:Da(),ext:Da(),rectangle:Da(),triangle:Da(),rhombus:Da(),umlLifeline:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[T(a,
["width","height"],function(a){var c=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),b=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},
-process:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",g.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(ta(a));return c},cross:function(a){return[U(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",l.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=[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ga.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(ta(a));return c},dataStorage:function(a){return[U(a,
-["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.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=[U(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));
-mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",z.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}),U(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.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}),U(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height-
-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ta(a));return c},internalStorage:function(a){var c=[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",R.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
-R.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ta(a));return c},corner:function(a){return[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
-W.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=
-Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:sa(1),doubleArrow:sa(.5),folder:function(a){return[U(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",r.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",r.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",r.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",r.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[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));
-return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.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[U(a,["size"],function(a){var c=
-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.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:Fa(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Fa(F.prototype.size,!0,.5,!0),curlyBracket:Fa(k.prototype.size,!1),display:Fa(ba.prototype.size,!1),cube:La(1,a.prototype.size,!1),card:La(.5,u.prototype.size,!0),loopLimit:La(.5,M.prototype.size,
-!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=U;Graph.handleFactory=Ga;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=Ga[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ga[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};
+process:function(a){var c=[T(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",g.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(ta(a));return c},cross:function(a){return[T(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",l.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=[T(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ga.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(ta(a));return c},dataStorage:function(a){return[T(a,
+["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.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=[T(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));
+mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",z.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}),T(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.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}),T(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height-
+c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ta(a));return c},internalStorage:function(a){var c=[T(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
+Q.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ta(a));return c},corner:function(a){return[T(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
+W.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[T(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=
+Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:sa(1),doubleArrow:sa(.5),folder:function(a){return[T(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",r.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",r.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",r.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",r.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[T(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));
+return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[T(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(a.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[T(a,["size"],function(a){var c=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.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:Fa(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:Fa(F.prototype.size,!0,.5,!0),curlyBracket:Fa(k.prototype.size,!1),display:Fa(ba.prototype.size,!1),cube:La(1,a.prototype.size,!1),card:La(.5,t.prototype.size,!0),loopLimit:La(.5,N.prototype.size,
+!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=T;Graph.handleFactory=Ga;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=Ga[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ga[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=Ga[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ha=new mxPoint(1,0),Ia=new mxPoint(1,0),sa=mxUtils.toRadians(-30),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(sa),Math.sin(sa)),sa=mxUtils.toRadians(-150),
-Ia=mxUtils.getRotatedPoint(Ia,Math.cos(sa),Math.sin(sa));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));var p=Ha.x,n=Ha.y,q=Ia.x,t=Ia.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){a=function(a,c,
-b){a-=l.x;var f=c-l.y;c=(t*a-q*f)/(p*t-n*q);a=(n*a-p*f)/(n*q-p*t);y?(b&&(l=new mxPoint(l.x+p*c,l.y+n*c),d.push(l)),l=new mxPoint(l.x+q*a,l.y+t*a)):(b&&(l=new mxPoint(l.x+q*a,l.y+t*a),d.push(l)),l=new mxPoint(l.x+p*c,l.y+n*c));d.push(l)};var l=g;null==f&&(f=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(f.x,f.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==
+Ia=mxUtils.getRotatedPoint(Ia,Math.cos(sa),Math.sin(sa));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));var q=Ha.x,n=Ha.y,p=Ia.x,u=Ia.y,l="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){a=function(a,c,
+b){a-=x.x;var f=c-x.y;c=(u*a-p*f)/(q*u-n*p);a=(n*a-q*f)/(n*p-q*u);l?(b&&(x=new mxPoint(x.x+q*c,x.y+n*c),d.push(x)),x=new mxPoint(x.x+p*a,x.y+u*a)):(b&&(x=new mxPoint(x.x+p*a,x.y+u*a),d.push(x)),x=new mxPoint(x.x+q*c,x.y+n*c));d.push(x)};var x=g;null==f&&(f=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(f.x,f.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==
mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Na.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,b){a=[];var f=Math.tan(mxUtils.toRadians(30)),d=(.5-f)/2,f=Math.min(c,b/(.5+f));c=(c-f)/2;b=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+f*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,
b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*f));return a};z.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",
this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2608,23 +2608,23 @@ this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.s
mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=
mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),
!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,
-0),!1));return a};u.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));return a};t.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));return a};r.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c-f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,
-1),!1));return a};R.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;I.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.getConstraints=
+1),!1));return a};Q.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;I.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.getConstraints=
function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};M.prototype.constraints=mxRectangleShape.prototype.constraints;T.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,
+0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};N.prototype.constraints=mxRectangleShape.prototype.constraints;S.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)];C.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)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(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,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];L.prototype.constraints=
+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)];y.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)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,
+.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];M.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
@@ -2635,9 +2635,9 @@ function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(
0),!1,null,.25*c-.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};W.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-1),!1)];S.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};ha.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",S.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1)];R.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};ha.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",R.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,b));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,k=(c-d)/2,d=k+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2649,7 +2649,7 @@ function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.o
": "+c.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=l;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=l;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=l;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=l;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 e=0;e<b.length&&a;e++)a=a&&d.model.isEdge(b[e]);var c=d.view.translate,f=d.view.scale,k=c.x,q=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var g=Math.round(d.snap(d.popupMenuHandler.triggerX/f-k)),l=Math.round(d.snap(d.popupMenuHandler.triggerY/f-q));d.cellsMoved(b,g-c.x,l-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",
+try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&d.model.isEdge(b[e]);var c=d.view.translate,f=d.view.scale,k=c.x,p=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var g=Math.round(d.snap(d.popupMenuHandler.triggerX/f-k)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/f-p));d.cellsMoved(b,g-c.x,x-c.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 l=d.getCellGeometry(e[a]);null!=l&&(l=l.clone(),l.width=b.copiedSize.width,l.height=
b.copiedSize.height,d.getModel().setGeometry(e[a],l))}}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();
@@ -2660,8 +2660,8 @@ null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelecti
320,200,!0,!0);e.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(),e=a.getLinkForCell(d)||"";b.showLinkDialog(e,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=l;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var e=null,c=d.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,c=b[0].name||b[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&&
(c=c.substring(0,30)+"..."));var f=d.getFreeInsertPoint(),e=new mxCell(c,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));e.vertex=!0;d.setLinkForCell(e,a);d.cellSizeUpdated(e,!0);d.getModel().beginUpdate();try{e=d.addCell(e),d.fireEvent(new mxEventObject("cellsInserted","cells",[e]))}finally{d.getModel().endUpdate()}d.setSelectionCell(e);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=
-l;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),e=a.getParentByName(d,"A",a.cellEditor.textarea),c="";if(null==e&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),k=0;k<f.length&&null==e;k++)f[k].textContent==d.textContent&&(e=f[k]);null!=e&&"A"==e.nodeName&&(c=e.getAttribute("href")||"",a.selectNode(e));var q=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"),
-mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(q);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=l;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().getChildCount(e))d.updateGroupBounds([e],20);else{var c=d.view.getState(e),f=d.getCellGeometry(e);d.getModel().isVertex(e)&&null!=c&&null!=c.text&&
+l;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),e=a.getParentByName(d,"A",a.cellEditor.textarea),c="";if(null==e&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),k=0;k<f.length&&null==e;k++)f[k].textContent==d.textContent&&(e=f[k]);null!=e&&"A"==e.nodeName&&(c=e.getAttribute("href")||"",a.selectNode(e));var p=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"),
+mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(p);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=l;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().getChildCount(e))d.updateGroupBounds([e],20);else{var c=d.view.getState(e),f=d.getCellGeometry(e);d.getModel().isVertex(e)&&null!=c&&null!=c.text&&
null!=f&&d.isWrapping(e)?(f=f.clone(),f.height=c.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(e,f)):d.updateCellSize(e)}}}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,l=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(l=l.replace(/\n/g,
"").replace(/<br\s*.?>/g,"\n"));var c=document.createElement("div");c.innerHTML=l;l=mxUtils.extractTextWithWhitespace(c.childNodes);d.cellLabelChanged(a.cell,l)}else l=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(l));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)},
@@ -2689,8 +2689,8 @@ if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mx
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 l=d.view.translate,c=d.view.scale,f=l.x,l=l.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=k;)f+=k.x,l+=k.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);f=Math.round(d.snap(d.popupMenuHandler.triggerX/c-f));
c=Math.round(d.snap(d.popupMenuHandler.triggerY/c-l));b.addPointAt(b.state,f,c)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().isEdge(e)){var c=d.getCellGeometry(e);null!=c&&(c=c.clone(),c.points=null,d.getModel().setGeometry(e,
c))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");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()),l="";null!=e&&(l=e.style[mxConstants.STYLE_IMAGE]||l);var c=d.cellEditor.saveSelection();b.showImageDialog(a,l,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(c),d.insertImage(a,b,e);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var k=null;d.getModel().beginUpdate();try{if(0==f.length){var q=d.getFreeInsertPoint(),k=f=[d.insertVertex(d.getDefaultParent(),
-null,"",q.x,q.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",k))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var l=d.view.getState(f[0]),t=null!=l?l.style:d.getCellStyle(f[0]);"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&
+mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),l="";null!=e&&(l=e.style[mxConstants.STYLE_IMAGE]||l);var c=d.cellEditor.saveSelection();b.showImageDialog(a,l,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(c),d.insertImage(a,b,e);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var k=null;d.getModel().beginUpdate();try{if(0==f.length){var p=d.getFreeInsertPoint(),k=f=[d.insertVertex(d.getDefaultParent(),
+null,"",p.x,p.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",k))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var l=d.view.getState(f[0]),u=null!=l?l.style:d.getCellStyle(f[0]);"image"!=u[mxConstants.STYLE_SHAPE]&&"label"!=u[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&
null!=b&&null!=e){var m=f[0],v=d.getModel().getGeometry(m);null!=v&&(v=v.clone(),v.width=b,v.height=e,d.getModel().setGeometry(m,v))}}finally{d.getModel().endUpdate()}null!=k&&(d.setSelectionCells(k),d.scrollCellToVisible(k[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=l;m=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");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",
mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),
@@ -2701,27 +2701,27 @@ DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E
DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=l?this.mergeFile(l,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,e,d){var l=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),r=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=r&&0<r.length){this.shadowPages=r;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(u)){var x=this.ui.patchPages(m,
-u[0]);d={};var A=this.ui.getHashValueForPages(x,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==A,A);if(null!=A&&A!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(r)),k=this.compressReportData(this.getAnonymizedXmlForPages(x)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+A+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+k,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(z);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var g=this.getCurrentUser(),y=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,z)}}catch(t){}}};
+DrawioFile.prototype.mergeFile=function(a,b,e,d){var l=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),r=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=r&&0<r.length){this.shadowPages=r;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var t=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(t)){var y=this.ui.patchPages(m,
+t[0]);d={};var A=this.ui.getHashValueForPages(y,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",t,"checksum",c==A,A);if(null!=A&&A!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(r)),k=this.compressReportData(this.getAnonymizedXmlForPages(y)),p=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,t,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+A+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+p+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+k,null,"mergeFile");return}this.patch(t,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(z);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var g=this.getCurrentUser(),x=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,z)}}catch(u){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var l=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,l,!0);e.appendChild(l)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,b,e,d,l){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var r=this.getCurrentUser(),u=null!=r?r.id:"unknown";EditorUi.logError("Checksum Error in "+l+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:l,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(x){}}}catch(x){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),r=this.getCurrentUser(),u=null!=r?this.ui.hashValue(r.id):"unknown",x=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),c=A.lastIndexOf("."),r="xml";0<c&&(r=A.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+r+")\nUser="+u+x+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var r=this.getCurrentUser(),t=null!=r?r.id:"unknown";EditorUi.logError("Checksum Error in "+l+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:l,label:"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(y){}}}catch(y){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),r=this.getCurrentUser(),t=null!=r?this.ui.hashValue(r.id):"unknown",y=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),c=A.lastIndexOf("."),r="xml";0<c&&(r=A.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+r+")\nUser="+t+y+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+
(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+l+"\n\nData:\n"+m,d)}catch(k){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=
this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),l=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var r=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,x=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var c=
-0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=r;e.history=d;e.indexOfNextAdd=l;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)x!=
-m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(u!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),l=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var r=this.changeListenerEnabled;this.changeListenerEnabled=!1;var t=m.foldingEnabled,y=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var c=
+0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=r;e.history=d;e.indexOfNextAdd=l;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)y!=
+m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(t!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,b,e,d,l,m){try{if(this.isEditable())if(!l&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(r){if(null!=e)e(r);else throw r;}};
-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.inConflictState&&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.updateFileData=function(){var a=null!=this.ui.fileNode?"false"==this.ui.fileNode.getAttribute("compressed"):!1;this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,a))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};
+DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};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(){this.stats.opened++;var a=this.getData();null!=a&&(this.ui.setFileData(a),this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null));this.installListeners();this.isSyncSupported()&&this.startSync()};DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(a,b){a(null)};
DrawioFile.prototype.loadDescriptor=function(a,b){a(null)};DrawioFile.prototype.loadPatchDescriptor=function(a,b){this.loadDescriptor(mxUtils.bind(this,function(b){a(b)}),b)};DrawioFile.prototype.patchDescriptor=function(a,b){this.setDescriptorEtag(a,this.getDescriptorEtag(b))};DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.sync.start())};
@@ -2745,13 +2745,13 @@ mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),d,mxResources.get("
e)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=null!=a?null!=a.error?a.error.message:a.message:null;null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
-function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,l):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(l,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,
-d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,l):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(l,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(e,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=
this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};
DrawioFile.prototype.fileSaved=function(a,b,e,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,a)}catch(r){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(r);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,r);else{var l=
-this.getCurrentUser(),m=null!=l?l.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,r)}}catch(u){}}};
+this.getCurrentUser(),m=null!=l?l.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,r)}}catch(t){}}};
DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==l&&(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=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -2785,44 +2785,45 @@ dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"M
dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1}];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## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\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,refs,manager\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. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## 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.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){f.push(b[d]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=Graph.decompress(b),0<b.length&&
(f=mxUtils.parseXml(b),a=f.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||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,
-Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=Graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),
-"mxGraphModel"==a.substring(0,d)&&(a=Graph.bytesToString(pako.inflateRaw(a.substring(d+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(G){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};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;
-DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;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 f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(b,f)}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=
-a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(b,f),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!c)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
-Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var c=[],b=0;b<a;b++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.timeout=25E3;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],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,
-this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}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(Q){}return!1};Editor.prototype.extractGraphModel=function(a,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=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:DRAW_MATH_URL+"/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&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");
-if(null!=f&&0<f.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};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,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.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?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,
-a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),
-function(){c(EditorUi.prototype.svgBrokenImage.src)});else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=b.height;a.width=b.width;f.drawImage(b,0,0);try{c(a.toDataURL())}catch(N){c(EditorUi.prototype.svgBrokenImage.src)}};b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());
-var d=0,e=b||{};b=mxUtils.bind(this,function(b,k){for(var g=a.getElementsByTagName(b),n=0;n<g.length;n++)mxUtils.bind(this,function(b){var g=f.convert(b.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var n=e[g];null==n?(d++,this.convertImageToDataUri(g,function(f){null!=f&&(e[g]=f,b.setAttribute(k,f));d--;0==d&&c(a)})):b.setAttribute(k,n)}else null!=g&&b.setAttribute(k,g)})(g[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=
-0,f=a.length,d,e,k;b<f;){d=a.charCodeAt(b++)&255;if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e){try{var k=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
+Math.min(b.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var c=mxUtils.trim(mxUtils.getTextContent(a)),b=null;0<c.length?(a=Graph.decompress(c),null!=a&&0<a.length&&(b=mxUtils.parseXml(a).documentElement)):(a=mxUtils.getChildNodes(a),0<a.length&&(b=mxUtils.createXmlDocument(),b.appendChild(b.importNode(a[0],!0)),b=b.documentElement));return b};Editor.getDiagramNodeXml=
+function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=Graph.bytesToString(pako.inflateRaw(a.substring(d+
+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(G){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};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;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;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 f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(b,f)}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=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=
+a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=
+a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(b,f),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins&&!c)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=
+a?a:Editor.GUID_LENGTH;for(var c=[],b=0;b<a;b++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.timeout=25E3;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],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?
+this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?
+!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}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(P){}return!1};Editor.prototype.extractGraphModel=function(a,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=
+this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=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:DRAW_MATH_URL+"/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&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var d=document.createElement("script");
+d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};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,f,d){void 0!==
+b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.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?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==
+a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),function(){c(EditorUi.prototype.svgBrokenImage.src)});
+else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=b.height;a.width=b.width;f.drawImage(b,0,0);try{c(a.toDataURL())}catch(L){c(EditorUi.prototype.svgBrokenImage.src)}};b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,
+k){for(var g=a.getElementsByTagName(b),n=0;n<g.length;n++)mxUtils.bind(this,function(b){var g=f.convert(b.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var n=e[g];null==n?(d++,this.convertImageToDataUri(g,function(f){null!=f&&(e[g]=f,b.setAttribute(k,f));d--;0==d&&c(a)})):b.setAttribute(k,n)}else null!=g&&b.setAttribute(k,g)})(g[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,k;b<f;){d=a.charCodeAt(b++)&255;
+if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}k=
+a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e){try{var k=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+this.base64Encode(f)}c(f)}}else null!=
-b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},k,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(L){null!=b&&b(L)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),f=0,d={},e=mxUtils.bind(this,function(){if(0==f){for(var e=[b[0]],k=1;k<b.length;k++){var g=
-b[k].indexOf(")");e.push('url("');e.push(d[c(b[k].substring(0,g))]);e.push('"'+b[k].substring(g))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var g=b[k].indexOf(")"),n=null,q=b[k].indexOf("format(",g);0<q&&(n=c(b[k].substring(q+7,b[k].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c=
+b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},k,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(M){null!=b&&b(M)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),f=0,d={},e=mxUtils.bind(this,function(){if(0==f){for(var e=[b[0]],k=1;k<b.length;k++){var g=
+b[k].indexOf(")");e.push('url("');e.push(d[c(b[k].substring(0,g))]);e.push('"'+b[k].substring(g))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var g=b[k].indexOf(")"),n=null,p=b[k].indexOf("format(",g);0<p&&(n=c(b[k].substring(p+7,b[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c=
"application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.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){d[a]=c;f--;e()}),mxUtils.bind(this,
function(a){f--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,g)),n)}}else a()};Editor.prototype.convertMath=function(a,c,b,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(c),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,function(){f()}))}),0)):f()};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.graph.mathEnabled&&this.useCanvasForExport};Editor.prototype.exportToCanvas=
-function(a,c,b,f,d,e,k,g,n,q,t,l,y,v){e=null!=e?e:!0;l=null!=l?l:this.graph;y=null!=y?y:0;var p=n?null:l.background;p==mxConstants.NONE&&(p=null);null==p&&(p=f);null==p&&0==n&&(p=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(p,null,null,v,null,null!=k?k:!0,null,null,null,q),mxUtils.bind(this,function(b){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var k=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));g=null!=
-g?g:1;null!=c&&(g=e?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(g*n)+2*y;q=Math.ceil(g*q)+2*y;k.setAttribute("width",n);k.setAttribute("height",q);var t=k.getContext("2d");null!=p&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=p,t.fill());t.scale(g,g);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(f,y/g,y/g);a(k)},0):(t.drawImage(f,y/g,y/g),a(k))}catch(S){null!=d&&d(S)}});f.onerror=function(a){null!=d&&d(a)};try{q&&this.graph.addSvgShadow(b);var k=mxUtils.bind(this,function(){if(null!=
-this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(l,b,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(b))}))});this.loadFonts(k)}catch(R){null!=d&&d(R)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=n;n+=c;return a.substring(b,n)}function k(a){a=e(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(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,n);do{var q=k(a);if("IDAT"==e(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;
-f=EditorUi.prototype.updateCRC(f,c,0,4);f=EditorUi.prototype.updateCRC(f,b,0,b.length);d+=g(b.length)+c+b+g(f^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+q);e(a,q);e(a,4)}while(q);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var l=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+function(a,c,b,f,d,e,k,g,n,p,u,l,x,v){e=null!=e?e:!0;l=null!=l?l:this.graph;x=null!=x?x:0;var q=n?null:l.background;q==mxConstants.NONE&&(q=null);null==q&&(q=f);null==q&&0==n&&(q=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(q,null,null,v,null,null!=k?k:!0,null,null,null,p),mxUtils.bind(this,function(b){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var k=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),p=parseInt(b.getAttribute("height"));g=null!=
+g?g:1;null!=c&&(g=e?Math.min(1,Math.min(3*c/(4*p),c/n)):c/n);n=Math.ceil(g*n)+2*x;p=Math.ceil(g*p)+2*x;k.setAttribute("width",n);k.setAttribute("height",p);var u=k.getContext("2d");null!=q&&(u.beginPath(),u.rect(0,0,n,p),u.fillStyle=q,u.fill());u.scale(g,g);mxClient.IS_SF?window.setTimeout(function(){u.drawImage(f,x/g,x/g);a(k)},0):(u.drawImage(f,x/g,x/g),a(k))}catch(R){null!=d&&d(R)}});f.onerror=function(a){null!=d&&d(a)};try{p&&this.graph.addSvgShadow(b);var k=mxUtils.bind(this,function(){if(null!=
+this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(l,b,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(b))}))});this.loadFonts(k)}catch(Q){null!=d&&d(Q)}}),b,u)};Editor.prototype.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=n;n+=c;return a.substring(b,n)}function k(a){a=e(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(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,n);do{var p=k(a);if("IDAT"==e(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;
+f=EditorUi.prototype.updateCRC(f,c,0,4);f=EditorUi.prototype.updateCRC(f,b,0,b.length);d+=g(b.length)+c+b+g(f^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+p);e(a,p);e(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var l=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.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 r=Format.prototype.init;Format.prototype.init=function(){r.apply(this,arguments);
-this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.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 x=DiagramFormatPanel.prototype.addView;
-DiagramFormatPanel.prototype.addView=function(a){a=x.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},
+this.editorUi.editor.addListener("fileLoaded",this.update)};var t=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?t.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var y=DiagramFormatPanel.prototype.addView;
+DiagramFormatPanel.prototype.addView=function(a){a=y.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},
destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var A=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=A.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},
function(a){c.editor.setAutosave(a);c.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},
{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";d.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
@@ -2847,24 +2848,24 @@ type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,de
stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},
{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",
stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=0;f<a.length;f++)c[a[f].name]=a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&
-null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(N){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
+null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(L){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},f=a.vertices,d=a.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],b,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),
b,a))}};var f=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 f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){p.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var k=[],g=b.parentRow.nextSibling;g&&
-g.getAttribute("data-pName")==a;)k.push(g.getAttribute("data-pValue")),g=g.nextSibling;b.index<k.length?null!=f?k.splice(f,1):k[b.index]=c:k.push(c);null!=b.size&&k.length>b.size&&(k=k.slice(0,b.size));c=k.join(",");null!=b.countProperty&&(p.setCellStyles(b.countProperty,k.length,p.getSelectionCells()),d.push(b.countProperty),e.push(k.length))}p.setCellStyles(a,c,p.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],
-q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var l=q.length;l<c;l++)q.push(n);q=q.join(",");p.setCellStyles(b.dependentProps[a],q,p.getSelectionCells());d.push(b.dependentProps[a]);e.push(q)}if("function"==typeof b.onChange)b.onChange(p,c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";
-b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+
-"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function k(a,c,b,d,e,k,g){null!=c&&(c=c.split(","),l.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:k,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var n=k,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,t++;else break;var p={type:b,parentRow:k,index:t,isDeletable:!0,
-defVal:d,countProperty:e},t=q(a,"",p,0==t%2,g);f(a,d,p);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function g(a,c,b,f,d,e,k){if(0<d){var g=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)g[n]=null!=c[n]?c[n]:null!=f?f:"";l.push({name:a,values:g,type:b,defVal:f,parentRow:e,flipBkg:k,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type=
-"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function q(c,b,q,p,l){var y=q.dispName,v=q.type,B=document.createElement("tr");B.className="gePropRow"+(l?"Dark":"")+(p?"Alt":"")+" gePropNonHeaderRow";B.setAttribute("data-pName",c);B.setAttribute("data-pValue",b);p=!1;null!=q.index&&(B.setAttribute("data-index",q.index),y=(null!=y?y:"")+"["+q.index+"]",p=!0);var z=document.createElement("td");z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(y,
-null,y));p&&(z.style.textAlign="right");B.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(e(c,b,q));else if("bool"==v||"boolean"==v)z.appendChild(n(c,b,q));else if("enum"==v){var m=q.enumList;for(l=0;l<m.length;l++)if(y=m[l],y.val==b){z.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(t,function(){var e=document.createElement("select");d(z,e);for(var k=0;k<m.length;k++){var g=
-m[k],n=document.createElement("option");n.value=mxUtils.htmlEntities(g.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,q)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==v?z.appendChild(k(c,b,q.subType,q.subDefVal,q.countProperty,B,l)):"staticArr"==v?z.appendChild(g(c,b,q.subType,q.subDefVal,q.size,
-B,l)):(z.innerHTML=b,mxEvent.addListener(z,"click",mxUtils.bind(t,function(){function e(){var a=k.value,a=0==a.length&&"string"!=v?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(c,a,q)}var k=document.createElement("input");d(z,k,!0);k.value=b;k.className="gePropEditor";"int"!=v&&"float"!=v||q.allowAuto||(k.type="number",k.step=
-"int"==v?"1":"any",null!=q.min&&(k.min=parseFloat(q.min)),null!=q.max&&(k.max=parseFloat(q.max)));a.appendChild(k);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&e()});k.focus();mxEvent.addListener(k,"blur",function(){e()})})));q.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(t,function(a){f(c,"",q,q.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",z.appendChild(l));B.appendChild(z);return B}var t=this,p=this.editorUi.editor.graph,
-l=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.style.whiteSpace="nowrap";y.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;z.appendChild(m);mxUtils.write(z,mxResources.get("property"));v.style.cursor="pointer";var r=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){m.src=
-Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(I){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;r()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");
-v.appendChild(z);y.appendChild(v);var F=!1,C=!1,E;for(E in c)if(v=c[E],"function"!=typeof v.isVisible||v.isVisible(b)){var u=null!=b.style[E]?mxUtils.htmlEntities(b.style[E]+""):v.defVal;if("separator"==v.type)C=!C;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,x=[],A=[],z=0;z<J.length;z++){var H=b.style[J[z]];A.push(c[J[z]].subDefVal);x.push(null!=H?H.split(","):[])}v.dependentPropsDefVal=
-A;v.dependentPropsVals=x}y.appendChild(q(E,u,v,F,C));F=!F}}for(z=0;z<l.length;z++)for(v=l[z],c=v.parentRow,b=0;b<v.values.length;b++)E=q(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;a.appendChild(y);r();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();
+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 f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){q.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var k=[],g=b.parentRow.nextSibling;g&&
+g.getAttribute("data-pName")==a;)k.push(g.getAttribute("data-pValue")),g=g.nextSibling;b.index<k.length?null!=f?k.splice(f,1):k[b.index]=c:k.push(c);null!=b.size&&k.length>b.size&&(k=k.slice(0,b.size));c=k.join(",");null!=b.countProperty&&(q.setCellStyles(b.countProperty,k.length,q.getSelectionCells()),d.push(b.countProperty),e.push(k.length))}q.setCellStyles(a,c,q.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],
+p=b.dependentPropsVals[a];if(p.length>c)p=p.slice(0,c);else for(var l=p.length;l<c;l++)p.push(n);p=p.join(",");q.setCellStyles(b.dependentProps[a],p,q.getSelectionCells());d.push(b.dependentProps[a]);e.push(p)}if("function"==typeof b.onChange)b.onChange(q,c);u.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";
+b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(u,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+
+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function k(a,c,b,d,e,k,g){null!=c&&(c=c.split(","),l.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:k,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(u,function(c){for(var n=k,u=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,u++;else break;var q={type:b,parentRow:k,index:u,isDeletable:!0,
+defVal:d,countProperty:e},u=p(a,"",q,0==u%2,g);f(a,d,q);n.parentNode.insertBefore(u,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function g(a,c,b,f,d,e,k){if(0<d){var g=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)g[n]=null!=c[n]?c[n]:null!=f?f:"";l.push({name:a,values:g,type:b,defVal:f,parentRow:e,flipBkg:k,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type=
+"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function p(c,b,p,q,l){var x=p.dispName,v=p.type,B=document.createElement("tr");B.className="gePropRow"+(l?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";B.setAttribute("data-pName",c);B.setAttribute("data-pValue",b);q=!1;null!=p.index&&(B.setAttribute("data-index",p.index),x=(null!=x?x:"")+"["+p.index+"]",q=!0);var z=document.createElement("td");z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(x,
+null,x));q&&(z.style.textAlign="right");B.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(e(c,b,p));else if("bool"==v||"boolean"==v)z.appendChild(n(c,b,p));else if("enum"==v){var m=p.enumList;for(l=0;l<m.length;l++)if(x=m[l],x.val==b){z.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(u,function(){var e=document.createElement("select");d(z,e);for(var k=0;k<m.length;k++){var g=
+m[k],n=document.createElement("option");n.value=mxUtils.htmlEntities(g.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,p)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==v?z.appendChild(k(c,b,p.subType,p.subDefVal,p.countProperty,B,l)):"staticArr"==v?z.appendChild(g(c,b,p.subType,p.subDefVal,p.size,
+B,l)):(z.innerHTML=b,mxEvent.addListener(z,"click",mxUtils.bind(u,function(){function e(){var a=k.value,a=0==a.length&&"string"!=v?0:a;p.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(c,a,p)}var k=document.createElement("input");d(z,k,!0);k.value=b;k.className="gePropEditor";"int"!=v&&"float"!=v||p.allowAuto||(k.type="number",k.step=
+"int"==v?"1":"any",null!=p.min&&(k.min=parseFloat(p.min)),null!=p.max&&(k.max=parseFloat(p.max)));a.appendChild(k);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&e()});k.focus();mxEvent.addListener(k,"blur",function(){e()})})));p.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(u,function(a){f(c,"",p,p.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",z.appendChild(l));B.appendChild(z);return B}var u=this,q=this.editorUi.editor.graph,
+l=[];a.style.position="relative";a.style.padding="0";var x=document.createElement("table");x.style.whiteSpace="nowrap";x.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;z.appendChild(m);mxUtils.write(z,mxResources.get("property"));v.style.cursor="pointer";var r=function(){var c=x.querySelectorAll(".gePropNonHeaderRow"),b;if(u.editorUi.propertiesCollapsed){m.src=
+Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(I){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;r()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");
+v.appendChild(z);x.appendChild(v);var F=!1,C=!1,E;for(E in c)if(v=c[E],"function"!=typeof v.isVisible||v.isVisible(b)){var t=null!=b.style[E]?mxUtils.htmlEntities(b.style[E]+""):v.defVal;if("separator"==v.type)C=!C;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,y=[],A=[],z=0;z<J.length;z++){var H=b.style[J[z]];A.push(c[J[z]].subDefVal);y.push(null!=H?H.split(","):[])}v.dependentPropsDefVal=
+A;v.dependentPropsVals=y}x.appendChild(p(E,t,v,F,C));F=!F}}for(z=0;z<l.length;z++)for(v=l[z],c=v.parentRow,b=0;b<v.values.length;b++)E=p(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;a.appendChild(x);r();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();
try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),k=0;k<e.length;k++)d=mxUtils.removeStylename(d,e[k]);var g=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR,
null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(g,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(g,
mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
@@ -2878,60 +2879,61 @@ mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.current
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;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=
-a.button,c.relatedTarget=a.relatedTarget}catch(N){}}k.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;
-this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.fill=!0;b.gridSize="undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),
-b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==
-mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)}};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};var q=Graph.prototype.getSvg;Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&
-"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var c=q.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return c};var n=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return n.apply(this,arguments)&&!mxClient.IS_SF};var g=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=g.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&
-null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}null!=this.globalUrlVars&&(c=this.globalUrlVars[a])}return c};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){y.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 z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();
-try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),
-this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=
-f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,k={},g=0;g<a.length;g++)0<a[g].length&&(k[a[g].toLowerCase()]=!0,e++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var n=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||
-""):"",q=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=q=0;t<n.length&&q<e;t++)null!=k[n[t]]&&q++;q=q==e}}else q=0==a.length;q&&d.push(c[g])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition",
-"all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",
-this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",
-this.svgShadowOpacity);e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2",
-"offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=e[0];f.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+
-6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
-[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+
-"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=
-[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];
-mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[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.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+
-"/veeam/veeam.xml"];mxStencilRegistry.libraries.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 t=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,k,g,n,q){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);null!=l&&mxStencilRegistry.getStencil(l)}return t.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1,Math.min(g,Math.max(parseInt(v.value),parseInt(y.value))));y.value=Math.max(1,Math.min(g,Math.min(parseInt(v.value),parseInt(y.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),
-k=0,g=0,n=ea.get(),q=1/c.pageScale,t=r.checked;if(t)var q=parseInt(M.value),l=parseInt(T.value),q=Math.min(n.height*l/(e.height/c.view.scale),n.width*q/(e.width/c.view.scale));else q=parseInt(m.value)/(100*c.pageScale),isNaN(q)&&(f=1/c.pageScale,m.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*f);n.height=Math.ceil(n.height*f);q*=f;!t&&c.pageVisible?(e=c.getPageLayout(),k-=e.x*n.width,g-=e.y*n.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,q,n,0,k,g,t);b.pageSelector=
-!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var y=b.writeHead;b.writeHead=function(c){y.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 p=b.renderPage;b.renderPage=function(a,c,b,f,d,e){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var g=p.apply(this,arguments);mxClient.NO_FO=
-k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}b.open(null,null,d,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=t;b.appendGraph(c,q,k,g,d,!0)}return b}var f=parseInt(fa.value)/100;isNaN(f)&&(f=1,fa.value="100 %");var f=.75*f,e=y.value,k=v.value,g=!t.checked,q=null;g&&(g=e==n&&k==n);if(!g&&null!=a.pages&&a.pages.length){var l=0,g=a.pages.length-1;t.checked||(l=parseInt(e)-1,g=parseInt(k)-
-1);for(var p=l;p<=g;p++){var z=a.pages[p],e=z==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),k=!0,l=!1,B=null,F=null;null==z.viewState&&null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(k=z.viewState.pageVisible,l=z.viewState.mathEnabled,B=z.viewState.background,F=z.viewState.backgroundImage);e.background=B;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=k;e.mathEnabled=l;var E=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==
-a?z.getName():"pagenumber"==a?p+1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(z);e.model.setRoot(z.root)}q=b(e,q,p!=g);e!=d&&e.container.parentNode.removeChild(e.container)}}else q=b(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(g=q.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln("showMathMenu: false,"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
-g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln('"HTML-CSS": {'),g.writeln("imageFont: null"),g.writeln("},"),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),
-g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),q.closeDocument(),!q.mathEnabled&&c&&PrintDialog.printPreview(q))}var d=a.editor.graph,e=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,c||mxResources.get("print"));e.appendChild(k);var g=1,n=1,q=document.createElement("div");q.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");q.appendChild(t);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));q.appendChild(k);mxUtils.br(q);var l=t.cloneNode(!0);t.setAttribute("checked","checked");l.setAttribute("value","range");q.appendChild(l);
-k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");q.appendChild(k);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","1");y.setAttribute("type","number");y.setAttribute("min","1");y.style.width="50px";q.appendChild(y);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));q.appendChild(k);var v=y.cloneNode(!0);q.appendChild(v);mxEvent.addListener(y,"focus",function(){l.checked=!0});mxEvent.addListener(v,
-"focus",function(){l.checked=!0});mxEvent.addListener(y,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){n=k+1;y.value=n;v.value=n;break}y.setAttribute("max",g);v.setAttribute("max",g);1<g&&e.appendChild(q);var p=document.createElement("div");p.style.marginBottom="10px";var z=document.createElement("input");z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type",
-"radio");z.setAttribute("name","printZoom");p.appendChild(z);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));p.appendChild(k);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width="50px";p.appendChild(m);mxEvent.addListener(m,"focus",function(){z.checked=!0});e.appendChild(p);var q=q.cloneNode(!1),r=z.cloneNode(!0);r.setAttribute("value","fit");z.setAttribute("checked","checked");k=document.createElement("div");
-k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(r);q.appendChild(k);p=document.createElement("table");p.style.display="inline-block";var F=document.createElement("tbody"),E=document.createElement("tr"),u=E.cloneNode(!0),C=document.createElement("td"),x=C.cloneNode(!0),A=C.cloneNode(!0),O=C.cloneNode(!0),H=C.cloneNode(!0),aa=C.cloneNode(!0);C.style.textAlign="right";O.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var M=document.createElement("input");
-M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";x.appendChild(M);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross"));A.appendChild(k);mxUtils.write(O,mxResources.get("fitToBy"));var T=M.cloneNode(!0);H.appendChild(T);mxEvent.addListener(M,"focus",function(){r.checked=!0});mxEvent.addListener(T,"focus",function(){r.checked=!0});k=document.createElement("span");mxUtils.write(k,
-mxResources.get("fitToSheetsDown"));aa.appendChild(k);E.appendChild(C);E.appendChild(x);E.appendChild(A);u.appendChild(O);u.appendChild(H);u.appendChild(aa);F.appendChild(E);F.appendChild(u);p.appendChild(F);q.appendChild(p);e.appendChild(q);q=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));q.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(k,
-"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));q.appendChild(k);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","100 %");fa.style.width="60px";q.appendChild(fa);e.appendChild(q);k=document.createElement("div");k.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-q.className="geBtn";a.editor.cancelFirst&&k.appendChild(q);a.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),p.className="geBtn",k.appendChild(p));PrintDialog.previewEnabled&&(p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),p.className="geBtn",k.appendChild(p));p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});p.className=
-"geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst||k.appendChild(q);e.appendChild(k);this.container=e};var F=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)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};
-Editor.prototype.useCanvasForExport=!1;try{var v=document.createElement("canvas"),E=new Image;E.onload=function(){try{v.getContext("2d").drawImage(E,0,0);var a=v.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(C){}};E.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){}})();
+a.button,c.relatedTarget=a.relatedTarget}catch(L){}}k.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;
+this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
+c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||
+0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)}};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};var p=Graph.prototype.getSvg;
+Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var c=p.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return c};var n=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return n.apply(this,arguments)&&!mxClient.IS_SF};var g=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=
+g.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}null!=this.globalUrlVars&&(c=this.globalUrlVars[a])}return c};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){x.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;
+!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):
+(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<
+a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=
+a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById=
+function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,k={},g=0;g<a.length;g++)0<a[g].length&&(k[a[g].toLowerCase()]=!0,e++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==
+this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var n=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||""):"",p=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var u=p=0;u<n.length&&p<e;u++)null!=k[n[u]]&&p++;p=p==e}}else p=0==a.length;p&&d.push(c[g])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,
+c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?
+f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?
+f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");d.appendChild(e);
+e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=e[0];f.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter",
+"url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
+mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
+[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
+[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];
+mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[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.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+
+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.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 u=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,k,g,n,p){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);null!=l&&mxStencilRegistry.getStencil(l)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1,
+Math.min(g,Math.max(parseInt(v.value),parseInt(x.value))));x.value=Math.max(1,Math.min(g,Math.min(parseInt(v.value),parseInt(x.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),k=0,g=0,n=ea.get(),p=1/c.pageScale,u=r.checked;if(u)var p=parseInt(N.value),l=parseInt(S.value),p=Math.min(n.height*l/(e.height/c.view.scale),n.width*p/(e.width/c.view.scale));else p=parseInt(m.value)/(100*c.pageScale),isNaN(p)&&(f=1/c.pageScale,m.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*
+f);n.height=Math.ceil(n.height*f);p*=f;!u&&c.pageVisible?(e=c.getPageLayout(),k-=e.x*n.width,g-=e.y*n.height):u=!0;if(null==b){b=PrintDialog.createPrintPreview(c,p,n,0,k,g,u);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var x=b.writeHead;b.writeHead=function(c){x.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,f,d,e){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var g=v.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}b.open(null,null,d,!0)}else{n=c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=u;b.appendGraph(c,p,k,g,d,!0)}return b}var f=parseInt(fa.value)/100;isNaN(f)&&(f=
+1,fa.value="100 %");var f=.75*f,e=x.value,k=v.value,g=!u.checked,p=null;g&&(g=e==n&&k==n);if(!g&&null!=a.pages&&a.pages.length){var l=0,g=a.pages.length-1;u.checked||(l=parseInt(e)-1,g=parseInt(k)-1);for(var q=l;q<=g;q++){var z=a.pages[q],e=z==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),k=!0,l=!1,B=null,F=null;null==z.viewState&&null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(k=z.viewState.pageVisible,l=z.viewState.mathEnabled,B=z.viewState.background,F=
+z.viewState.backgroundImage);e.background=B;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=k;e.mathEnabled=l;var E=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?q+1:E.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(z);e.model.setRoot(z.root)}p=b(e,p,q!=g);e!=d&&e.container.parentNode.removeChild(e.container)}}else p=b(d);null==p?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
+(p.mathEnabled&&(g=p.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln("showMathMenu: false,"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln('"HTML-CSS": {'),g.writeln("imageFont: null"),g.writeln("},"),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&c&&PrintDialog.printPreview(p))}var d=a.editor.graph,
+e=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,c||mxResources.get("print"));e.appendChild(k);var g=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");u.setAttribute("name",
+"pages-printdialog");p.appendChild(u);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));p.appendChild(k);mxUtils.br(p);var l=u.cloneNode(!0);u.setAttribute("checked","checked");l.setAttribute("value","range");p.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");p.appendChild(k);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";x.setAttribute("value","1");x.setAttribute("type","number");x.setAttribute("min",
+"1");x.style.width="50px";p.appendChild(x);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));p.appendChild(k);var v=x.cloneNode(!0);p.appendChild(v);mxEvent.addListener(x,"focus",function(){l.checked=!0});mxEvent.addListener(v,"focus",function(){l.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){n=k+1;x.value=n;v.value=n;break}x.setAttribute("max",
+g);v.setAttribute("max",g);1<g&&e.appendChild(p);var q=document.createElement("div");q.style.marginBottom="10px";var z=document.createElement("input");z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type","radio");z.setAttribute("name","printZoom");q.appendChild(z);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));q.appendChild(k);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(){z.checked=!0});e.appendChild(q);var p=p.cloneNode(!1),r=z.cloneNode(!0);r.setAttribute("value","fit");z.setAttribute("checked","checked");k=document.createElement("div");k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(r);p.appendChild(k);q=document.createElement("table");q.style.display="inline-block";var F=document.createElement("tbody"),E=document.createElement("tr"),t=E.cloneNode(!0),
+C=document.createElement("td"),y=C.cloneNode(!0),A=C.cloneNode(!0),O=C.cloneNode(!0),H=C.cloneNode(!0),aa=C.cloneNode(!0);C.style.textAlign="right";O.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";y.appendChild(N);k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsAcross"));
+A.appendChild(k);mxUtils.write(O,mxResources.get("fitToBy"));var S=N.cloneNode(!0);H.appendChild(S);mxEvent.addListener(N,"focus",function(){r.checked=!0});mxEvent.addListener(S,"focus",function(){r.checked=!0});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));aa.appendChild(k);E.appendChild(C);E.appendChild(y);E.appendChild(A);t.appendChild(O);t.appendChild(H);t.appendChild(aa);F.appendChild(E);F.appendChild(t);q.appendChild(F);p.appendChild(q);e.appendChild(p);
+p=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));p.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(k,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));p.appendChild(k);var fa=document.createElement("input");
+fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","100 %");fa.style.width="60px";p.appendChild(fa);e.appendChild(p);k=document.createElement("div");k.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&k.appendChild(p);a.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),q.className=
+"geBtn",k.appendChild(q));PrintDialog.previewEnabled&&(q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),q.className="geBtn",k.appendChild(q));q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});q.className="geBtn gePrimaryBtn";k.appendChild(q);a.editor.cancelFirst||k.appendChild(p);e.appendChild(k);this.container=e};var F=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)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=
+this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var v=document.createElement("canvas"),E=new Image;E.onload=function(){try{v.getContext("2d").drawImage(E,0,0);var a=v.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=a&&6<a.length}catch(C){}};E.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(q){}})();
(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="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";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.logError=function(a,b,d,e,n){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,e,n);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=
a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=f+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=n&&null!=n.stack?"&stack="+
encodeURIComponent(n.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(k){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:
5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(k){}};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 k=c(a,4);if(null!=b&&b(e-8,k,d))break;value=c(a,d);c(a,4);if("IEND"==k)break}while(d)}};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml=
-"<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+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 k=c(a,4);if(null!=b&&b(e-8,k,d))break;value=c(a,d);c(a,4);if("IEND"==k)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.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.maxTextBytes=5E5;EditorUi.prototype.currentFile=
null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(n){}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(g){}};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(n){}try{b=document.createElement("canvas");b.width=b.height=1;var e=
@@ -2940,170 +2942,170 @@ function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();
!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var k=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(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"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&
(e+="..."),k.innerHTML=e,d.appendChild(k),c.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(d,e)}));this.stop();return a}),k=!0);return k};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.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(q){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==
+c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==
a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=
-function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&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 n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(y){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=
+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 n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=
a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g: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,n,g,l,z,t,m){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;t=null!=t?t:!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 k=a;if("mxfile"!=k.nodeName.toLowerCase()){var q=Graph.zapGremlins(mxUtils.getXml(a)),k=Graph.compress(q);if(Graph.decompress(k)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,k);k=a.ownerDocument.createElement("mxfile");k.appendChild(q)}m?(k=k.cloneNode(!0),k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),
-k.removeAttribute("type")):(k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type"),k.setAttribute("modified",(new Date).toISOString()),k.setAttribute("host",window.location.hostname),k.setAttribute("agent",navigator.userAgent),k.setAttribute("version",EditorUi.VERSION),k.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&k.setAttribute("type",a));a=mxUtils.getXml(k);if(!g&&!n&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))a=
-this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&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,z,t,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=Graph.compressNode(c),mxUtils.setTextContent(this.currentPage.node,c),c=this.fileNode.cloneNode(!1),
-b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){if(this.currentPage!=this.pages[f]&&this.pages[f].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[f].root));this.editor.graph.saveViewState(this.pages[f].viewState,d);mxUtils.setTextContent(this.pages[f].node,Graph.compressNode(d));delete this.pages[f].needsUpdate}c.appendChild(this.pages[f].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],
-f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=
-mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(g){a[EditorUi.DIFF_INSERT][c].data=g.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];
-if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};
-EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+
-"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=
-this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),
-mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,l,z,t){n=null!=n?n:!0;l=null!=l?l:this.getXmlFileData(n,null!=g?g:!1);t=null!=t?t:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==
-a?1:c.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(l,g,t,window.location.href,a,b,d,e,n,z);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/
-k-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/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!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=
-a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&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==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){b=EditorUi.drawHost+"/js/viewer.min.js";
-null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+
-"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\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==n?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+
-EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),c=c[0].getElementsByTagName("div"),0<c.length&&(a=mxUtils.getTextContent(c[0])),Error(a);c=null!=a?this.editor.extractGraphModel(a,
-!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(a=0;a<c.length;a++){null==c[a].getAttribute("id")&&c[a].setAttribute("id",a);var d=new DiagramPage(c[a]);null==d.getName()&&d.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(d);null!=urlParams["page-id"]&&d.getId()==urlParams["page-id"]&&(b=d)}this.currentPage=null!=b?
-b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=
-function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,
-n,g,l,z,t){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),f=c+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,n));this.saveData(f,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+
-".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var d=this.createDownloadRequest(c,a,e,b,l,n,z,t);this.editor.graph.pageVisible=f;return d}catch(L){this.handleError(L)}}));else{var q=null,y=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(q)}))});if("svg"==a){var m=this.editor.graph.background;if(l||m==mxConstants.NONE)m=null;var r=this.editor.graph.getSvg(m,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(r);this.convertImages(r,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?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",q=this.getFileData(!1,
-!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),e)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,n,g,l,z){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==g?!1:"xmlpng"!=b);var f="",k="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==g&&(k="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=
-0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&n?g=mxConstants.NONE:n||null!=g&&g!=mxConstants.NONE||(g="#ffffff");return new mxXmlRequest(EXPORT_URL,"format="+b+f+k+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+(null!=l?"&scale="+l:"")+(null!=z?"&border="+z:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=
-function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));
-if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,k=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(k);
-k=window.setTimeout(g,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();g()}));n();g()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,
-a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var z=g.getCell(a.getAttribute("id"));if(null!=z){try{var t=a.getAttribute("value");if(null!=t){var m=mxUtils.parseXml(t).documentElement;if(null!=
-m)if("1"==m.getAttribute("replace-value"))g.setValue(z,m);else for(var v=m.attributes,r=0;r<v.length;r++)e.setAttributeForCell(z,v[r].nodeName,0<v[r].nodeValue.length?v[r].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+z.id+": "+K)}try{var p=a.getAttribute("style");null!=p&&e.model.setStyle(z,p)}catch(K){null!=window.console&&console.log("Error in style for "+z.id+": "+K)}try{var u=a.getAttribute("icon");if(null!=u){var x=0<u.length?JSON.parse(u):null;null!=x&&x.append||
-e.removeCellOverlays(z);null!=x&&e.addCellOverlay(z,c(x))}}catch(K){null!=window.console&&console.log("Error in icon for "+z.id+": "+K)}try{var A=a.getAttribute("geometry");if(null!=A){var A=JSON.parse(A),G=e.getCellGeometry(z);if(null!=G){G=G.clone();for(key in A){var N=parseFloat(A[key]);"dx"==key?G.x+=N:"dy"==key?G.y+=N:"dw"==key?G.width+=N:"dh"==key?G.height+=N:G[key]=parseFloat(A[key])}e.model.setGeometry(z,G)}}}catch(K){null!=window.console&&console.log("Error in icon for "+z.id+": "+K)}}}else if("model"==
-a.nodeName){for(var B=a.firstChild;null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.nextSibling;null!=B&&(new mxCodec(a.firstChild)).decode(B,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=
-a.nextSibling}}finally{g.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),l=e.getMonth()+1,m=e.getDate(),t=e.getHours(),r=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+l+"-"+m+"-"+t+"-"+r+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=
-function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&
-0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);
-a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||
-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":
-"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=y;null!=window.console&&console.log("error in fileLoaded:",a,y);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!=y&&null!=y.message?":err:"+encodeURIComponent(y.message):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}catch(z){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(y,mxResources.get("errorLoadingFile"),
-e,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var l=a[e].node.cloneNode(!1);l.removeAttribute("name");f.root=a[e].root;var m=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");l.appendChild(m);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,
-b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,
-b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,k=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=k&&(c^=this.hashValue(e,b,d)+this.hashValue(k,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<
-0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,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 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"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var k=0;k<b.length;k++)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(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,
-a.title||"",!0,!1,!0)}))})(b[k]);d=null!=d&&0<d.length?d:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var t=l.parentNode.previousSibling;d=t.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&t.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");t.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 r=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});
-null!=r?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,u=null,x=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,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=v.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),t.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),t.style.paddingRight=18*m.childNodes.length+"px")})):null==r&&(r=v.cloneNode(!1),r.setAttribute("src",IMAGE_PATH+"/download.png"),r.setAttribute("title",mxResources.get("save")),m.insertBefore(r,m.firstChild),
-mxEvent.addListener(r,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==r||a.isModified()||(t.style.paddingRight=18*m.childNodes.length+"px",r.parentNode.removeChild(r),r=null)});mxEvent.consume(c)})),t.style.paddingRight=18*m.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var g=p.getCellGeometry(a[k]);null!=g&&
-g.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),N=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),p.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),d=p.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=p.view.translate.x;b.y-=p.view.translate.y;G(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",l.style.backgroundColor="#f1f3f4",l.style.cursor="copy",p.panningManager.stop(),
-p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(l.style.backgroundColor="",l.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,N(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,
-function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",l.style.backgroundColor="",l.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,g,n,q,t,y,p){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,n,q),c)],c[0].vertex=!0,G(c,new mxRectangle(0,
-0,n,q),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,m=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(k.documentElement));e(g,l);b=b.concat(g);A(a);this.spinner.stop();v=!0}catch(H){}else if("mxfile"==k.documentElement.nodeName)try{for(var n=k.documentElement.getElementsByTagName("diagram"),
-k=0;k<n.length;k++){var g=mxUtils.getTextContent(n[k]),q=this.stringToCells(Graph.decompress(g)),t=this.editor.graph.getBoundingBoxFromGeometry(q);G(q,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(H){null!=window.console&&console.log("error in drop handler:",H)}}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!=p&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?
-this.importVisio(p,function(a){m(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=p?this.parseFile(p,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",
-function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.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",x);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&x(a)});d=v.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,
-"click",N);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))}t.appendChild(m);t.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+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
-function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
-"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
-"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",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,n){a=new ImageDialog(this,a,b,d,e,n);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,n){a=new LibraryDialog(this,a,b,d,e,n);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=
-b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#188038";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';
-mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,n){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){var k=mxUtils.htmlEntities(mxResources.get("unknownError")),l=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(l=mxResources.get("cancel"),q=function(){c();f.retry()}),404==f.code||404==f.status||403==f.code){var k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+
-", "+this.drive.user.email+")":"")),v=window.location.hash;if(null!=v&&("#G"==v.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==v.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){v="#U"==v.substring(0,2)?v.substring(45,v.lastIndexOf("%26ex")):v.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),
-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+v);this.handleError(a,b,d,e,n)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?
-k=mxUtils.htmlEntities(f.response.error):"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,k,l,d,q,null,null,null,null,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,
-e,n,g){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n);this.showDialog(a.container,340,90,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return 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(Graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+
-"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));
-c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){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{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(k?parseInt(k[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(t){}}else this.createEchoRequest(a,b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),
-l=0;l<f;++l){for(var m=1024*l,t=Math.min(m+1024,d),r=Array(t-m),v=0;m<t;++v,++m)r[v]=c[m].charCodeAt(0);e[l]=new Uint8Array(r)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);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(E){this.handleError(E)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<n,4<n&&(!g||6>n)?3:4,
-a,d,e);this.showDialog(b.container,420,1==n?160:4<n?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||null==c.document?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&&null!=c.document||mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";
-this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);
-this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);
-mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,
-d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,g,l){l=null!=l?l:!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){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,c,d)}catch(p){this.handleError(p)}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,c,d)}catch(p){this.handleError(p)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<c,4<c?3:4,e,g,n);this.showDialog(a.container,380,1==c?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,l,
-m,t,r){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,l,m,null,d,null,null,"blank"==r?"_blank":"self"==r?"_top":null);e&&this.editor.graph.addSvgShadow(f);var k=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,
-null,null,d,t));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(k,"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(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,q,this.thumbImageCache)):q(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,e,n,g,l){return this.addCheckbox(a,d,e,n,g,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,g,l,m){g=null!=g?g:!0;var c=document.createElement("input");
-c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=l;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
-":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
-mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled",
-"disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
-"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,l,g,m,z){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=l&&0<l.length&&f.push("edit="+encodeURIComponent(l)),g&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=m?d="#U"+encodeURIComponent(m):(c=this.getCurrentFile(),z||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,
-null,null,null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,l,g,m,z,t,r,v){this.getBasenames();
-var c={};""!=l&&l!=mxConstants.NONE&&(c.highlight=l);"auto"!==e&&(c.target=e);t||(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);z&&d.push("layers");0<d.length&&(t&&d.push("lightbox"),c.toolbar=d.join(" "));null!=r&&0<r.length&&(c.edit=r);null!=a?c.url=a:c.xml=this.getFileData(!0,
-null,null,null,null,!m);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+
-"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText=
-"margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");f=l.cloneNode(!0);f.setAttribute("value","copy");k.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(q);mxUtils.br(k);k.appendChild(l);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));k.appendChild(q);var m=this.getCurrentFile();
-null==d&&null!=m&&m.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.setAttribute("href","javascript:void(0);"),mxUtils.write(q,mxResources.get("share")),k.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(k);var v=this.addLinkSection(c),r=this.addCheckbox(c,
-mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value="100%";c.appendChild(p);var u=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,x=x=this.addCheckbox(c,mxResources.get("allPages"),k,!k),A=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),
-!0),N=this.addEditButton(c,G),B=N.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&G.checked?N.getEditSelect().removeAttribute("disabled"):N.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(l.checked?d:null,r.checked,p.value,v.getTarget(),v.getColor(),u.checked,x.checked,A.checked,G.checked,N.getLink())}),null,a,
-b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,l,g){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 k=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.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 q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));n.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));q.style.marginTop=
-"12px";q.className="geBtn";n.appendChild(q);c.appendChild(n);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));n.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,
-mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,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 r=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var u=null;if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var x=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,x),A=G.getEditInput(),B=this.addCheckbox(c,mxResources.get("layers"),
-!0);B.style.marginLeft=A.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?(B.removeAttribute("disabled"),A.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&x.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){l(r.getTarget(),r.getColor(),null==u?
-!0:u.checked,x.checked,G.getLink(),B.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)):r.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
+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,n,g,l,z,u,m,v){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;u=null!=u?u:!0;var c,f=null;null==
+d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var k=a;if("mxfile"!=k.nodeName.toLowerCase()){if(v){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));k=Graph.compress(p);if(Graph.decompress(k)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,k)}k=a.ownerDocument.createElement("mxfile");k.appendChild(p)}m?
+(k=k.cloneNode(!0),k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type")):(k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type"),k.setAttribute("modified",(new Date).toISOString()),k.setAttribute("host",window.location.hostname),k.setAttribute("agent",navigator.userAgent),k.setAttribute("version",EditorUi.VERSION),k.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,
+null!=a&&k.setAttribute("type",a),v&&k.setAttribute("compressed","false"));v=v?mxUtils.getPrettyXml(k):mxUtils.getXml(k);if(!g&&!n&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))v=this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),v=this.getEmbeddedSvg(v,b,e,null,z,u,f);return v};EditorUi.prototype.getXmlFileData=function(a,b,d){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(d?(EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(c)):(c=Graph.compressNode(c),mxUtils.setTextContent(this.currentPage.node,c)),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(b=0;b<this.pages.length;b++)this.currentPage!=this.pages[b]&&(this.pages[b].needsUpdate?(a=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root)),
+this.editor.graph.saveViewState(this.pages[b].viewState,a),d?(EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a)):mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(a)),delete this.pages[b].needsUpdate):d&&(a=Editor.parseDiagramNode(this.pages[b].node),EditorUi.removeChildNodes(this.pages[b].node),this.pages[b].node.appendChild(a))),c.appendChild(this.pages[b].node);return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=
+a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);
+null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(g){a[EditorUi.DIFF_INSERT][c].data=g.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),
+null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,
+b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&
+c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?
+this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,
+!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,l,z,u,m){n=null!=n?n:!0;l=null!=l?l:this.getXmlFileData(n,null!=g?g:!1,m);u=null!=u?u:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(g.container);
+g.model.setRoot(f.root)}a=this.createFileData(l,g,u,window.location.href,a,b,d,e,n,z,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/k-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),
+0<b.length&&(f=EditorUi.drawHost+"/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!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&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==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){b=EditorUi.drawHost+"/js/viewer.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
+toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\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==n?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=
+this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),c=c[0].getElementsByTagName("div"),0<c.length&&(a=mxUtils.getTextContent(c[0])),Error(a);c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||
+1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(a=0;a<c.length;a++){null==c[a].getAttribute("id")&&c[a].setAttribute("id",a);var d=new DiagramPage(c[a]);null==d.getName()&&d.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(d);null!=urlParams["page-id"]&&d.getId()==urlParams["page-id"]&&(b=d)}this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&
+null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||
+/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g,l,z,u){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),f=c+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+
+this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var d=this.createDownloadRequest(c,
+a,e,b,l,n,z,u);this.editor.graph.pageVisible=f;return d}catch(M){this.handleError(M)}}));else{var p=null,x=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var m=this.editor.graph.background;if(l||m==mxConstants.NONE)m=null;var r=this.editor.graph.getSvg(m,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(r);
+this.convertImages(r,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();x(a)}),e)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,n,g,l,z){var c=this.editor.graph.getGraphBounds();
+d=this.getFileData(!0,null,null,null,d,0==g?!1:"xmlpng"!=b);var f="",k="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==g&&(k="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&n?g=mxConstants.NONE:n||null!=g&&g!=mxConstants.NONE||(g="#ffffff");return new mxXmlRequest(EXPORT_URL,
+"format="+b+f+k+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+(null!=l?"&scale="+l:"")+(null!=z?"&border="+z:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?
+d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,k=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
+mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(g,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();g()}));n();g()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&
+!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:
+null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var z=g.getCell(a.getAttribute("id"));if(null!=z){try{var u=a.getAttribute("value");if(null!=u){var m=mxUtils.parseXml(u).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))g.setValue(z,m);else for(var v=m.attributes,r=0;r<v.length;r++)e.setAttributeForCell(z,v[r].nodeName,0<v[r].nodeValue.length?v[r].nodeValue:null)}}catch(K){null!=
+window.console&&console.log("Error in value for "+z.id+": "+K)}try{var q=a.getAttribute("style");null!=q&&e.model.setStyle(z,q)}catch(K){null!=window.console&&console.log("Error in style for "+z.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var y=0<t.length?JSON.parse(t):null;null!=y&&y.append||e.removeCellOverlays(z);null!=y&&e.addCellOverlay(z,c(y))}}catch(K){null!=window.console&&console.log("Error in icon for "+z.id+": "+K)}try{var A=a.getAttribute("geometry");if(null!=A){var A=JSON.parse(A),
+G=e.getCellGeometry(z);if(null!=G){G=G.clone();for(key in A){var L=parseFloat(A[key]);"dx"==key?G.x+=L:"dy"==key?G.y+=L:"dw"==key?G.width+=L:"dh"==key?G.height+=L:G[key]=parseFloat(A[key])}e.model.setGeometry(z,G)}}}catch(K){null!=window.console&&console.log("Error in icon for "+z.id+": "+K)}}}else if("model"==a.nodeName){for(var B=a.firstChild;null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.nextSibling;null!=B&&(new mxCodec(a.firstChild)).decode(B,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
+f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),l=e.getMonth()+1,m=e.getDate(),u=e.getHours(),r=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+l+"-"+m+"-"+u+"-"+r+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");
+this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();
+a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();
+this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;null!=window.console&&(console.error(x),console.log("error in fileLoaded:",a,x));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!=x&&null!=x.message?":err:"+encodeURIComponent(x.message):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):
+"")}catch(z){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(x,mxResources.get("errorLoadingFile"),e,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);
+var l=a[e].node.cloneNode(!1);l.removeAttribute("name");f.root=a[e].root;var m=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");l.appendChild(m);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&
+"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,k=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=k&&(c^=this.hashValue(e,
+b,d)+this.hashValue(k,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,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 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"),f.className="geDropTarget",
+mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var k=0;k<b.length;k++)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(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);d=null!=d&&0<d.length?d:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var u=l.parentNode.previousSibling;d=u.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&
+u.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");u.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 r=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=r?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,t=null,y=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,
+b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=v.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",m.insertBefore(t,m.firstChild),u.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=
+t.parentNode&&(t.parentNode.removeChild(t),u.style.paddingRight=18*m.childNodes.length+"px")})):null==r&&(r=v.cloneNode(!1),r.setAttribute("src",IMAGE_PATH+"/download.png"),r.setAttribute("title",mxResources.get("save")),m.insertBefore(r,m.firstChild),mxEvent.addListener(r,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==r||a.isModified()||(u.style.paddingRight=18*m.childNodes.length+"px",r.parentNode.removeChild(r),
+r=null)});mxEvent.consume(c)})),u.style.paddingRight=18*m.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var g=q.getCellGeometry(a[k]);null!=g&&g.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!=
+f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),L=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),f=q.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=q.view.translate.x;b.y-=q.view.translate.y;G(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l,
+function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",l.style.backgroundColor="#f1f3f4",l.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&&
+(l.style.backgroundColor="",l.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,L(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",l.style.backgroundColor="",l.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&
+(q.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
+function(c,d,k,g,n,p,u,x,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,n,p),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,n,p),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var q=!1,m=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=
+mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(k.documentElement));e(g,l);b=b.concat(g);A(a);this.spinner.stop();q=!0}catch(H){}else if("mxfile"==k.documentElement.nodeName)try{for(var n=k.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var p=this.stringToCells(Editor.getDiagramNodeXml(n[k])),u=this.editor.graph.getBoundingBoxFromGeometry(p);G(p,new mxRectangle(0,0,u.width,u.height),a)}q=!0}catch(H){null!=window.console&&
+console.log("error in drop handler:",H)}}q||(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!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(v,function(a){m(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,u)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
+200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.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",y);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&y(a)});d=v.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));m.insertBefore(d,m.firstChild);mxEvent.addListener(d,"click",L);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))}u.appendChild(m);u.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var f=a[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;");
+b.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(d=this.stringToCells(Graph.decompress(f.xml)),0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=
+64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=
+38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor=
+"#cccccc",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,n){a=new ImageDialog(this,a,b,d,e,n);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,n){a=new LibraryDialog(this,a,b,d,e,n);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==
+this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";
+var b=document.createElement("a");b.className="geTitle";b.style.color="#188038";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);
+return a};EditorUi.prototype.handleError=function(a,b,d,e,n){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){var k=mxUtils.htmlEntities(mxResources.get("unknownError")),p=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(p=mxResources.get("cancel"),l=function(){c();f.retry()}),404==f.code||404==f.status||403==f.code){var k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):
+mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),v=window.location.hash;if(null!=v&&("#G"==v.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==v.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&
+"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){v="#U"==v.substring(0,2)?v.substring(45,v.lastIndexOf("%26ex")):v.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+v);this.handleError(a,b,d,e,n)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&(this.drive.clearUserId(),gapi.auth.signOut(),window.location.reload())}),
+mxResources.get("cancel"),mxUtils.bind(this,function(){window.location.hash=""}),480,150);return}}else null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,k,p,d,l,null,null,null,null,null,null,null,e?d:null)}else null!=d&&d()};
+EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n,g){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n);this.showDialog(a.container,340,90,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);
+this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return 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(Graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&
+7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){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{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(k?parseInt(k[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=
+URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a,b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:
+"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var m=1024*l,u=Math.min(m+1024,d),r=Array(u-m),v=0;m<u;++v,++m)r[v]=c[m].charCodeAt(0);e[l]=new Uint8Array(r)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);
+n=this.getServiceCount(g);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("<pre>"+mxUtils.htmlEntities(a,!1)+"<pre>"),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(E){this.handleError(E)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<n,4<n&&(!g||6>n)?3:4,a,d,e);this.showDialog(b.container,420,1==n?160:4<n?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||null==c.document?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&&null!=c.document||mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,
+function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";
+a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,
+"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,g,l){l=null!=l?l:!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){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,c,d)}catch(q){this.handleError(q)}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,c,d)}catch(q){this.handleError(q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<c,4<c?3:4,e,g,n);this.showDialog(a.container,380,1==c?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=
+function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,l,m,u,r){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,l,m,null,d,null,null,"blank"==r?"_blank":
+"self"==r?"_top":null);e&&this.editor.graph.addSvgShadow(f);var k=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,u));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(k,"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(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):
+p(f)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,e,n,g,l){return this.addCheckbox(a,d,e,n,g,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,g,l,m){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=l;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),
+d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";
+e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,
+null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+
+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));
+d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+
+":");var e="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},
+focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,g,l,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!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),g&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());
+a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
+"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,n,g,l,m,u,r,v){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);u||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);
+m&&d.push("layers");0<d.length&&(u&&d.push("lightbox"),c.toolbar=d.join(" "));null!=r&&0<r.length&&(c.edit=r);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=document.createElement("div");
+k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");f=l.cloneNode(!0);f.setAttribute("value","copy");k.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(p);mxUtils.br(k);k.appendChild(l);
+p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));k.appendChild(p);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),k.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked",
+"checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(k);var v=this.addLinkSection(c),r=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 t=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(c,mxResources.get("allPages"),
+k,!k),A=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),L=this.addEditButton(c,G),B=L.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&G.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(l.checked?d:null,r.checked,
+q.value,v.getTarget(),v.getColor(),t.checked,y.checked,A.checked,G.checked,L.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,l,g){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 k=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";
+a=0;if(null!=k&&k.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 p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));n.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));
+p.style.marginTop="12px";p.className="geBtn";n.appendChild(p);c.appendChild(n);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check"));n.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
+null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+
+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var r=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var t=null;if(null==k||k.constructor!=window.DriveFile||b)t=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var y=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,y),A=G.getEditInput(),B=this.addCheckbox(c,mxResources.get("layers"),
+!0);B.style.marginLeft=A.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(B.removeAttribute("disabled"),A.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&y.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){l(r.getTarget(),r.getColor(),null==t?
+!0:t.checked,y.checked,G.getLink(),B.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):r.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";c.appendChild(f);if(l){mxUtils.write(c,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type",
-"text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";c.appendChild(n);mxUtils.br(c)}var q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,r=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=r&&(r.style.marginBottom="16px");a=
-new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(n.value)||0;d(!q.checked,null!=m?m.checked:!1,null!=r?r.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,l,g,m,r){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,k="jpeg"==r?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 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%";c.appendChild(q);mxUtils.write(c,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value=this.lastExportBorder||
-"0";c.appendChild(y);mxUtils.br(c);var z=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=r),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");g&&(c.appendChild(G),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(u,"change",function(){u.checked?
-G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(G.setAttribute("checked","checked"),G.defaultChecked=!0);var x=this.addCheckbox(c,mxResources.get("shadow"),f.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&&(c.appendChild(B),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=
-26);var K=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=r),L=null!=this.pages&&1<this.pages.length,V=this.addCheckbox(c,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=r);V.style.marginLeft="24px";V.style.marginBottom="16px";L||(V.style.display="none");mxEvent.addListener(K,"change",function(){K.checked&&L?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")});m&&L||V.setAttribute("disabled","disabled");var A=document.createElement("select");A.style.maxWidth=
+"text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";c.appendChild(n);mxUtils.br(c)}var p=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,r=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=r&&(r.style.marginBottom="16px");a=
+new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(n.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=r?r.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,l,g,m,r){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,k="jpeg"==r?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 p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value=this.lastExportBorder||
+"0";c.appendChild(x);mxUtils.br(c);var z=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=r),t=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");g&&(c.appendChild(G),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(t,"change",function(){t.checked?
+G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(G.setAttribute("checked","checked"),G.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),f.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&&(c.appendChild(B),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=
+26);var K=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=r),M=null!=this.pages&&1<this.pages.length,U=this.addCheckbox(c,M?mxResources.get("allPages"):"",M,!M,null,"jpeg"!=r);U.style.marginLeft="24px";U.style.marginBottom="16px";M||(U.style.display="none");mxEvent.addListener(K,"change",function(){K.checked&&M?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")});m&&M||U.setAttribute("disabled","disabled");var A=document.createElement("select");A.style.maxWidth=
"260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));A.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));A.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));A.appendChild(a);"svg"==r&&(mxUtils.write(c,
-mxResources.get("links")+":"),c.appendChild(A),mxUtils.br(c),mxUtils.br(c),k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=y.value;this.lastExportZoom=q.value;l(q.value,z.checked,!u.checked,x.checked,K.checked,B.checked,y.value,G.checked,!V.checked,A.value)}),null,d,e);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!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,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),q=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),r=this.addCheckbox(c,mxResources.get("lightbox"),
-!0),p=this.addEditButton(c,r),u=p.getEditInput(),x=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(c,mxResources.get("layers"),x,!x);A.style.marginLeft=u.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(r,"change",function(){r.checked?(x&&A.removeAttribute("disabled"),u.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&r.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled",
-"disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,r.checked,p.getLink(),A.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,l,g,m,r){function c(c){var b=" ",k="";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('"+
+mxResources.get("links")+":"),c.appendChild(A),mxUtils.br(c),mxUtils.br(c),k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=x.value;this.lastExportZoom=p.value;l(p.value,z.checked,!t.checked,y.checked,K.checked,B.checked,x.value,G.checked,!U.checked,A.value)}),null,d,e);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",
+!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),p=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),r=this.addCheckbox(c,mxResources.get("lightbox"),
+!0),q=this.addEditButton(c,r),t=q.getEditInput(),y=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(c,mxResources.get("layers"),y,!y);A.style.marginLeft=t.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(r,"change",function(){r.checked?(y&&A.removeAttribute("disabled"),t.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&r.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled",
+"disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,p.checked,m.checked,r.checked,q.getLink(),A.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,l,g,m,r){function c(c){var b=" ",k="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;");a&&(k+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=k?' style="'+k+'"':"")+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){r({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 k="";d&&(k="&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")+k+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):r({message:mxResources.get("unknownError")})}))}else r({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,e,l,g,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var k=0;k<f.length;k++){var n=f[k].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[k].getAttribute("target")&&f[k].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var q=" ",p="";e&&(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('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),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");
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,l,g,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var k=0;k<f.length;k++){var n=f[k].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[k].getAttribute("target")&&f[k].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var p=" ",q="";e&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+p+"/>")}))}else q="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=q&&c.setAttribute("style",q),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],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=Graph.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(g){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-e=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(Graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(F){null!=
-b&&b(F)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)}catch(z){null!=b&&b(z)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,l,g,m){m=b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));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(g)};EditorUi.prototype.exportImage=function(a,b,d,e,l,g,m,r,t){t=null!=t?t:"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,l?this.getFileData(!0,null,null,null,d,r):null,t)}catch(E){"Invalid image"==E.message?this.downloadFile(t):this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,g,m)}catch(v){this.spinner.stop(),this.handleError(v)}}};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={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],k=1;k<b.length;k++){var g=b[k].indexOf(")");f.push('url("');f.push(e[c(b[k].substring(0,g))]);f.push('"'+b[k].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var l=1;l<b.length;l++){var m=b[l].indexOf(")"),t=null,r=b[l].indexOf("format(",m);0<r&&(t=c(b[l].substring(r+7,b[l].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==
-e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
-a;/^https?:\/\//.test(b)&&!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this,function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[l].substring(0,m)),t)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,g,m,r,t,u,v,E,p,x){g=null!=g?g:!0;E=null!=E?E:this.editor.graph;p=null!=p?p:0;var c=t?null:E.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==
-c&&0==t&&(c="#ffffff");this.convertImages(E.getSvg(c,null,null,x,null,null!=m?m:!0,null,null,null,u),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(d.getAttribute("width")),n=parseInt(d.getAttribute("height"));r=null!=r?r:1;null!=b&&(r=g?Math.min(1,Math.min(3*b/(4*n),b/k)):b/k);k=Math.ceil(r*k)+2*p;n=Math.ceil(r*n)+2*p;e.setAttribute("width",k);e.setAttribute("height",n);var q=e.getContext("2d");null!=c&&(q.beginPath(),
-q.rect(0,0,k,n),q.fillStyle=c,q.fill());q.scale(r,r);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,p/r,p/r);a(e)},0):(q.drawImage(f,p/r,p/r),a(e))}catch(ja){null!=l&&l(ja)}});f.onerror=function(a){null!=l&&l(a)};try{u&&this.editor.graph.addSvgShadow(d);var e=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(E,
+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],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=
+d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==
+a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(Graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(F){null!=b&&b(F)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&
+b(a)}),null,null,null,null,c.shadowVisible,null,c)}catch(z){null!=b&&b(z)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,l,g,m){m=b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));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(g)};EditorUi.prototype.exportImage=function(a,b,d,e,l,g,m,r,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,d,r):null,u)}catch(E){"Invalid image"==E.message?this.downloadFile(u):this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,g,m)}catch(v){this.spinner.stop(),this.handleError(v)}}};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={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],k=1;k<b.length;k++){var g=b[k].indexOf(")");f.push('url("');f.push(e[c(b[k].substring(0,g))]);f.push('"'+b[k].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var l=1;l<b.length;l++){var m=b[l].indexOf(")"),u=null,r=b[l].indexOf("format(",m);0<r&&(u=c(b[l].substring(r+7,b[l].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==
+e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==u||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==u||"embedded-opentype"==u||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==u||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==u||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==u||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==u||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
+a;/^https?:\/\//.test(b)&&!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this,function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[l].substring(0,m)),u)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,g,m,r,u,t,v,E,q,y){g=null!=g?g:!0;E=null!=E?E:this.editor.graph;q=null!=q?q:0;var c=u?null:E.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==
+c&&0==u&&(c="#ffffff");this.convertImages(E.getSvg(c,null,null,y,null,null!=m?m:!0,null,null,null,t),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(d.getAttribute("width")),n=parseInt(d.getAttribute("height"));r=null!=r?r:1;null!=b&&(r=g?Math.min(1,Math.min(3*b/(4*n),b/k)):b/k);k=Math.ceil(r*k)+2*q;n=Math.ceil(r*n)+2*q;e.setAttribute("width",k);e.setAttribute("height",n);var p=e.getContext("2d");null!=c&&(p.beginPath(),
+p.rect(0,0,k,n),p.fillStyle=c,p.fill());p.scale(r,r);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(f,q/r,q/r);a(e)},0):(p.drawImage(f,q/r,q/r),a(e))}catch(ja){null!=l&&l(ja)}});f.onerror=function(a){null!=l&&l(a)};try{t&&this.editor.graph.addSvgShadow(d);var e=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(E,
d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}catch(B){null!=l&&l(B)}}),d,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.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,k){for(var g=a.getElementsByTagName(d),l=0;l<g.length;l++)mxUtils.bind(this,function(d){try{if(null!=d){var g=e.convert(d.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=f[g];null==l?(c++,this.convertImageToDataUri(g,function(e){null!=e&&
(f[g]=e,d.setAttribute(k,e));c--;0==c&&b(a)})):d.setAttribute(k,l)}else null!=g&&d.setAttribute(k,g)}}catch(C){}})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,l,g,m){try{var c=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));l=null!=l?l:!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 f=a.getText();if(c){if((9==
document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+this.base64Encode(f)}b(f)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&&null!=
d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(F){null!=d&&d(F)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&
-b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=f.height;a.width=f.width;k.drawImage(f,0,0);b(a.toDataURL())}catch(t){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(y){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,l){b=null!=
-b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var k=mxUtils.parseXml(a),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var q=n.getElementsByTagName("diagram");if(1==q.length)n=mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(q[0]))).documentElement;else if(1<q.length){a={};var k=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(q[0]))).documentElement,
-e=!1,m=1);for(;m<q.length;m++){var r=q[m].getAttribute("id");q[m].removeAttribute("id");var p=this.updatePageRoot(new DiagramPage(q[m]));a[r]=q[m].getAttribute("id");var u=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[u+1]));f.model.execute(new ChangePage(this,p,p,u,!0));k.push(p)}this.updatePageLinks(a,k)}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}finally{f.model.endUpdate()}}}catch(J){if(l)throw J;this.handleError(J)}return c};EditorUi.prototype.updatePageLinks=
-function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),l=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[m].setAttribute("href",
+b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=f.height;a.width=f.width;k.drawImage(f,0,0);b(a.toDataURL())}catch(u){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,l){b=null!=
+b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var k=mxUtils.parseXml(a),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var p=n.getElementsByTagName("diagram");if(1==p.length)n=Editor.parseDiagramNode(p[0]);else if(1<p.length){a={};var k=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(p[0]),e=!1,m=1);for(;m<p.length;m++){var r=
+p[m].getAttribute("id");p[m].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(p[m]));a[r]=p[m].getAttribute("id");var t=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,q,q,t,!0));k.push(q)}this.updatePageLinks(a,k)}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}finally{f.model.endUpdate()}}}catch(J){if(l)throw J;this.handleError(J)}return c};EditorUi.prototype.updatePageLinks=function(a,
+b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&"data:page/id,"==f.substring(0,13)&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),l=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:page/id,"==f.substring(0,13)&&(e[m].setAttribute("href",
this.updatePageLink(a,f)),l=!0);l&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){var c=a[b.substring(b.indexOf(",")+1)];return null!=c?"data:page/id,"+c:null};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{this.doImportVisio(f.response,b,d,e)}catch(z){d(z)}else d({})});f.send(c)}else try{this.doImportVisio(a,b,
d,e)}catch(z){d(z)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(n){d(n)}else this.spinner.stop(),
@@ -3116,52 +3118,52 @@ function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,
null,"",c.snap(b),c.snap(d),k,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));
if(this.isCompatibleString(a))return this.importXml(a,b,d,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,d,g))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;l=null;c.getModel().beginUpdate();try{l=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[l])),"<"==a.charAt(0)&&
a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),l.value=a,c.updateCellSize(l),/\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(l.value)&&c.setLinkForCell(l,l.value),l.geometry.width+=c.gridSize,l.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[l]}}return[]};
-EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var 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!=
+EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=
a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=
-c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,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,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,
-0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,l,g,m,r,t,u,v){u=null!=u?u:!0;var c=!1,f=null,k=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,
-a,m)):b=this.importXml(a,d,e,u);null!=r&&r(b)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,u),t=!0)),t||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,l,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,k)):null!=t&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(t,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=t?t: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!=r&&r(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
-(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,u));c||null==r||r(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,l;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);
+c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,
+0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,e,l,g,m,r,u,t,v){t=null!=t?t:!0;var c=!1,f=null,k=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,
+a,m)):b=this.importXml(a,d,e,t);null!=r&&r(b)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,t),u=!0)),u||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,l,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,k)):null!=u&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(u,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(a.responseText):null!=r&&r(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
+(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,t));c||null==r||r(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,l;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}l=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);b+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,l,g,m,r,t,u,v,x){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=v||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>n){k=!0;break}var y=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;
-l=null!=l?l:mxUtils.bind(this,function(a,b,d,f,e,k,g,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,f,e,k,g,l,n,c,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,t=q,p=[],y=mxUtils.bind(this,function(a,b){p[a]=b;if(0==--t){this.spinner.stop();if(null!=r)r(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)}}),z=0;z<q;z++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(t+1)))),r=mxUtils.parseXml(p),p=r.getElementsByTagName("svg");if(0<p.length){var p=p[0],
-B=x?null:p.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)?y(c,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),p=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==
-v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var u=v.split(" ");3<u.length&&(m=parseFloat(u[2]),p=parseFloat(u[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var B=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),y=l(q,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*B)),Math.max(1,Math.round(p*B)),g.name);if(isNaN(m)||isNaN(p)){var z=new Image;z.onload=mxUtils.bind(this,function(){m=Math.max(1,z.width);p=Math.max(1,z.height);y[0].geometry.width=m;y[0].geometry.height=
-p;f.setAttribute("viewBox","0 0 "+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[y[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(f))}return y}}}catch(X){}return null})):y(c,mxUtils.bind(this,function(){return l(B,"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else y(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==g.type){var z=x?null:this.extractGraphModelFromPng(a.target.result);
-if(null!=z&&0<z.length){var L=new Image;L.src=a.target.result;y(c,mxUtils.bind(this,function(){return l(z,"text/xml",b+c*n,d+c*n,L.width,L.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(k){this.resizeImage(k,
-a.target.result,mxUtils.bind(this,function(k,m,q){y(c,mxUtils.bind(this,function(){if(null!=k&&k.length<u){var t=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/m,e/q)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*t),Math.round(q*t),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result,g.type,b+c*n,d+c*n,240,160,g.name,
-function(a){y(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){y(c,function(){return a})},g):"image"==g.type.substring(0,5)?q.readAsDataURL(g):q.readAsText(g)}})(z)});if(k){k=[];for(q=0;q<a.length;q++)k.push(a[q]);a=k;this.confirmImageResize(function(a){f=a;y()},t)}else y()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,l,g,m,r,u,t,v,y){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=v||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){k=!0;break}var x=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;
+l=null!=l?l:mxUtils.bind(this,function(a,b,d,f,e,k,g,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,f,e,k,g,l,n,c,y)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,u=p,q=[],x=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--u){this.spinner.stop();if(null!=r)r(q);else{var c=[];k.getModel().beginUpdate();
+try{for(var d=0;d<q.length;d++){var f=q[d]();null!=f&&(c=c.concat(f))}}finally{k.getModel().endUpdate()}}g(c)}}),z=0;z<p;z++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var p=a.target.result,u=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(u+1)))),r=mxUtils.parseXml(q),q=r.getElementsByTagName("svg");if(0<q.length){var q=q[0],
+B=y?null:q.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)?x(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=parseFloat(f.getAttribute("width")),q=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==
+v||0==v.length)f.setAttribute("viewBox","0 0 "+m+" "+q);else if(isNaN(m)||isNaN(q)){var x=v.split(" ");3<x.length&&(m=parseFloat(x[2]),q=parseFloat(x[3]))}p=this.createSvgDataUri(mxUtils.getXml(f));var t=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,q)),B=l(p,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*t)),Math.max(1,Math.round(q*t)),g.name);if(isNaN(m)||isNaN(q)){var z=new Image;z.onload=mxUtils.bind(this,function(){m=Math.max(1,z.width);q=Math.max(1,z.height);B[0].geometry.width=m;B[0].geometry.height=
+q;f.setAttribute("viewBox","0 0 "+m+" "+q);p=this.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));k.setCellStyles("image",p,[B[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(f))}return B}}}catch(X){}return null})):x(c,mxUtils.bind(this,function(){return l(B,"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==g.type){var z=y?null:this.extractGraphModelFromPng(a.target.result);
+if(null!=z&&0<z.length){var M=new Image;M.src=a.target.result;x(c,mxUtils.bind(this,function(){return l(z,"text/xml",b+c*n,d+c*n,M.width,M.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,
+a.target.result,mxUtils.bind(this,function(k,m,p){x(c,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var u=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/m,e/p)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*u),Math.round(p*u),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result,g.type,b+c*n,d+c*n,240,160,g.name,
+function(a){x(c,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){x(c,function(){return a})},g):"image"==g.type.substring(0,5)?p.readAsDataURL(g):p.readAsText(g)}})(z)});if(k){k=[];for(p=0;p<a.length;p++)k.push(a[p]);a=k;this.confirmImageResize(function(a){f=a;x()},u)}else x()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():
function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,
340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,l,g){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),
-f=Math.max(1,a.height);if(e&&this.isResampleImage(b,g))try{var k=Math.max(c/l,f/l);if(1<k){var n=Math.round(c/k),m=Math.round(f/k),q=document.createElement("canvas");q.width=n;q.height=m;q.getContext("2d").drawImage(a,0,0,n,m);var p=q.toDataURL();if(p.length<b.length){var r=document.createElement("canvas");r.width=n;r.height=m;var u=r.toDataURL();p!==u&&(b=p,c=n,f=m)}}}catch(Q){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var l=d,m=0;8>m;m++)l=1==(l&1)?3988292384^l>>>1:l>>>
-1,EditorUi.prototype.crcTable[d]=l;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){function c(a,b){var c=m;m+=b;return a.substring(c,m)}function f(a){a=c(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(c(a,4),"IHDR"!=c(a,4))null!=l&&l();else{c(a,17);l=a.substring(0,m);do{var n=f(a);if("IDAT"==c(a,4)){l=a.substring(0,m-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);l+=k(d.length)+b+d+k(e^4294967295);l+=a.substring(m-8,a.length);break}l+=a.substring(m-8,m-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=
+f=Math.max(1,a.height);if(e&&this.isResampleImage(b,g))try{var k=Math.max(c/l,f/l);if(1<k){var n=Math.round(c/k),m=Math.round(f/k),p=document.createElement("canvas");p.width=n;p.height=m;p.getContext("2d").drawImage(a,0,0,n,m);var q=p.toDataURL();if(q.length<b.length){var r=document.createElement("canvas");r.width=n;r.height=m;var t=r.toDataURL();q!==t&&(b=q,c=n,f=m)}}}catch(P){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var l=d,m=0;8>m;m++)l=1==(l&1)?3988292384^l>>>1:l>>>
+1,EditorUi.prototype.crcTable[d]=l;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){function c(a,b){var c=n;n+=b;return a.substring(c,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 k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(c(a,4),"IHDR"!=c(a,4))null!=l&&l();else{c(a,17);l=a.substring(0,n);do{var m=f(a);if("IDAT"==c(a,4)){l=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);l+=k(d.length)+b+d+k(e^4294967295);l+=a.substring(n-8,a.length);break}l+=a.substring(n-8,n-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=
d)d(n);else throw n;}};var r=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 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 l=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)};l.call(this,a,c,d)};r.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 g=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:g.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";
-x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var u=function(){window.setTimeout(function(){y.innerHTML="&nbsp;";
+y.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var k=e[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,k){b.insertImage(a,e,k)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(D){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var v=!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)||v||(x.style.left=b.container.scrollLeft+10+"px",x.style.top=b.container.scrollTop+10+"px",b.container.appendChild(x),
-v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=c&&17!=c&&91!=c||(v=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),x.parentNode.removeChild(x),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(x,
-"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(x),t()}catch(N){this.handleError(N)}}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(x,!0),t()}catch(N){this.handleError(N)}}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,
-x);x.innerHTML="&nbsp;"}),0))}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:A.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",
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(D){}}),!1);var y=document.createElement("div");y.style.position="absolute";y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.display="block";y.contentEditable=!0;mxUtils.setOpacity(y,0);y.style.width="1px";y.style.height="1px";y.innerHTML="&nbsp;";var v=!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)||v||(y.style.left=b.container.scrollLeft+10+"px",y.style.top=b.container.scrollTop+10+"px",b.container.appendChild(y),
+v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){y.focus();document.execCommand("selectAll",!1,null)},0):(y.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(){!v||224!=c&&17!=c&&91!=c||(v=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),y.parentNode.removeChild(y),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(y,
+"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(y),u()}catch(L){this.handleError(L)}}));mxEvent.addListener(y,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(y,!0),u()}catch(L){this.handleError(L)}}));mxEvent.addListener(y,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y.innerHTML="&nbsp;",y.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,
+y);y.innerHTML="&nbsp;"}),0))}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==y?!0:A.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",
function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,
e,k){b.insertImage(a,e,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,
-a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){u=document.createElement("div");
-u.style.position="absolute";u.style.top="95px";u.style.left="250px";u.style.width="2000px";u.style.height="30px";u.style.background="whiteSmoke";document.body.appendChild(u);var p=document.createElement("div");p.style.position="absolute";p.style.top="125px";p.style.left="220px";p.style.width="30px";p.style.height="1000px";p.style.background="whiteSmoke";document.body.appendChild(p);var C=document.createElement("div");C.style.position="absolute";C.style.top="95px";C.style.left="220px";C.style.width=
-"30px";C.style.height="30px";C.style.background="whiteSmoke";document.body.appendChild(C);this.vRuler=new mxRuler(this.editor.graph,p,!0);this.hRuler=new mxRuler(this.editor.graph,u,!1)}if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(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)})),u.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 J=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:J.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Q=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=Q&&(Q.parentNode.removeChild(Q),
-Q=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=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!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");
+t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var q=document.createElement("div");q.style.position="absolute";q.style.top="125px";q.style.left="220px";q.style.width="30px";q.style.height="1000px";q.style.background="whiteSmoke";document.body.appendChild(q);var C=document.createElement("div");C.style.position="absolute";C.style.top="95px";C.style.left="220px";C.style.width=
+"30px";C.style.height="30px";C.style.background="whiteSmoke";document.body.appendChild(C);this.vRuler=new mxRuler(this.editor.graph,q,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.styledev){t=document.getElementById("geFooter");null!=t&&(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)})),t.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 J=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:J.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var P=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=P&&(P.parentNode.removeChild(P),
+P=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=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!=P&&(P.parentNode.removeChild(P),P=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,k=c.y/f-d.y;mxEvent.isAltDown(a)&&(k=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,k,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var m=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var n=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,k,!0,m,null,n))});m&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=
-a;q()},mxEvent.isControlDown(a)):q()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,k,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,
+"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,k,!0,n,null,m))});n&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=
+a;p()},mxEvent.isControlDown(a)):p()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,k,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,
e,k,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,k,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==
urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",
@@ -3170,8 +3172,8 @@ this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFo
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())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,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){var b=this.editor.graph;b.setSelectionCells(this.importXml(a,0,0));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):
-b.textContent),e=!1;try{var l=f.lastIndexOf("%3E");0<=l&&l<f.length-3&&(f=f.substring(0,l+3))}catch(t){}try{var c=b.getElementsByTagName("span"),m=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(e=!0,f=m)}catch(t){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),
-d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.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(t){}}}}};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.textContent),e=!1;try{var l=f.lastIndexOf("%3E");0<=l&&l<f.length-3&&(f=f.substring(0,l+3))}catch(u){}try{var c=b.getElementsByTagName("span"),m=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(e=!0,f=m)}catch(u){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),
+d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(u){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),
b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),
"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,
"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,
@@ -3191,19 +3193,19 @@ null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=t
this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&
(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var 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,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&
-"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(V){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(L){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):
+"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(U){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(M){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();k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);
k.init();return}if("draft"==g.action){var m=k(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.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();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(L){l.postMessage(JSON.stringify({event:"draft",error:L.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var k=1==g.enableRecent,m=1==g.enableSearch,n=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,
+mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(M){l.postMessage(JSON.stringify({event:"draft",error:M.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var k=1==g.enableRecent,m=1==g.enableSearch,n=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,
mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?l.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.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,m?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,
"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){l.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,n?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){k=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:k,
-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 r=this.editor.graph,u=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);l.postMessage(JSON.stringify(b),"*")}),y=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(Graph.compress(q))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),x=r.getGlobalVariable,B=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,
-function(a){y(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){y(null)}),null,null,g.scale,null,null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=g.scale?"&scale="+g.scale:"")+"&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()):y(null)}),mxUtils.bind(this,function(){y(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))k=this.getXmlFileData(),p.xml=mxUtils.getXml(k),p.data=this.getFileData(null,null,!0,null,null,null,k),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;k=this.editor.graph.background;k==mxConstants.NONE&&
-(k=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);l.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(k),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(p),"*")}));return}k="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));p.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(p),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=
+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 q=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,q):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 p=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var r=this.editor.graph,t=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(p);l.postMessage(JSON.stringify(b),"*")}),x=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(Graph.compress(p))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),y=r.getGlobalVariable,B=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,
+function(a){x(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){x(null)}),null,null,g.scale,null,null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):x(null)}),mxUtils.bind(this,function(){x(null)}))}}else{null!=g.xml&&0<g.xml.length&&
+this.setFileData(g.xml);q=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),q.xml=mxUtils.getXml(k),q.data=this.getFileData(null,null,!0,null,null,null,k),q.format=g.format;else if("html"==g.format)p=this.editor.getGraphXml(),q.data=this.getHtml(p,this.editor.graph),q.xml=mxUtils.getXml(p),q.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&
+(k=null);q.xml=this.getFileData(!0);q.format="svg";if(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(q.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(q),"*")})):this.convertImages(this.editor.graph.getSvg(k),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(q),"*")}));return}k="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));q.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(q),"*")}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="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.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(ca){this.handleError(ca)}c=!1;null!=urlParams.modified&&
this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=k();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",
@@ -3213,34 +3215,34 @@ a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.subs
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");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.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,null,null,null,null,!0);
-this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var l in a[f].config)e[l]=a[f].config[l];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var l={},m=null,r=null,u=null,v=null,x=null,p=null,A=
-null,J=null,Q="",G="auto",N="auto",B=null,K=null,L=40,V=40,ja=100,ca=0,D=this.editor.graph;D.getGraphBounds();for(var Y=function(){null!=b?b(ba):(D.setSelectionCells(ba),D.scrollCellToVisible(D.getSelectionCell()))},qa=D.getFreeInsertPoint(),ka=qa.x,la=qa.y,qa=la,ga=null,R="auto",J=null,W=[],na=null,da=null,S=0;S<c.length&&"#"==c[S].charAt(0);){a=c[S];for(S++;S<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[S].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[S].substring(1)),S++;if("#"!=a.charAt(1)){var ha=
-a.indexOf(":");if(0<ha){var O=mxUtils.trim(a.substring(1,ha)),H=mxUtils.trim(a.substring(ha+1));"label"==O?ga=D.sanitizeHtml(H):"labelname"==O&&0<H.length&&"-"!=H?v=H:"labels"==O&&0<H.length&&"-"!=H?x=JSON.parse(H):"style"==O?m=H:"parentstyle"==O?p=H:"stylename"==O&&0<H.length&&"-"!=H?u=H:"styles"==O&&0<H.length&&"-"!=H?r=JSON.parse(H):"identity"==O&&0<H.length&&"-"!=H?A=H:"parent"==O&&0<H.length&&"-"!=H?J=H:"namespace"==O&&0<H.length&&"-"!=H?Q=H:"width"==O?G=H:"height"==O?N=H:"left"==O&&0<H.length?
-B=H:"top"==O&&0<H.length?K=H:"ignore"==O?da=H.split(","):"connect"==O?W.push(JSON.parse(H)):"link"==O?na=H:"padding"==O?ca=parseFloat(H):"edgespacing"==O?L=parseFloat(H):"nodespacing"==O?V=parseFloat(H):"levelspacing"==O?ja=parseFloat(H):"layout"==O&&(R=H)}}}if(null==c[S])throw Error(mxResources.get("invalidOrMissingFile"));var aa=this.editor.csvToArray(c[S]),O=ha=null;if(null!=A||null!=J)for(var M=0;M<aa.length;M++)A==aa[M]&&(ha=M),J==aa[M]&&(O=M);null==ga&&(ga="%"+aa[0]+"%");if(null!=W)for(var T=
-0;T<W.length;T++)null==l[W[T].to]&&(l[W[T].to]={});D.model.beginUpdate();try{for(M=S+1;M<c.length;M++){var ea=this.editor.csvToArray(c[M]);if(null==ea){var fa=40<c[M].length?c[M].substring(0,40)+"...":c[M];throw Error(M+" ("+fa+") "+mxResources.get("containsValidationErrors"));}if(ea.length==aa.length){var I=null,oa=null!=ha?Q+ea[ha]:null;null!=oa&&(I=D.model.getCell(oa));var A=null!=I,X=new mxCell(ga,new mxGeometry(ka,qa,0,0),m||"whiteSpace=wrap;html=1;");X.vertex=!0;X.id=oa;for(var Z=0;Z<ea.length;Z++)D.setAttributeForCell(X,
-aa[Z],ea[Z]);if(null!=v&&null!=x){var Ba=x[X.getAttribute(v)];null!=Ba&&D.labelChanged(X,Ba)}if(null!=u&&null!=r){var ya=r[X.getAttribute(u)];null!=ya&&(X.style=ya)}D.setAttributeForCell(X,"placeholders","1");X.style=D.replacePlaceholders(X,X.style);A&&(D.model.setGeometry(I,X.geometry),D.model.setStyle(I,X.style),0>mxUtils.indexOf(f,I)&&f.push(I));I=X;if(!A)for(T=0;T<W.length;T++)l[W[T].to][I.getAttribute(W[T].to)]=I;null!=na&&"link"!=na&&(D.setLinkForCell(I,I.getAttribute(na)),D.setAttributeForCell(I,
-na,null));D.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var va=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=B&&null!=I.getAttribute(B)&&(I.geometry.x=ka+parseFloat(I.getAttribute(B))),null!=K&&null!=I.getAttribute(K)&&(I.geometry.y=la+parseFloat(I.getAttribute(K))),"@"==G.charAt(0)&&null!=I.getAttribute(G.substring(1))?I.geometry.width=parseFloat(I.getAttribute(G.substring(1))):I.geometry.width="auto"==G?va.width+ca:parseFloat(G),"@"==N.charAt(0)&&null!=I.getAttribute(N.substring(1))?
-I.geometry.height=parseFloat(I.getAttribute(N.substring(1))):I.geometry.height="auto"==N?va.height+ca:parseFloat(N),qa+=I.geometry.height+V);A?(null==e[oa]&&(e[oa]=[]),e[oa].push(I)):(J=null!=O?D.model.getCell(Q+ea[O]):null,d.push(I),null!=J?(J.style=D.replacePlaceholders(J,p),D.addCell(I,J)):f.push(D.addCell(I)))}}for(var ia=f.slice(),ba=f.slice(),T=0;T<W.length;T++)for(var pa=W[T],M=0;M<f.length;M++){var I=f[M],Ca=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){D.setAttributeForCell(b,
-c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=l[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));ba.push(D.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,c.style||D.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,ia)}}}});Ca(I,I,pa);if(null!=e[I.id])for(Z=0;Z<e[I.id].length;Z++)Ca(I,e[I.id][Z],pa)}if(null!=da)for(M=0;M<d.length;M++)for(I=d[M],Z=0;Z<da.length;Z++)D.setAttributeForCell(I,
-mxUtils.trim(da[Z]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(D);ra.spacing=L;var ma=function(){0<ra.spacing&&ra.execute(D.getDefaultParent());for(var a=0;a<f.length;a++){var b=D.getCellGeometry(f[a]);b.x=Math.round(D.snap(b.x));b.y=Math.round(D.snap(b.y));"auto"==G&&(b.width=Math.round(D.snap(b.width)));"auto"==N&&(b.height=Math.round(D.snap(b.height)))}};if("["==R.charAt(0)){var Ja=Y;D.view.validate();this.executeLayoutList(JSON.parse(R),function(){ma();Ja()});Y=null}else if("circle"==
-R){var za=new mxCircleLayout(D);za.resetEdges=!1;var Ka=za.isVertexIgnored;za.isVertexIgnored=function(a){return Ka.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){za.execute(D.getDefaultParent());ma()},!0,Y);Y=null}else if("horizontaltree"==R||"verticaltree"==R||"auto"==R&&ba.length==2*f.length-1&&1==ia.length){D.view.validate();var Aa=new mxCompactTreeLayout(D,"horizontaltree"==R);Aa.levelDistance=V;Aa.edgeRouting=!1;Aa.resetEdges=!1;this.executeLayout(function(){Aa.execute(D.getDefaultParent(),
-0<ia.length?ia[0]:null)},!0,Y);Y=null}else if("horizontalflow"==R||"verticalflow"==R||"auto"==R&&1==ia.length){D.view.validate();var wa=new mxHierarchicalLayout(D,"horizontalflow"==R?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=V;wa.parallelEdgeSpacing=L;wa.interRankCellSpacing=ja;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(D.getDefaultParent(),ba);D.moveCells(ba,ka,la)},!0,Y);Y=null}else if("organic"==R||"auto"==R&&ba.length>f.length){D.view.validate();
-var ua=new mxFastOrganicLayout(D);ua.forceConstant=3*V;ua.resetEdges=!1;var Ea=ua.isVertexIgnored;ua.isVertexIgnored=function(a){return Ea.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(D);ra.spacing=L;this.executeLayout(function(){ua.execute(D.getDefaultParent());ma()},!0,Y);Y=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=Y&&Y()}}catch(xa){this.handleError(xa)}};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 u=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=u.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 g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,e=b.outline;e.pageScale=f.pageScale;e.pageFormat=
-f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||
-c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
+a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var l in a[f].config)e[l]=a[f].config[l];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var l={},m=null,
+r=null,t=null,v=null,y=null,q=null,A=null,J=null,P="",G="auto",L="auto",B=null,K=null,M=40,U=40,ja=100,ca=0,D=this.editor.graph;D.getGraphBounds();for(var Y=function(){null!=b?b(ba):(D.setSelectionCells(ba),D.scrollCellToVisible(D.getSelectionCell()))},qa=D.getFreeInsertPoint(),ka=qa.x,la=qa.y,qa=la,ga=null,Q="auto",J=null,W=[],na=null,da=null,R=0;R<c.length&&"#"==c[R].charAt(0);){a=c[R];for(R++;R<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[R].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[R].substring(1)),
+R++;if("#"!=a.charAt(1)){var ha=a.indexOf(":");if(0<ha){var O=mxUtils.trim(a.substring(1,ha)),H=mxUtils.trim(a.substring(ha+1));"label"==O?ga=D.sanitizeHtml(H):"labelname"==O&&0<H.length&&"-"!=H?v=H:"labels"==O&&0<H.length&&"-"!=H?y=JSON.parse(H):"style"==O?m=H:"parentstyle"==O?q=H:"stylename"==O&&0<H.length&&"-"!=H?t=H:"styles"==O&&0<H.length&&"-"!=H?r=JSON.parse(H):"identity"==O&&0<H.length&&"-"!=H?A=H:"parent"==O&&0<H.length&&"-"!=H?J=H:"namespace"==O&&0<H.length&&"-"!=H?P=H:"width"==O?G=H:"height"==
+O?L=H:"left"==O&&0<H.length?B=H:"top"==O&&0<H.length?K=H:"ignore"==O?da=H.split(","):"connect"==O?W.push(JSON.parse(H)):"link"==O?na=H:"padding"==O?ca=parseFloat(H):"edgespacing"==O?M=parseFloat(H):"nodespacing"==O?U=parseFloat(H):"levelspacing"==O?ja=parseFloat(H):"layout"==O&&(Q=H)}}}if(null==c[R])throw Error(mxResources.get("invalidOrMissingFile"));var aa=this.editor.csvToArray(c[R]),O=ha=null;if(null!=A||null!=J)for(var N=0;N<aa.length;N++)A==aa[N]&&(ha=N),J==aa[N]&&(O=N);null==ga&&(ga="%"+aa[0]+
+"%");if(null!=W)for(var S=0;S<W.length;S++)null==l[W[S].to]&&(l[W[S].to]={});D.model.beginUpdate();try{for(N=R+1;N<c.length;N++){var ea=this.editor.csvToArray(c[N]);if(null==ea){var fa=40<c[N].length?c[N].substring(0,40)+"...":c[N];throw Error(N+" ("+fa+") "+mxResources.get("containsValidationErrors"));}if(ea.length==aa.length){var I=null,oa=null!=ha?P+ea[ha]:null;null!=oa&&(I=D.model.getCell(oa));var A=null!=I,X=new mxCell(ga,new mxGeometry(ka,qa,0,0),m||"whiteSpace=wrap;html=1;");X.vertex=!0;X.id=
+oa;for(var Z=0;Z<ea.length;Z++)D.setAttributeForCell(X,aa[Z],ea[Z]);if(null!=v&&null!=y){var Ba=y[X.getAttribute(v)];null!=Ba&&D.labelChanged(X,Ba)}if(null!=t&&null!=r){var ya=r[X.getAttribute(t)];null!=ya&&(X.style=ya)}D.setAttributeForCell(X,"placeholders","1");X.style=D.replacePlaceholders(X,X.style);A&&(D.model.setGeometry(I,X.geometry),D.model.setStyle(I,X.style),0>mxUtils.indexOf(f,I)&&f.push(I));I=X;if(!A)for(S=0;S<W.length;S++)l[W[S].to][I.getAttribute(W[S].to)]=I;null!=na&&"link"!=na&&(D.setLinkForCell(I,
+I.getAttribute(na)),D.setAttributeForCell(I,na,null));D.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var va=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=B&&null!=I.getAttribute(B)&&(I.geometry.x=ka+parseFloat(I.getAttribute(B))),null!=K&&null!=I.getAttribute(K)&&(I.geometry.y=la+parseFloat(I.getAttribute(K))),"@"==G.charAt(0)&&null!=I.getAttribute(G.substring(1))?I.geometry.width=parseFloat(I.getAttribute(G.substring(1))):I.geometry.width="auto"==G?va.width+ca:parseFloat(G),
+"@"==L.charAt(0)&&null!=I.getAttribute(L.substring(1))?I.geometry.height=parseFloat(I.getAttribute(L.substring(1))):I.geometry.height="auto"==L?va.height+ca:parseFloat(L),qa+=I.geometry.height+U);A?(null==e[oa]&&(e[oa]=[]),e[oa].push(I)):(J=null!=O?D.model.getCell(P+ea[O]):null,d.push(I),null!=J?(J.style=D.replacePlaceholders(J,q),D.addCell(I,J)):f.push(D.addCell(I)))}}for(var ia=f.slice(),ba=f.slice(),S=0;S<W.length;S++)for(var pa=W[S],N=0;N<f.length;N++){var I=f[N],Ca=mxUtils.bind(this,function(a,
+b,c){var d=b.getAttribute(c.from);if(null!=d){D.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=l[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));ba.push(D.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,c.style||D.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,ia)}}}});Ca(I,I,pa);if(null!=e[I.id])for(Z=0;Z<e[I.id].length;Z++)Ca(I,e[I.id][Z],
+pa)}if(null!=da)for(N=0;N<d.length;N++)for(I=d[N],Z=0;Z<da.length;Z++)D.setAttributeForCell(I,mxUtils.trim(da[Z]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(D);ra.spacing=M;var ma=function(){0<ra.spacing&&ra.execute(D.getDefaultParent());for(var a=0;a<f.length;a++){var b=D.getCellGeometry(f[a]);b.x=Math.round(D.snap(b.x));b.y=Math.round(D.snap(b.y));"auto"==G&&(b.width=Math.round(D.snap(b.width)));"auto"==L&&(b.height=Math.round(D.snap(b.height)))}};if("["==Q.charAt(0)){var Ja=Y;D.view.validate();
+this.executeLayoutList(JSON.parse(Q),function(){ma();Ja()});Y=null}else if("circle"==Q){var za=new mxCircleLayout(D);za.resetEdges=!1;var Ka=za.isVertexIgnored;za.isVertexIgnored=function(a){return Ka.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){za.execute(D.getDefaultParent());ma()},!0,Y);Y=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ba.length==2*f.length-1&&1==ia.length){D.view.validate();var Aa=new mxCompactTreeLayout(D,"horizontaltree"==Q);Aa.levelDistance=
+U;Aa.edgeRouting=!1;Aa.resetEdges=!1;this.executeLayout(function(){Aa.execute(D.getDefaultParent(),0<ia.length?ia[0]:null)},!0,Y);Y=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==ia.length){D.view.validate();var wa=new mxHierarchicalLayout(D,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=U;wa.parallelEdgeSpacing=M;wa.interRankCellSpacing=ja;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(D.getDefaultParent(),ba);
+D.moveCells(ba,ka,la)},!0,Y);Y=null}else if("organic"==Q||"auto"==Q&&ba.length>f.length){D.view.validate();var ua=new mxFastOrganicLayout(D);ua.forceConstant=3*U;ua.resetEdges=!1;var Ea=ua.isVertexIgnored;ua.isVertexIgnored=function(a){return Ea.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(D);ra.spacing=M;this.executeLayout(function(){ua.execute(D.getDefaultParent());ma()},!0,Y);Y=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=Y&&Y()}}catch(xa){this.handleError(xa)}};
+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 t=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=t.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 g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,e=b.outline;e.pageScale=f.pageScale;e.pageFormat=
+f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||
+c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));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,l=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!=l&&(this.offlineStatus.innerHTML=b,l=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.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.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)};
@@ -3249,41 +3251,42 @@ a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("s
d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(f))}):"png"==d?a.exportImage(l,null==e||"none"==e,!0,!1,!1,g,!0,!1):a.exportImage(l,!1,!0,!1,!1,g,!0,!1,"jpeg")):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=
d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==d){a.contains(f.previous)&&(c=f.child);break}}return c};EditorUi.prototype.getDiagramTextContent=
function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";
-var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<img src="/images/spin.gif">';var g={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var m=l[a];if("R"==m.substring(0,1)){var r=JSON.parse(decodeURIComponent(m.substring(1)));g[r[0]]={id:r[0],
-title:r[1],downloadUrl:r[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];g[d.id]&&(b[d.id]=d);var f=this.addCheckbox(e,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},function(){this.handleError(null,
-mxResources.get("errorLoadingFile"))});c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;
-0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=
-function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,l){d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:e,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];
-if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var g=this[c].apply(this,e);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(y){b(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};
-EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)}})();
-var CommentsWindow=function(a,b,e,d,l,m){function r(){for(var a=t.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==t&&b++;F.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);k.style.display="block";f.style.display="block"}g={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),k=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),r()):e();g=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);g=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function x(b,c){c.innerHTML="";var d=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var g={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var m=l[a];if("R"==m.substring(0,1)){var r=JSON.parse(decodeURIComponent(m.substring(1)));
+g[r[0]]={id:r[0],title:r[1],downloadUrl:r[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];g[d.id]&&(b[d.id]=d);var f=this.addCheckbox(e,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this,
+function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],
+null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,
+340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];
+a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,l){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,
+error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===
+typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var g=this[c].apply(this,e);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=
+function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();
+return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();
+null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)}})();
+var CommentsWindow=function(a,b,e,d,l,m){function r(){for(var a=u.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==u&&b++;F.style.display=0==b?"block":"none"}function t(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);k.style.display="block";f.style.display="block"}g={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),k=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),r()):e();g=null});n.className="geCommentEditBtn";m.appendChild(n);var q=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);g=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(q.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));q.focus();q.className="geCommentEditBtn gePrimaryBtn";m.appendChild(q);b.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function y(b,c){c.innerHTML="";var d=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
[d],"{1} ago"))}function A(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src="/images/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function k(b,d,e,l,m){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className="geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,
-"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});L.appendChild(e);d&&(e.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=z;a(b);return{pdiv:d,replies:c}}function y(d,e,g,m,n){function p(){A(t);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(t);g&&g()},function(b){r();c(t);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function r(){u(v,
-t,function(a){p()},!0)}var q=B().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=k(v,b.replies,q,l+1);e?r():p()}if(m||!b.isResolved){F.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite");var E=document.createElement("div");E.className="geCommentHeader";var K=document.createElement("img");
-K.className="geCommentUserImg";K.src=b.user.pictureUrl||Editor.userImage;E.appendChild(K);K=document.createElement("div");K.className="geCommentHeaderTxt";E.appendChild(K);var C=document.createElement("div");C.className="geCommentUsername";mxUtils.write(C,b.user.displayName||"");K.appendChild(C);C=document.createElement("div");C.className="geCommentDate";C.setAttribute("data-commentId",b.id);x(b,C);K.appendChild(C);z.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,
-b.content||"");z.appendChild(E);E=document.createElement("div");E.className="geCommentActions";var L=document.createElement("ul");L.className="geCommentActionsList";E.appendChild(L);q||0!=l&&!n||v(mxResources.get("reply"),function(){y("",!0)},b.isResolved);K=a.getCurrentUser();null==K||K.id!=b.user.id||q||(v(mxResources.get("edit"),function(){function d(){u(b,z,function(){A(z);b.editComment(b.content,function(){f(z)},function(b){c(z);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}
-d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(z);b.deleteComment(function(){for(var a=B(b).replies,c=0;c<a.length;c++)t.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}F.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){c(z);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=l||v(b.isResolved?mxResources.get("reopen"):
-mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=B(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);p||(e[g].style.display="none")}r()}
-b.isResolved?y(mxResources.get("reOpened")+": ",!0,c,!1,!0):y(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(E);null!=e?t.insertBefore(z,e.nextSibling):t.appendChild(z);for(e=0;null!=b.replies&&e<b.replies.length;e++)E=b.replies[e],E.isResolved=b.isResolved,k(E,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,u(b,z,g.saveCallback,g.deleteOnCancel),b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(t.appendChild(g.div),u(g.comment,
-g.div,g.saveCallback,g.deleteOnCancel)));return z}}var q=!a.canComment(),n=a.canReplyToReplies(),g=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;t.style.bottom=parseInt(z)+7+"px";y.appendChild(t);var F=document.createElement("span");
+"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});M.appendChild(e);d&&(e.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=z;a(b);return{pdiv:d,replies:c}}function x(d,e,g,m,n){function q(){A(u);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(u);g&&g()},function(b){r();c(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function r(){t(v,
+u,function(a){q()},!0)}var p=B().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=k(v,b.replies,p,l+1);e?r():q()}if(m||!b.isResolved){F.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite");var E=document.createElement("div");E.className="geCommentHeader";var K=document.createElement("img");
+K.className="geCommentUserImg";K.src=b.user.pictureUrl||Editor.userImage;E.appendChild(K);K=document.createElement("div");K.className="geCommentHeaderTxt";E.appendChild(K);var C=document.createElement("div");C.className="geCommentUsername";mxUtils.write(C,b.user.displayName||"");K.appendChild(C);C=document.createElement("div");C.className="geCommentDate";C.setAttribute("data-commentId",b.id);y(b,C);K.appendChild(C);z.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,
+b.content||"");z.appendChild(E);E=document.createElement("div");E.className="geCommentActions";var M=document.createElement("ul");M.className="geCommentActionsList";E.appendChild(M);p||0!=l&&!n||v(mxResources.get("reply"),function(){x("",!0)},b.isResolved);K=a.getCurrentUser();null==K||K.id!=b.user.id||p||(v(mxResources.get("edit"),function(){function d(){t(b,z,function(){A(z);b.editComment(b.content,function(){f(z)},function(b){c(z);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}
+d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(z);b.deleteComment(function(){for(var a=B(b).replies,c=0;c<a.length;c++)u.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}F.style.display=0==u.getElementsByTagName("div").length?"block":"none"},function(b){c(z);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));p||0!=l||v(b.isResolved?mxResources.get("reopen"):
+mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=B(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);q||(e[g].style.display="none")}r()}
+b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(E);null!=e?u.insertBefore(z,e.nextSibling):u.appendChild(z);for(e=0;null!=b.replies&&e<b.replies.length;e++)E=b.replies[e],E.isResolved=b.isResolved,k(E,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,t(b,z,g.saveCallback,g.deleteOnCancel),b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(u.appendChild(g.div),t(g.comment,
+g.div,g.saveCallback,g.deleteOnCancel)));return z}}var p=!a.canComment(),n=a.canReplyToReplies(),g=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",u=document.createElement("div");u.className="geCommentsList";u.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;u.style.bottom=parseInt(z)+7+"px";x.appendChild(u);var F=document.createElement("span");
F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var v=document.createElement("div");v.className="geToolbarContainer geCommentsToolbar";v.style.height=z;v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";v.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(v.style.filter="none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter=
-"none");if(!q){var E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){u(e,g,function(b){A(g);a.addComment(b,function(a){b.id=a;C.push(b);f(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),g=k(e,C,null,0);d();b.preventDefault();
-mxEvent.consume(b)});v.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="/images/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var p=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(p=!p)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});v.appendChild(E);a.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="/images/update16.png" style="width: 16px; padding: 2px;">',
+"none");if(!p){var E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){t(e,g,function(b){A(g);a.addComment(b,function(a){b.id=a;C.push(b);f(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),g=k(e,C,null,0);d();b.preventDefault();
+mxEvent.consume(b)});v.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="/images/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var q=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(q=!q)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});v.appendChild(E);a.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="/images/update16.png" style="width: 16px; padding: 2px;">',
E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){J();a.preventDefault();mxEvent.consume(a)}),v.appendChild(E));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="/images/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),
-v.appendChild(z));y.appendChild(v);var C=[],J=mxUtils.bind(this,function(){if(null!=g){g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="/images/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?
-a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(F);F.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),k(C[a],C,null,0,p);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback,g.deleteOnCancel))},
-function(){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;v=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(x(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}});setInterval(v,6E4);
-this.refreshCommentsTime=v;this.window=new mxWindow(mxResources.get("comments"),y,b,e,d,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
-a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var Q=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",Q);this.destroy=function(){mxEvent.removeListener(window,"resize",Q);this.window.destroy()}},
-ConfirmDialog=function(a,b,e,d,l,m,r,u,x,A){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";f.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,b);c.appendChild(f);null!=A&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",A),f.appendChild(b),c.appendChild(f));A=document.createElement("div");
-A.style.textAlign="center";A.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(k.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m);var q=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=e&&
-e(k.checked)});A.appendChild(q);null!=r?(q.innerHTML=r+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||A.appendChild(m);c.appendChild(A);x?(A.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f),
-mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):A.style.marginTop="12px";this.init=function(){q.focus()};this.container=c};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+v.appendChild(z));x.appendChild(v);var C=[],J=mxUtils.bind(this,function(){if(null!=g){g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}u.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="/images/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?
+a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});u.innerHTML="";u.appendChild(F);F.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),k(C[a],C,null,0,q);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(u.appendChild(g.div),t(g.comment,g.div,g.saveCallback,g.deleteOnCancel))},
+function(){u.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}):u.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;v=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(y(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=u.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}});setInterval(v,6E4);
+this.refreshCommentsTime=v;this.window=new mxWindow(mxResources.get("comments"),x,b,e,d,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
+a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var P=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",P);this.destroy=function(){mxEvent.removeListener(window,"resize",P);this.window.destroy()}},
+ConfirmDialog=function(a,b,e,d,l,m,r,t,y,A){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";f.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,b);c.appendChild(f);null!=A&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",A),f.appendChild(b),c.appendChild(f));A=document.createElement("div");
+A.style.textAlign="center";A.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(k.checked)});m.className="geBtn";null!=t&&(m.innerHTML=t+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=e&&
+e(k.checked)});A.appendChild(p);null!=r?(p.innerHTML=r+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||A.appendChild(m);c.appendChild(A);y?(A.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f),
+mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):A.style.marginTop="12px";this.init=function(){p.focus()};this.container=c};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))}
@@ -3321,9 +3324,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="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
e)/this.pages.length)+1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),l=d):mxEvent.consume(b)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){l=
null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=l&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=l&&d!=l&&this.movePage(l,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
-this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var r=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");r.style.position="absolute";r.style.right=this.editor.chromeless?"29px":"55px";r.style.fontSize="13pt";this.tabContainer.appendChild(r);var u=this.createControlTab(4,"&nbsp;&#10095;");
-u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var x=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=x+"px";mxEvent.addListener(r,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,x-20);mxUtils.setOpacity(r,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(r,0<b.scrollLeft?100:
-50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,x-20);mxUtils.setOpacity(r,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,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()};
+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 r=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");r.style.position="absolute";r.style.right=this.editor.chromeless?"29px":"55px";r.style.fontSize="13pt";this.tabContainer.appendChild(r);var t=this.createControlTab(4,"&nbsp;&#10095;");
+t.style.position="absolute";t.style.right=this.editor.chromeless?"0px":"29px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var y=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=y+"px";mxEvent.addListener(r,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,y-20);mxUtils.setOpacity(r,0<b.scrollLeft?100:50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(r,0<b.scrollLeft?100:
+50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(t,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,y-20);mxUtils.setOpacity(r,0<b.scrollLeft?100:50);mxUtils.setOpacity(t,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.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle=
"none";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":"#e8eaed",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.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
@@ -3333,41 +3336,41 @@ function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),null,mxUt
mxEvent.getClientX(a),l=mxEvent.getClientY(a);b.popup(d,l,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var l=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(e,l);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,l=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;l=a==this.currentPage;e.isMouseDown||l||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var r=new mxPopupMenu(this.createPageMenu(a));r.div.className+=" geMenubarMenu";r.smartSeparators=!0;r.showDisabled=!0;r.autoExpand=!0;r.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(r,arguments);this.resetCurrentMenu();r.destroy()});var u=mxEvent.getClientX(m),x=mxEvent.getClientY(m);r.popup(u,x,null,m);this.setCurrentMenu(r,b)}mxEvent.consume(m)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var r=new mxPopupMenu(this.createPageMenu(a));r.div.className+=" geMenubarMenu";r.smartSeparators=!0;r.showDisabled=!0;r.autoExpand=!0;r.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(r,arguments);this.resetCurrentMenu();r.destroy()});var t=mxEvent.getClientX(m),y=mxEvent.getClientY(m);r.popup(t,y,null,m);this.setCurrentMenu(r,b)}mxEvent.consume(m)}}))};
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,l){l.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(l.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&l.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,l));return l};a.beforeDecode=function(a,b,l){l.ui=a.ui;l.relatedPage=l.ui.getPageById(b.getAttribute("relatedPage"));if(null==l.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));l.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(l.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(l.relatedPage.root=a.decodeCell(d,!1),l=d.nextSibling,d.parentNode.removeChild(d),d=l;null!=d;){l=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=l}}return b};a.afterDecode=function(a,b,l){l.index=l.previousIndex;return l};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,u,x){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var l=e.slice(),c=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),m=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=e[f]&&c.push(a);return a==e[f]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(e[f],a))}for(f=0;f<c.length;f++)this.model.setVisible(c[f],!a);e=l;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 y.isVertex(a)&&e(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving);
-return b}function e(a){var b=!1;null!=a&&(a=y.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=y.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function x(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.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 A(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=x(a),k=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;g.view.currentRoot!=c&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);var l=g.view.getState(a),m=g.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=g.getOutgoingEdges(g.model.getTerminal(d[0],
-!0));if(null!=p){for(var r=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=k=d=0;q<p.length;q++){var v=g.model.getTerminal(p[q],!1);if(f==x(v)){var u=g.view.getState(v);v!=a&&null!=u&&(r&&b!=u.getCenterX()<l.getCenterX()||!r&&b!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}r?k=0:d=0;for(q=0;q<p.length;q++)if(v=g.model.getTerminal(p[q],
-!1),f==x(v)&&(u=g.view.getState(v),v!=a&&null!=u&&(r&&b!=u.getCenterX()<l.getCenterX()||!r&&b!=u.getCenterY()<l.getCenterY()))){var t=[];g.traverse(u.cell,!0,function(a,b){null!=b&&t.push(b);t.push(a);return!0});g.moveCells(t,(b?1:-1)*d,(b?1:-1)*k)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=x(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1);
+"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,t,y){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var l=e.slice(),c=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),m=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=e[f]&&c.push(a);return a==e[f]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(e[f],a))}for(f=0;f<c.length;f++)this.model.setVisible(c[f],!a);e=l;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 x.isVertex(a)&&e(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving);
+return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function t(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function y(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.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 A(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=y(a),k=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;g.view.currentRoot!=c&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);var l=g.view.getState(a),m=g.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var q=g.getOutgoingEdges(g.model.getTerminal(d[0],
+!0));if(null!=q){for(var r=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,p=k=d=0;p<q.length;p++){var v=g.model.getTerminal(q[p],!1);if(f==y(v)){var t=g.view.getState(v);v!=a&&null!=t&&(r&&b!=t.getCenterX()<l.getCenterX()||!r&&b!=t.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,t)&&(d=10+Math.max(d,(Math.min(n.x+n.width,t.x+t.width)-Math.max(n.x,t.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,t.y+t.height)-Math.max(n.y,t.y))/m))}}r?k=0:d=0;for(p=0;p<q.length;p++)if(v=g.model.getTerminal(q[p],
+!1),f==y(v)&&(t=g.view.getState(v),v!=a&&null!=t&&(r&&b!=t.getCenterX()<l.getCenterX()||!r&&b!=t.getCenterY()<l.getCenterY()))){var u=[];g.traverse(t.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});g.moveCells(u,(b?1:-1)*d,(b?1:-1)*k)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=y(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1);
var e=g.model.getParent(a),f=e.geometry,k=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);g.moveCells(k,l,m);return g.addCells(d,e)}finally{g.model.endUpdate()}}function f(a){g.model.beginUpdate();try{var b=
-g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var l=g.model.getTerminal(c[k],!1);null!=l&&f.push(l)}var m=g.view.getBounds(f),n=x(a),p=g.view.translate,r=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].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)/r-p.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function k(a,
-b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.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=x(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.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&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,y=g.getModel(),z=n.menus.createPopupMenu;
+g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var l=g.model.getTerminal(c[k],!1);null!=l&&f.push(l)}var m=g.view.getBounds(f),n=y(a),q=g.view.translate,r=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-q.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/r-q.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].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)/r-q.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function k(a,
+b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.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 p(a,b){var c=y(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.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&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,x=g.getModel(),z=n.menus.createPopupMenu;
n.menus.createPopupMenu=function(a,c,d){z.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&&
1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],
!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}},
-null,null,"Alt+Shift+D");var t=g.removeCells;g.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 d=[],f=0;f<a.length;f++){var k=a[f];y.isEdge(k)&&e(k)&&(d.push(k),k=y.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[f]),a=a.concat(k)):d.push(a[f])}a=d;return t.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,
+null,null,"Alt+Shift+D");var u=g.removeCells;g.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 d=[],f=0;f<a.length;f++){var k=a[f];x.isEdge(k)&&e(k)&&(d.push(k),k=x.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[f]),a=a.concat(k)):d.push(a[f])}a=d;return u.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,
d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var F=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var k=g.getIncomingEdges(f.cell),f=0;f<k.length;f++)mxUtils.remove(k[f],a)}this.model.beginUpdate();try{var l=F.call(this,a,c);if(l.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=g.getIncomingEdges(l[e]),k=g.getIncomingEdges(a[e]);
-if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(k[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var v=g.moveCells;g.moveCells=function(a,c,d,e,f,k,l){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),r=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(r,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||g.model.isEdge(a[q])&&null==g.model.getTerminal(a[q],!0)){f=g.model.getParent(a[q]);
-break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=g.getIncomingEdges(a[0]);if(0<u.length){var t=g.view.getState(g.model.getTerminal(u[0],!0));if(null!=t){var y=g.view.getState(n);null!=y&&(c=(y.getCenterX()-t.getCenterX())/g.view.scale,d=(y.getCenterY()-t.getCenterY())/g.view.scale)}}}}m=v.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],
-n,!0);else if(b(a[q])&&(u=g.getIncomingEdges(a[q]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==g.getIncomingEdges(m[q]).length){p=n;if(null==p||p==g.model.getParent(a[q]))p=g.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,g.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var E=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null;
-f.beginUpdate();try{if(k=E.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var p={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},C=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&
+if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(k[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var v=g.moveCells;g.moveCells=function(a,c,d,e,f,k,l){var m=null;this.model.beginUpdate();try{var n=f,q=this.view.getState(f),r=null!=q?q.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(r,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||g.model.isEdge(a[p])&&null==g.model.getTerminal(a[p],!0)){f=g.model.getParent(a[p]);
+break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var t=g.getIncomingEdges(a[0]);if(0<t.length){var u=g.view.getState(g.model.getTerminal(t[0],!0));if(null!=u){var x=g.view.getState(n);null!=x&&(c=(x.getCenterX()-u.getCenterX())/g.view.scale,d=(x.getCenterY()-u.getCenterY())/g.view.scale)}}}}m=v.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(p=0;p<m.length;p++)if(this.model.isEdge(m[p]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[p],!0))&&this.model.setTerminal(m[p],
+n,!0);else if(b(a[p])&&(t=g.getIncomingEdges(a[p]),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==g.getIncomingEdges(m[p]).length){q=n;if(null==q||q==g.model.getParent(a[p]))q=g.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,g.getDefaultParent(),q,m[p])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var E=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null;
+f.beginUpdate();try{if(k=E.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var q={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},C=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&
b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):f(g.getSelectionCell()):13==a.which&&(d=A(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0],!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),
-mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=p[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(V){console.log("error",
-V)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var J=g.connectVertex;g.connectVertex=function(a,d,e,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=x(a),k=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):k==l?c(a):A(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):J.call(this,a,d,e,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||u(a)||g.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 Q=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Q.apply(this,arguments);(d(this.state.cell)||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",
+mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=q[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(U){console.log("error",
+U)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var J=g.connectVertex;g.connectVertex=function(a,d,e,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=y(a),k=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):k==l?c(a):A(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):J.call(this,a,d,e,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||t(a)||g.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 P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);(d(this.state.cell)||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 N=mxVertexHandler.prototype.destroy;
-mxVertexHandler.prototype.destroy=function(a,b){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var 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 d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=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;treeMoving=1;");d.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;b.insertEdge(e,!0);d.insertEdge(e,!1);var c=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;treeMoving=1;");
c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);c.insertEdge(f,!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;treeMoving=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
@@ -3396,8 +3399,8 @@ this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(
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=this.tabContainerHeight+"px");m.apply(this,arguments)};var r=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){r.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
-b.shortcut):u.apply(this,arguments)};var x=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){x.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
+function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var r=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){r.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
+b.shortcut):t.apply(this,arguments)};var y=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){y.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var A=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){A.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+
" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,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")),
@@ -3407,7 +3410,7 @@ a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacin
e.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,d),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),this.addMenuItems(a,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,d)};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 f=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);f.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 q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=
+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 p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=
mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,
"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",
new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(c.menus.addMenuItems(a,["new","open","-"],b),EditorUi.isElectronApp&&c.menus.addMenuItems(a,["synchronize","-"],b),c.menus.addMenuItems(a,["save","saveAs","-"],b)):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):
@@ -3418,12 +3421,12 @@ a,b)})));var f=this.get("language");this.put("extras",new Menu(mxUtils.bind(this
this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(a,["insertTemplate"],b);a.addSeparator(b);this.addMenuItems(a,["createShape","insertFreehand",
"-"],b);this.addSubmenu("insertLayout",a,b,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,b,mxResources.get("advanced"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",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 n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=l.menus.get(a),e=r.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",
+["copyConnect","collapseExpand","-","pageScale"],b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=l.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),r);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",
mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var g=document.createElement("a");
g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?p.insertBefore(g,l.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function d(a,b){var c=
document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?p.insertBefore(c,l.statusContainer):p.appendChild(c);return c}function f(){for(var b=p.firstChild;null!=
-b;){var f=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=f}q=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(b=1E3>e)||a("diagram");d([b?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
+b;){var f=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=f}r=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(b=1E3>e)||a("diagram");d([b?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
null),c(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],b?60:null);f=a("insert",!0,b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);d([f,c(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],b?60:null);if(411<=e&&(f=l.actions.get("undo"),b=l.actions.get("redo"),f=c("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),b=c("",
@@ -3431,24 +3434,24 @@ b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;b
d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=e?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=e?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}b=l.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==L&&(f=r.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",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.right="8px",f.style.cursor=
-"pointer",f.style.top="1"==urlParams.embed?"13px":"11px",p.appendChild(f),L=f),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=L&&(L.parentNode.removeChild(L),L=null))}n.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);null==urlParams.clibs&&
-null==urlParams.libs||b(this);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.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 q=null,r=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";
-l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
-"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;l.tabContainer=document.createElement("div");
-l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var A=l.menus.get("viewZoom");if(null!=A){this.tabContainer.style.right=
-"70px";var B=r.addMenu("100%",A.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration="none";B.style.right="0px";B.style.bottom="0px";
-B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";x.appendChild(B);A=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,
-A);l.editor.addListener("resetGraphView",A);l.editor.addListener("pageSelected",A);var K=l.setGraphEnabled;l.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}x.appendChild(l.tabContainer);x.appendChild(p);x.appendChild(l.diagramContainer);k.appendChild(x);l.updateTabContainer();var L=null;f();mxEvent.addListener(window,
-"resize",function(){f();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,l,m,r){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=l;this.isResolved=m;this.user=r;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,l){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,l){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=l};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\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbrowserUnsupportedFiletype=Your browser does not support this filetype.\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\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>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after 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\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\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\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\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\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please, check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occured, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occured!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="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;
+null],60)}b=l.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==M&&(f=t.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",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.right="8px",f.style.cursor=
+"pointer",f.style.top="1"==urlParams.embed?"13px":"11px",p.appendChild(f),M=f),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=M&&(M.parentNode.removeChild(M),M=null))}n.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);null==urlParams.clibs&&
+null==urlParams.libs||b(this);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.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 r=null,t=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";
+l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var y=l.descriptorChanged;l.descriptorChanged=function(){y.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;
+l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var L=l.menus.get("viewZoom");
+if(null!=L){this.tabContainer.style.right="70px";var B=t.addMenu("100%",L.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration="none";
+B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";A.appendChild(B);L=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,L);l.editor.addListener("resetGraphView",L);l.editor.addListener("pageSelected",L);var K=l.setGraphEnabled;l.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(l.tabContainer);A.appendChild(p);A.appendChild(l.diagramContainer);
+k.appendChild(A);l.updateTabContainer();var M=null;f();mxEvent.addListener(window,"resize",function(){f();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,l,m,r){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=l;this.isResolved=m;this.user=r;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,l){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,l){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=l};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\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbrowserUnsupportedFiletype=Your browser does not support this filetype.\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\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>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after 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\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\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\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please, check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occured, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occured!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="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.minHeight=28;GraphViewer.prototype.minWidth=100;
GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.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.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&
(this.minHeight+=this.toolbarHeight);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.defaultPageBackgroundColor="transparent";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);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);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){if(null!=this.pageId)for(var l=0;l<e.length;l++)if(this.pageId==e[l].getAttribute("id")){this.currentPage=l;break}var m=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:m.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement))};
+if(0<e.length){if(null!=this.pageId)for(var l=0;l<e.length;l++)if(this.pageId==e[l].getAttribute("id")){this.currentPage=l;break}var m=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:m.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
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};l=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",l);l();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);
@@ -3469,13 +3472,13 @@ GraphViewer.prototype.addToolbar=function(){function a(a,b,d,f){var g=document.c
function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);c++;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.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,l=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(e,0);d=null;l=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";l=null}),100)}),a||200)}),r=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),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)||(r(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER?
-"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){r(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){r(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var u=this.graph,x=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
-this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<x&&Math.abs(this.scrollTop-u.container.scrollTop)<x&&Math.abs(this.startX-b.getGraphX())<x&&Math.abs(this.startY-b.getGraphY())<x&&(0<parseFloat(e.style.opacity||0)?m():r(30))}})}for(var A=this.toolbarItems,c=0,f=null,k=null,q=0;q<A.length;q++){var n=A[q];if("pages"==n){k=b.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 g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";e.appendChild(k);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");y.style.paddingLeft="0px";y.style.paddingRight="0px";n=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";g.style.display=k.style.display;y.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)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"==n){if(this.layersEnabled){var z=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
-f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=t.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
-"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){t.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});t.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n],
+"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){r(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){r(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||r(30)}));var t=this.graph,y=t.getTolerance();t.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
+this.scrollLeft=t.container.scrollLeft;this.scrollTop=t.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-t.container.scrollLeft)<y&&Math.abs(this.scrollTop-t.container.scrollTop)<y&&Math.abs(this.startX-b.getGraphX())<y&&Math.abs(this.startY-b.getGraphY())<y&&(0<parseFloat(e.style.opacity||0)?m():r(30))}})}for(var A=this.toolbarItems,c=0,f=null,k=null,p=0;p<A.length;p++){var n=A[p];if("pages"==n){k=b.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 g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";e.appendChild(k);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";n=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";g.style.display=k.style.display;x.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)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"==n){if(this.layersEnabled){var z=this.graph.getModel(),u=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
+f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=u.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
+"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){u.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});u.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n],
null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(A=b.ownerDocument.createElement("div"),A.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;",A.setAttribute("title",this.graphConfig.title),mxUtils.write(A,this.graphConfig.title),mxUtils.setOpacity(A,
70),e.appendChild(A));this.minToolbarWidth=34*c;var F=b.style.border,A=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==F&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),
@@ -3488,10 +3491,10 @@ GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.l
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var 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 l=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),m=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",l);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var r=d.editor.graph,u=r.container;u.style.overflow="hidden";this.lightboxChrome?(u.style.border="1px solid #c0c0c0",u.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",l)):(b.style.display="none",e.style.display="none");var x=this;r.getImageFromBundles=function(a){return x.getImageUrl(a)};var A=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=A.apply(this,arguments);a.getImageFromBundles=function(a){return x.getImageUrl(a)};return a};this.graphConfig.move&&(r.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(u.style,"border-radius","4px"),u.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(u.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(u.style,"transition","all .25s ease-in-out"));this.addClickHandler(r,d);window.setTimeout(mxUtils.bind(this,function(){u.style.outline="none";u.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(u);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(u.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&&(u.style.position="absolute",u.style.display="block",u.style.left=a.x+"px",u.style.top=a.y+"px",u.style.width=document.body.clientWidth-80+"px",u.style.height=document.body.clientHeight-80+"px",u.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute",
+function(){};var l=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),m=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",l);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var r=d.editor.graph,t=r.container;t.style.overflow="hidden";this.lightboxChrome?(t.style.border="1px solid #c0c0c0",t.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",l)):(b.style.display="none",e.style.display="none");var y=this;r.getImageFromBundles=function(a){return y.getImageUrl(a)};var A=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=A.apply(this,arguments);a.getImageFromBundles=function(a){return y.getImageUrl(a)};return a};this.graphConfig.move&&(r.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(t.style,"border-radius","4px"),t.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(t.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(t.style,"transition","all .25s ease-in-out"));this.addClickHandler(r,d);window.setTimeout(mxUtils.bind(this,function(){t.style.outline="none";t.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(t);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(t.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&&(t.style.position="absolute",t.style.display="block",t.style.left=a.x+"px",t.style.top=a.y+"px",t.style.width=document.body.clientWidth-80+"px",t.style.height=document.body.clientHeight-80+"px",t.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(r,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 l=d[e].className;null!=l&&0<l.length&&(l=l.split(" "),0<=mxUtils.indexOf(l,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),l=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){l(a)}):l(d.xml)}};
@@ -3499,7 +3502,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
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 l(){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 r(b,c){if(!b.resizedAttached)b.resizedAttached=
new l,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],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var r=!1,t=function(){b.resizedAttached&&(r&&(b.resizedAttached.call(),r=!1),a(t))};a(t);var u,v,x,p,A=function(){if((x=b.offsetWidth)!=u||(p=b.offsetHeight)!=v)r=!0,u=x,v=p;k()},J=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",A);J(f,"scroll",A)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},x=Object.prototype.toString.call(e),A="[object Array]"===x||"[object NodeList]"===x||"[object HTMLCollection]"===x||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var x=0,c=e.length;x<c;x++)r(e[x],u);else r(e,u);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var r=!1,u=function(){b.resizedAttached&&(r&&(b.resizedAttached.call(),r=!1),a(u))};a(u);var t,v,y,q,A=function(){if((y=b.offsetWidth)!=t||(q=b.offsetHeight)!=v)r=!0,t=y,v=q;k()},J=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",A);J(f,"scroll",A)}var t=function(){GraphViewer.resizeSensorEnabled&&d()},y=Object.prototype.toString.call(e),A="[object Array]"===y||"[object NodeList]"===y||"[object HTMLCollection]"===y||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var y=0,c=e.length;y<c;y++)r(e[y],t);else r(e,t);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/plugins/googledrive.js b/src/main/webapp/plugins/googledrive.js
index 8e1476a9..585b4ba3 100644
--- a/src/main/webapp/plugins/googledrive.js
+++ b/src/main/webapp/plugins/googledrive.js
@@ -5,6 +5,7 @@ Draw.loadPlugin(function(ui)
{
ui.oneDrive = null;
ui.dropbox = null;
+ ui.gitLab = null;
ui.gitHub = null;
ui.trello = null;
diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txt
index 860446ce..2c5299f3 100644
--- a/src/main/webapp/resources/dia.txt
+++ b/src/main/webapp/resources/dia.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt
index f3e41128..82e4f4f4 100644
--- a/src/main/webapp/resources/dia_am.txt
+++ b/src/main/webapp/resources/dia_am.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txt
index 1b596862..e7880ddc 100644
--- a/src/main/webapp/resources/dia_ar.txt
+++ b/src/main/webapp/resources/dia_ar.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=‫عام‬
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=‫عالمي‬
googleDocs=‫وثائق Google‬
@@ -665,6 +666,7 @@ spacing=‫التباعد‬
specialLink=‫رابط خاص‬
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=‫يتم البدء‬
straight=‫مستقيم‬
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txt
index 3b666998..689832d2 100644
--- a/src/main/webapp/resources/dia_bg.txt
+++ b/src/main/webapp/resources/dia_bg.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Общи
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Глобален
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Интервал
specialLink=Специален линк
standard=Стандартен
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Стартиране
straight=Прав
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt
index b401f8ad..ed3907c4 100644
--- a/src/main/webapp/resources/dia_bn.txt
+++ b/src/main/webapp/resources/dia_bn.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txt
index 5bc15d5b..d1417047 100644
--- a/src/main/webapp/resources/dia_bs.txt
+++ b/src/main/webapp/resources/dia_bs.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Opšti
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globalan
googleDocs=Google dokumenti
@@ -665,6 +666,7 @@ spacing=Prored
specialLink=Poseban link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Početak
straight=Pravo
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt
index 47dae741..eb12eeb4 100644
--- a/src/main/webapp/resources/dia_ca.txt
+++ b/src/main/webapp/resources/dia_ca.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Espaiat
specialLink=Enllaç especial
standard=Estàndard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Iniciant
straight=Recte
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txt
index f6e91d95..4458454a 100644
--- a/src/main/webapp/resources/dia_cs.txt
+++ b/src/main/webapp/resources/dia_cs.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Obecné
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globální
googleDocs=Google dokumenty
@@ -665,6 +666,7 @@ spacing=Odsazení
specialLink=Speciální odkaz
standard=Standardní
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Začínám
straight=Přímý
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txt
index 5a74c421..0afc08c4 100644
--- a/src/main/webapp/resources/dia_da.txt
+++ b/src/main/webapp/resources/dia_da.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Generelt
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Mellemrum
specialLink=Specielt link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Startes
straight=Lige
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt
index d8617e95..bc316cdb 100644
--- a/src/main/webapp/resources/dia_de.txt
+++ b/src/main/webapp/resources/dia_de.txt
@@ -329,6 +329,7 @@ gap=Lücke
gcp=GCP
general=Allgemein
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Abstand
specialLink=Besondere Verknüpfung
standard=Standard
startDrawing=Beginne zu zeichnen
+stopDrawing=Zeichnen beenden
starting=Wird gestartet
straight=Gerade
strikethrough=Durchgestrichen
diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txt
index 978a533b..18a77d99 100644
--- a/src/main/webapp/resources/dia_el.txt
+++ b/src/main/webapp/resources/dia_el.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Γενικά
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Συνολικά
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Απόσταση
specialLink=Ειδικός σύνδεσμος
standard=Πρότυπο
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Έναρξη
straight=Ευθεία
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt
index 51fd0688..d45bc405 100644
--- a/src/main/webapp/resources/dia_eo.txt
+++ b/src/main/webapp/resources/dia_eo.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txt
index fe5daad2..4fc785e1 100644
--- a/src/main/webapp/resources/dia_es.txt
+++ b/src/main/webapp/resources/dia_es.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Espaciado
specialLink=Enlace especial
standard=Estándar
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Iniciando
straight=Recto
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txt
index 87814224..6b21aa9d 100644
--- a/src/main/webapp/resources/dia_et.txt
+++ b/src/main/webapp/resources/dia_et.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Üldine
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globaalne
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Vahekaugus
specialLink=Erilink
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Algab
straight=Sirge
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txt
index 2712166a..eb05204c 100644
--- a/src/main/webapp/resources/dia_fa.txt
+++ b/src/main/webapp/resources/dia_fa.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=‫عمومی‬
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=‫جهانی‬
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=‫فاصله‬
specialLink=‫لینک مخصوص‬
standard=‫استاندارد‬
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=‫شروع‬
straight=‫مستقیم‬
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txt
index 82a1abe1..d1dc8135 100644
--- a/src/main/webapp/resources/dia_fi.txt
+++ b/src/main/webapp/resources/dia_fi.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Yleinen
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globaali
googleDocs=Google Dokumentit
@@ -665,6 +666,7 @@ spacing=Väli
specialLink=Erityislinkki
standard=Standardi
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Käynnistys
straight=Suora
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txt
index 8ccc677c..6ab69a5f 100644
--- a/src/main/webapp/resources/dia_fil.txt
+++ b/src/main/webapp/resources/dia_fil.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Pangkalahatan
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Pag-eespasyo
specialLink=Espesyal na paguugnay
standard=Pamantayan
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Nagsisimula
straight=Diresto
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index 09884a6a..be8548dd 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Général
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Espacement
specialLink=Lien Spécial
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Démarrage
straight=Droit
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt
index ab0b9698..edcfe9a6 100644
--- a/src/main/webapp/resources/dia_gu.txt
+++ b/src/main/webapp/resources/dia_gu.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txt
index 8247ad92..1faa8e42 100644
--- a/src/main/webapp/resources/dia_he.txt
+++ b/src/main/webapp/resources/dia_he.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=‫כללי‬
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=‫גלובלי‬
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=‫מרווח‬
specialLink=‫קישור מיוחד‬
standard=‫בסיס‬
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=‫מתחיל‬
straight=‫ישר‬
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt
index 3857ad9d..e4f57239 100644
--- a/src/main/webapp/resources/dia_hi.txt
+++ b/src/main/webapp/resources/dia_hi.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt
index b2c7ab2a..538c40c9 100644
--- a/src/main/webapp/resources/dia_hr.txt
+++ b/src/main/webapp/resources/dia_hr.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txt
index 556ba405..50ab7755 100644
--- a/src/main/webapp/resources/dia_hu.txt
+++ b/src/main/webapp/resources/dia_hu.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Általános
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globális
googleDocs=Google Dokumentumok
@@ -665,6 +666,7 @@ spacing=Térköz
specialLink=Különleges link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Kezdés
straight=Egyenes
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txt
index d22cf494..bc94b680 100644
--- a/src/main/webapp/resources/dia_i18n.txt
+++ b/src/main/webapp/resources/dia_i18n.txt
@@ -329,6 +329,7 @@ gap=gap
gcp=gcp
general=general
github=github
+gitlab=gitlab
gliffy=gliffy
global=global
googleDocs=googleDocs
@@ -665,6 +666,7 @@ spacing=spacing
specialLink=specialLink
standard=standard
startDrawing=startDrawing
+stopDrawing=stopDrawing
starting=starting
straight=straight
strikethrough=strikethrough
diff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txt
index e6da21a3..30961b2b 100644
--- a/src/main/webapp/resources/dia_id.txt
+++ b/src/main/webapp/resources/dia_id.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Umum
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spasi
specialLink=Tautan Khusus
standard=Standar
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Memulai
straight=Lurus
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txt
index e2457c53..2937d568 100644
--- a/src/main/webapp/resources/dia_it.txt
+++ b/src/main/webapp/resources/dia_it.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Generale
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globale
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spaziatura
specialLink=Link speciale
standard=Normale
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Avvio in corso
straight=Diritta
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txt
index 086b5569..5b4da862 100644
--- a/src/main/webapp/resources/dia_ja.txt
+++ b/src/main/webapp/resources/dia_ja.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=一般
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=全体
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=間隔
specialLink=特別なリンク
standard=標準
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=起動中
straight=直線
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt
index 3f39d44d..934e57c7 100644
--- a/src/main/webapp/resources/dia_kn.txt
+++ b/src/main/webapp/resources/dia_kn.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txt
index 91c4d942..c900bd24 100644
--- a/src/main/webapp/resources/dia_ko.txt
+++ b/src/main/webapp/resources/dia_ko.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=일반
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=전체
googleDocs=구글 문서
@@ -665,6 +666,7 @@ spacing=간격
specialLink=특수 링크
standard=기본
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=시작하는중
straight=직선
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt
index 601df8fa..ff49cbca 100644
--- a/src/main/webapp/resources/dia_lt.txt
+++ b/src/main/webapp/resources/dia_lt.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txt
index e0e34e58..be356fa3 100644
--- a/src/main/webapp/resources/dia_lv.txt
+++ b/src/main/webapp/resources/dia_lv.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt
index 981834f4..f764b5d1 100644
--- a/src/main/webapp/resources/dia_ml.txt
+++ b/src/main/webapp/resources/dia_ml.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt
index 4959853b..c1a8c6b6 100644
--- a/src/main/webapp/resources/dia_mr.txt
+++ b/src/main/webapp/resources/dia_mr.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txt
index 180dabe4..783e62ea 100644
--- a/src/main/webapp/resources/dia_ms.txt
+++ b/src/main/webapp/resources/dia_ms.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Umum
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Jarak
specialLink=Pautan Khas
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Bermula
straight=Lurus
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index 78c04807..a91cad15 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -329,6 +329,7 @@ gap=Opening
gcp=GCP
general=Algemeen
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globaal
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Afstand
specialLink=Speciale Link
standard=Standaard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Opstarten
straight=Recht
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txt
index 98691bd8..1e030811 100644
--- a/src/main/webapp/resources/dia_no.txt
+++ b/src/main/webapp/resources/dia_no.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Generell
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Avstand
specialLink=Spesial lenke
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starter
straight=Rett
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txt
index a49e68de..f4baf960 100644
--- a/src/main/webapp/resources/dia_pl.txt
+++ b/src/main/webapp/resources/dia_pl.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Ogólny
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globalny
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Rozmieszczenie
specialLink=Łącze specjalne
standard=Standardowe
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Uruchamianie
straight=Prosty
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txt
index 34447929..e892ba89 100644
--- a/src/main/webapp/resources/dia_pt-br.txt
+++ b/src/main/webapp/resources/dia_pt-br.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Geral
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global 
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Espaçamento 
specialLink=Link especial
standard=Padrão
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Começando
straight=Reto
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txt
index 30405b29..e9c4719b 100644
--- a/src/main/webapp/resources/dia_pt.txt
+++ b/src/main/webapp/resources/dia_pt.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Geral
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global 
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Espaçamento 
specialLink=Link especial
standard=Padrão
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=A iniciar
straight=Reto
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txt
index 2255d408..adf27049 100644
--- a/src/main/webapp/resources/dia_ro.txt
+++ b/src/main/webapp/resources/dia_ro.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spațiere
specialLink=Link special
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Începe
straight=Drept
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt
index 4d320963..23200e65 100644
--- a/src/main/webapp/resources/dia_ru.txt
+++ b/src/main/webapp/resources/dia_ru.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Общие
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Глобальный
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Интервал
specialLink=Специальная ссылка
standard=Стандарт
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Запуск
straight=Прямая
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt
index d51027ea..636e9c66 100644
--- a/src/main/webapp/resources/dia_sk.txt
+++ b/src/main/webapp/resources/dia_sk.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt
index 8581a1e5..6c130db6 100644
--- a/src/main/webapp/resources/dia_sl.txt
+++ b/src/main/webapp/resources/dia_sl.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txt
index 3a3cc308..56f4e81d 100644
--- a/src/main/webapp/resources/dia_sr.txt
+++ b/src/main/webapp/resources/dia_sr.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Opšti
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Globalan
googleDocs=Google dokumenti
@@ -665,6 +666,7 @@ spacing=Proređivanje
specialLink=Posebna veza
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Startovanje
straight=Pravo
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txt
index 8c0f1e2e..310f365e 100644
--- a/src/main/webapp/resources/dia_sv.txt
+++ b/src/main/webapp/resources/dia_sv.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Allmänt
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Avstånd
specialLink=Särskild länk
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Börjar
straight=Rak
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt
index fc9b7791..493430fd 100644
--- a/src/main/webapp/resources/dia_sw.txt
+++ b/src/main/webapp/resources/dia_sw.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txt
index 969e1fec..8a8d823a 100644
--- a/src/main/webapp/resources/dia_ta.txt
+++ b/src/main/webapp/resources/dia_ta.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt
index 5b7f9992..cf81d95b 100644
--- a/src/main/webapp/resources/dia_te.txt
+++ b/src/main/webapp/resources/dia_te.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=General
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Global
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Spacing
specialLink=Special Link
standard=Standard
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Starting
straight=Straight
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txt
index 59669419..0d8460a6 100644
--- a/src/main/webapp/resources/dia_th.txt
+++ b/src/main/webapp/resources/dia_th.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=ทั่วไป
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=ทั่วโลก
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=การเว้นวรรค
specialLink=การเชื่อมโยงพิเศษ
standard=มาตรฐาน
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=กำลังเริ่ม
straight=ตรง
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txt
index b1d326b3..be75b1c0 100644
--- a/src/main/webapp/resources/dia_tr.txt
+++ b/src/main/webapp/resources/dia_tr.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Genel
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Küresel
googleDocs=Google Dökümanları
@@ -665,6 +666,7 @@ spacing=Boşluk oluşturuluyor
specialLink=Özel link
standard=Standart
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Başlatılıyor
straight=Düz
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt
index 32cc0c31..5ae85d97 100644
--- a/src/main/webapp/resources/dia_uk.txt
+++ b/src/main/webapp/resources/dia_uk.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Загальний
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Глобальний
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Інтервал
specialLink=Спеціальне посилання
standard=Стандартний
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Запуск
straight=Прямий
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txt
index 92b7ee67..33f9239d 100644
--- a/src/main/webapp/resources/dia_vi.txt
+++ b/src/main/webapp/resources/dia_vi.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=Chung
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=Toàn cầu
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=Khoảng cách
specialLink=Đường dẫn đặc biệt
standard=Tiêu chuẩn
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=Khởi động
straight=Thẳng
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txt
index 80e99915..73d30265 100644
--- a/src/main/webapp/resources/dia_zh-tw.txt
+++ b/src/main/webapp/resources/dia_zh-tw.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=通用
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=全域
googleDocs=Google 文件
@@ -665,6 +666,7 @@ spacing=間距
specialLink=特殊連結
standard=標準
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=啟動中
straight=直線
strikethrough=Strikethrough
diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt
index 82e4714f..e9fa6838 100644
--- a/src/main/webapp/resources/dia_zh.txt
+++ b/src/main/webapp/resources/dia_zh.txt
@@ -329,6 +329,7 @@ gap=Gap
gcp=GCP
general=通用
github=GitHub
+gitlab=GitLab
gliffy=Gliffy
global=全局
googleDocs=Google Docs
@@ -665,6 +666,7 @@ spacing=间距
specialLink=特殊链接
standard=标准
startDrawing=Start drawing
+stopDrawing=Stop drawing
starting=开启中
straight=直线
strikethrough=Strikethrough
diff --git a/src/main/webapp/templates/index.xml b/src/main/webapp/templates/index.xml
index 154c57c4..61952fc1 100644
--- a/src/main/webapp/templates/index.xml
+++ b/src/main/webapp/templates/index.xml
@@ -1,4 +1,30 @@
<templates>
+<clibs name="azure">
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/additional_or_support.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/ai_machine_learning.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/apps_and_system_logos.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/azure.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/azure_additional_or_support.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/buildings.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/databases.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/developer.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/devices.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/files.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/generic.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/infrastructure.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/integration.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/integration_patterns.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/iot_devices.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/office365.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/others.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/power_bi.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/powerapps_and_flows.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/sap.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/servers.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/users_and_roles.xml</add>
+ <add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/deprecated.xml</add>
+</clibs>
+<template url="business/accd.xml" libs="general"/>
<template url="business/accd.xml" libs="general"/>
<template url="business/archimate.xml" libs="general;archimate3"/>
<template url="business/bpmn.xml" libs="general;bpmn"/>
@@ -30,15 +56,15 @@
<template url="cloud/aws_9.xml" libs="general;aws4"/>
<template url="cloud/aws_10.xml" libs="general;aws4"/>
<template url="cloud/aws_3d.xml" libs="general;aws3d"/>
-<template url="cloud/azure_1.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_2.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_3.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_4.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_5.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_6.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_7.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_8.xml" libs="general;azure;mscae"/>
-<template url="cloud/azure_9.xml" libs="general;azure;mscae"/>
+<template url="cloud/azure_1.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_2.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_3.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_4.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_5.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_6.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_7.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_8.xml" libs="general;azure;mscae" clibs="azure"/>
+<template url="cloud/azure_9.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/gcp_backup_and_archive_api_hosting.xml" libs="gcp2"/>
<template url="cloud/gcp_big_data_complex_event_processing.xml" libs="gcp2"/>
<template url="cloud/gcp_dev_test_continuous_delivery_with_spinnaker.xml" libs="gcp2"/>
@@ -85,6 +111,7 @@
<template url="maps/mind_map.xml" libs="general"/>
<template url="maps/site_map.xml" libs="general"/>
<template url="network/active_directory.xml" libs="general;citrix"/>
+<template url="network/arista.xml" libs="general" clibs="Uhttps%3A%2F%2Fjgraph.github.io%2Fdrawio-libs%2Flibs%2F%2Farista.xml"/>
<template url="network/cisco_1.xml" libs="general;cisco"/>
<template url="network/cisco_2.xml" libs="general;cisco"/>
<template url="network/citrix.xml" libs="general;citrix"/>
diff --git a/src/main/webapp/templates/network/arista.png b/src/main/webapp/templates/network/arista.png
new file mode 100644
index 00000000..7a14c1bc
--- /dev/null
+++ b/src/main/webapp/templates/network/arista.png
Binary files differ
diff --git a/src/main/webapp/templates/network/arista.xml b/src/main/webapp/templates/network/arista.xml
new file mode 100644
index 00000000..a9507cdc
--- /dev/null
+++ b/src/main/webapp/templates/network/arista.xml
@@ -0,0 +1 @@
+<mxfile modified="2019-07-18T11:57:04.427Z" host="localhost" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" etag="Gw8hxESS9Re36W31GD4V" version="@DRAWIO-VERSION@"><diagram id="l2aKFoh6-Bn0gOPZ2l0T" name="Page-1">7Zvdd6o4EMD/Gh/h5IMvH622d+859py92+7e+xoFMbtAKMSv/vWbQFAQbbVbCmXrizBADPObSWYmcYDH4fZbQuLlPXO9YICAux3gyQAhhG0gvqRkl0tsx84FfkLdXAQPggf67Cmhes5fUddLKzdyxgJO46pwzqLIm/OKjCQJ21RvW7Cg+qsx8b2a4GFOgrr0J3X5UkmhNTxc+M2j/lL9tIPU+4WkuFm9SbokLtuURPh2gMcJYzw/CrdjL5DKK/SSP3d35uq+Y4kX8UseCOMnc+THm78c/P0eOsbd5GmiQZw3sybBSr2x6i3fFSoQHY/lIQ0zXd2svYRToaEpmXnB7yylnLJIXJ8xzllYumEUUF9e4CwW0uzxURrnlEAhEcdLziXNkew7uvvbl5ak+5QvVzOdMiFyE7KhTAvoLBVn6oskNOVEHEzGD5qNoaWna1+0uuRhIBqF4jCQPbwh83/8hK0id8wClmTvhBfZR9ySiKt/RpQryxOt2FLqpfSZzDINyJ4qJYn38rZn1Q/3UIU3eCz0eLITt6gHHGUGyg9g4RibklXZTi5blgwKG8qgiLJkf9/0AbY4ULyvYW+8zp7FZE75TqlBOBknNPISpd85CwISp/SgqPmSBu6U7NhKdl8q96yOSRCwzTeS+bFsLCSJT6OptyjMIxf8oVRxkDxKcyqd3yi7y0QCEC9xtrKPkEercEJT+SDLuR8RDtn6Wt4vONR5K6gawQkbsFDdBiDGutWUFTg9GQGACX780jBSwwApfmdBt57735gap5m+ik0aekPUhv2h9vBLg8j5OGy7YzqvcRTeZzTEsQgOPj1HlHmfZXw4RhPoYFj+GO1DhX2B6oCH2zagOlg3L5wamxtjC2p9wdjCEAuADivO2TpUaH4FvS0HvdaFI3STUS+6wAw+hW/L+Ekzmwh6zc4Fvcj6gvY2aFeHvE1StHtC0QTgVmQu4x/adPzhKA/ha5so+1I7KFDet4HyrRlMk1FSX0ZaDJx6WfjVnl5QNz79MiICDESoON4vRnxsAOnUAsiDJA8gkV2PIKVtng0h3+YGL5fCMarWwjE4YfGnauEIGrrpNGTzuC+lGFkI1fbLIe85jllXhPmo/UgD9yWB7wZRC3Qg5MB9qa11g6mBO5AR4L4sQgMIHjWjiTrbNUxtW4ftM+1RgeWxqQWqa6hCCC6tiTe4tIEv2DPwObB2wlWHWHfad9W+JHtQltVQE6tVVzmqmFOdcjrfPmHYl5KbyBS/0vmupfOmdZTOOydCylPpPMRQt4dNjWp9sfmGa5P2FUNbF3L6vpWcG1o9uAZrN5LAvuxoy8BaY9Q+104UbIx6WXWk9AWyqREB72lF41C+OAJBPm0ek5fzWXXWL+9lkOcxoxHPOm/eDMyJVPuKC5N4LmZlomwgyCbXM6aRyq0fkZ/PrpohJAsx3as5G4HiXHUMXgTy5dnTqE6eRn1LsFlsHa/keKApXvUC25TNSe5ZoxbAhNR1ZWMvs4HGERvw/myc1tnUC9rfo7WXchnn/b/ZwBN76d8Ljjg9/E0nu1b6sxO+/Rc=</diagram></mxfile> \ No newline at end of file