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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson <david@draw.io>2018-05-09 19:15:35 +0300
committerDavid Benson <david@draw.io>2018-05-09 19:15:35 +0300
commit73a2020973afd477e028e2f26fcd650c35fa5270 (patch)
tree7679e7775bd2f34defdd9978ed23295208434fc1
parente0f488ad820c202ec12c076b08dc3e5fab880892 (diff)
8.6.2 releasev8.6.2
Former-commit-id: a26e3e4045d1dfa2e561b4e9edf2bc2f6c8c3d38
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/auth.html158
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/connect/confluence/connect-dev.json270
-rw-r--r--src/main/webapp/connect/jira/connect-dev.json93
-rw-r--r--src/main/webapp/index.html31
-rw-r--r--src/main/webapp/js/app.min.js1375
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js21
-rw-r--r--src/main/webapp/js/atlas.min.js1311
-rw-r--r--src/main/webapp/js/diagramly/App.js24
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js26
-rw-r--r--src/main/webapp/js/embed-static.min.js2
-rw-r--r--src/main/webapp/js/reader.min.js2
-rw-r--r--src/main/webapp/js/viewer.min.js21
15 files changed, 1445 insertions, 1897 deletions
diff --git a/ChangeLog b/ChangeLog
index 84306ae3..9b0f921c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+09-MAY-2018: 8.6.2
+
+- Replaces domain apex redirect
+
08-MAY-2018: 8.6.1
- Fixes links for transparent groups in viewer
diff --git a/VERSION b/VERSION
index 3edbce7b..0431022f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-8.6.1 \ No newline at end of file
+8.6.2 \ No newline at end of file
diff --git a/src/main/webapp/auth.html b/src/main/webapp/auth.html
deleted file mode 100644
index a5f529d8..00000000
--- a/src/main/webapp/auth.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<html>
- <head>
- <title>Test running...</title>
- </head>
- <body>
- This is a test for checking repeated authentication dialog problem in draw.io. It will execute a request every 10 seconds.<br>
- <br>
- <div id="status" style="font-size:18pt;padding:20px;border:1px solid black;display:inline-block;">Loading page...</div>
- <br><br>
- <script type="text/javascript">
- function logEvent(data)
- {
- try
- {
- var img = new Image();
- img.src = 'https://www.draw.io/images/1x1.png?' + 'q=auth-test&id=' + encodeURIComponent(id) + '&data=' + encodeURIComponent(JSON.stringify(data));
- }
- catch (e)
- {
- // ignore
- }
- };
-
- var id = (function()
- {
- function s4()
- {
- return Math.floor((1 + Math.random()) * 0x10000)
- .toString(16)
- .substring(1);
- }
-
- return s4() + s4();
- })();
-
- function handleClientLoad() {
- document.getElementById('status').innerHTML = 'Loading client...';
- logEvent({event: 'init', useragent: navigator.userAgent});
-
- // Loads the client library and the auth2 library together for efficiency.
- // Loading the auth2 library is optional here since `gapi.client.init` function will load
- // it if not already loaded. Loading it upfront can save one network request.
- gapi.load('client:auth2', function()
- {
- gapi.client.load('drive', 'v2', function()
- {
- initClient();
- });
- });
- }
-
- function initClient() {
- // Initialize the client with API key and People API, and initialize OAuth with an
- // OAuth 2.0 client ID and scopes (space delimited string) to request access.
- gapi.client.init({
- clientId: '671128082532.apps.googleusercontent.com',
- scope: 'profile'
- }).then(function () {
- // Listen for sign-in state changes.
- gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);
-
- // Handle the initial sign-in state.
- updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());
- });
- }
-
- function updateSigninStatus(isSignedIn) {
-
- logEvent({event: 'update', isSignedIn: isSignedIn});
- // When signin status changes, this function is called.
- // If the signin status is changed to signedIn, we make an API call.
- if (isSignedIn) {
- runTest();
- document.getElementById('status').style.display = 'inline-block';
- }
- else
- {
- document.getElementById('status').innerHTML = 'Please click below to sign-in!';
- document.getElementById('status').style.display = 'none';
- document.getElementById('signin-button').style.display = 'block';
- }
- }
-
- function handleSignInClick(event) {
- // Ideally the button should only show up after gapi.client.init finishes, so that this
- // handler won't be called before OAuth is initialized.
- gapi.auth2.getAuthInstance().signIn();
- }
-
- function handleSignOutClick(event) {
- gapi.auth2.getAuthInstance().signOut();
- }
-
- var thread = null;
-
- var start = new Date().getTime();
- var counter = 0;
-
-
- function update()
- {
- if (thread != null)
- {
- var now = new Date().getTime();
- document.getElementById('status').innerHTML = 'RUNNING test: #' + counter + ' uptime: ' + Math.ceil((now - start) / 1000) + ' secs';
- }
- };
-
- window.setInterval(update, 1000);
- update();
-
- function runTest() {
- if (thread != null)
- {
- window.clearInterval(thread);
- }
-
- start = new Date().getTime();
- counter = 0;
-
- logEvent({event: 'start'});
- document.getElementById('signin-button').style.display = 'none';
-
- function test()
- {
- var now = new Date().getTime();
- counter++;
- try
- {
- gapi.client.drive.about.get().execute(function(resp) {
- //console.log('resp', resp);
- // Permisison is logged to detect change of user
- logEvent({event: 'result', error: resp.error, user: resp.user,
- counter: counter, uptime: Math.ceil((now - start) / 1000)});
- });
- }
- catch (e)
- {
- //console.log('err',e);
- logEvent({event: 'error', error: e, counter: counter, uptime: Math.ceil((now - start) / 1000)});
- }
- };
-
- thread = window.setInterval(test, 10000);
- test();
- }
- </script>
- <script async defer src="https://apis.google.com/js/api.js"
- onload="this.onload=function(){};handleClientLoad()"
- onreadystatechange="if (this.readyState === 'complete') this.onload()">
- </script>
- <button id="signin-button" onclick="handleSignInClick()" style="font-size:20pt;font-weight:bold;display:none;">Please click here to sign in!</button>
- Run this test for at least the time
- it normally takes for the dialog to appear twice, if you can leave it open for longer, that helps us.
- <br><br>
- <b>Please do not close this window or tab!</b>
- </body>
-</html> \ No newline at end of file
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 8bb29c37..324e2ba2 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!
-# 05/08/2018 11:00 AM
+# 05/09/2018 04:27 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/connect/confluence/connect-dev.json b/src/main/webapp/connect/confluence/connect-dev.json
deleted file mode 100644
index 507e5242..00000000
--- a/src/main/webapp/connect/confluence/connect-dev.json
+++ /dev/null
@@ -1,270 +0,0 @@
-{
- "name": "Draw.io gaudenz",
- "description": "Draw.io add-on for Confluence",
- "key": "com.mxgraph.confluence.plugins.diagramly",
- "baseUrl": "https://0056a3a4.ngrok.io",
- "vendor":
- {
- "name": "JGraph Ltd.",
- "url": "https://www.jgraph.com"
- },
- "links": {
- "documentation": "https://support.draw.io/display/DFCC/draw.io+for+Confluence+Cloud"
- },
- "version": "1.4.8",
- "authentication":
- {
- "type": "none"
- },
- "modules":
- {
- "generalPages": [
- {
- "key": "lightbox",
- "url": "/connect/confluence/viewer-1-4-8.html?lightbox=1",
- "name": {
- "value": "Lightbox"
- }
- },
- {
- "key": "customContentViewer",
- "url": "/connect/confluence/viewer-1-4-8.html?custom=1&contentId={content.id}",
- "name": {
- "value": "Draw.io Viewer"
- }
- }
- ],
- "customContent": [{
- "key": "drawio-diagram",
- "name": {
- "value": "Draw.io Diagrams"
- },
- "uiSupport": {
- "contentViewComponent": {
- "moduleKey": "customContentViewer"
- },
- "icons": {
- "item": {
- "url": "/images/drawlogo48.png"
- }
- }
- },
- "apiSupport": {
- "supportedContainerTypes": ["page", "comment", "space", "blogpost"],
- "supportedChildTypes": ["attachment"],
- "indexing": {
- "enabled": true
- }
- }
- }
- ],
- "dynamicContentMacros":
- [
- {
- "name":
- {
- "i18n": "drawioMacro",
- "value": "Draw.io Diagram"
- },
- "url": "/connect/confluence/viewer-1-4-8.html?ceoId=${page.id}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}&tbstyle=${tbstyle}&lbox=${lbox}&zoom=${zoom}&links=${links}&owningPageId=${pageId}",
- "width": "100%",
- "description":
- {
- "i18n": "description",
- "value": "Inserts a new Draw.io Diagram"
- }, "icon":
- {
- "width": 128,
- "height": 128,
- "url": "/images/drawlogo128.png"
- },
- "categories": [
- "visuals"
- ],
- "outputType": "block",
- "featured": true,
- "key": "drawio",
- "parameters":
- [
- {
- "identifier": "diagramName",
- "name":
- {
- "value": "Diagram name (do not change)"
- },
- "type": "string"
- },
- {
- "identifier": "autoSize",
- "name":
- {
- "value": "automatic size"
- },
- "type": "boolean"
- },
- {
- "identifier": "PageId",
- "name":
- {
- "value": "Parent page ID"
- },
- "type": "string"
- },
- {
- "identifier": "baseUrl",
- "name":
- {
- "value": "Confluence Base URL"
- },
- "type": "string"
- },
- {
- "identifier": "width",
- "name":
- {
- "value": "Diagram width"
- },
- "type": "string"
- },
- {
- "identifier": "height",
- "name":
- {
- "value": "Diagram Height"
- },
- "type": "string"
- }
- ],
- "editor": {
- "url": "/connect/confluence/macroEditor-1-4-8.html?ceoId=${page.id}&diagramName=${diagramName}",
- "width": "100%",
- "height": "100%",
- "editTitle":
- {
- "value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
- },
- "insertTitle":
- {
- "value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
- }
- },
- "imagePlaceholder": {
- "width": 500,
- "height": 300,
- "url": "/connectImage",
- "applyChrome": false
- },
- "renderModes": {
- "default": {
- "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}"
- }
- }
- },
- {
- "name":
- {
- "i18n": "drawioMacro",
- "value": "Legacy macro - do not use"
- },
- "url": "/connect/confluence/viewer.html?ceoId=${page.id}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}",
- "width": "100%",
- "description":
- {
- "i18n": "description",
- "value": "Do not use"
- }, "icon":
- {
- "width": 80,
- "height": 80,
- "url": "/images/stop-flat-icon-80.png"
- },
- "categories": [
- "visuals"
- ],
- "outputType": "block",
- "featured": false,
- "key": "drawio-macro",
- "parameters":
- [
- {
- "identifier": "diagramName",
- "name":
- {
- "value": "Diagram name (do not change)"
- },
- "type": "string"
- },
- {
- "identifier": "autoSize",
- "name":
- {
- "value": "automatic size"
- },
- "type": "boolean"
- },
- {
- "identifier": "PageId",
- "name":
- {
- "value": "Parent page ID"
- },
- "type": "string"
- },
- {
- "identifier": "baseUrl",
- "name":
- {
- "value": "Confluence Base URL"
- },
- "type": "string"
- },
- {
- "identifier": "width",
- "name":
- {
- "value": "Diagram width"
- },
- "type": "string"
- },
- {
- "identifier": "height",
- "name":
- {
- "value": "Diagram Height"
- },
- "type": "string"
- }
- ],
- "editor": {
- "url": "/connect/confluence/macroEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
- "editTitle": {
- "value": "Edit MarkDown",
- "i18n": "macro.md.edit"
- },
- "insertTitle": {
- "value": "Insert New MarkDown",
- "i18n": "macro.md.insert"
- },
- "width": "100%",
- "height": "100%"
- },
- "imagePlaceholder": {
- "width": 500,
- "height": 300,
- "url": "/connectImage",
- "applyChrome": true
- },
- "renderModes": {
- "default": {
- "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}&revision=${revision}"
- }
- }
- }
- ]
- },
- "scopes": [
- "read",
- "write",
- "delete"
- ]
-} \ No newline at end of file
diff --git a/src/main/webapp/connect/jira/connect-dev.json b/src/main/webapp/connect/jira/connect-dev.json
deleted file mode 100644
index 16c3f277..00000000
--- a/src/main/webapp/connect/jira/connect-dev.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "name": "Draw.io gaudenz",
- "description": "Draw.io add-on for JIRA",
- "key": "com.mxgraph.jira.plugins.drawio.gaudenz",
- "baseUrl": "https://0d961297.ngrok.io/",
- "vendor": {
- "name": "JGraph Ltd.",
- "url": "https://www.jgraph.com"
- },
- "authentication":
- {
- "type": "none"
- },
- "version": "1.0.4",
- "scopes":
- [
- "READ",
- "WRITE",
- "DELETE"
- ],
- "modules":
- {
- "generalPages":
- [
- {
- "url":"/connect/jira/editor2.html?issueId=${issue.id}",
- "key":"drawioEditor",
- "name":
- {
- "value":"Draw.io Editor"
- },
- "location":"hidden"
- },
- {
- "url":"/connect/jira/fullScreenViewer2.html?issueId=${issue.id}",
- "key":"drawioFullScreenViewer",
- "name":
- {
- "value":"Draw.io Full Screen Viewer"
- },
- "location":"hidden"
- }
- ],
- "webItems": [
- {
- "location": "operations-attachments",
- "weight": 50,
- "key": "drawioEditorBlank",
- "url": "/connect/jira/editor2.html?issueId=${issue.id}",
- "name": {
- "value": "Add Draw.io Diagram"
- },
- "target":
- {
- "type":"dialog",
- "options":
- {
- "width":"100%",
- "height":"100%",
- "chrome":false
- }
- }
- },
- {
- "key": "drawioEditorDialog",
- "name":
- {
- "value": "Draw.io Editor"
- },
- "url": "/connect/jira/editor2.html?issueId=${issue.id}",
- "location": "none",
- "context": "addon"
- }
- ],
- "webPanels":
- [
- {
- "url": "/connect/jira/viewerPanel2.html?issueId=${issue.id}",
- "location": "atl.jira.view.issue.right.context",
- "layout":
- {
- "width": "300px"
- },
- "weight": 50,
- "key": "drawioViewerPanel",
- "name":
- {
- "value": "Draw.io Diagrams"
- }
- }
- ]
- }
- } \ No newline at end of file
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 5e65c63d..cbf232d6 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -73,6 +73,37 @@
}
}
+ // Redirects page if required
+ if (urlParams['dev'] != '1')
+ {
+ (function()
+ {
+ var proto = window.location.protocol;
+
+ // Electron protocol is file:
+ if (proto != 'file:')
+ {
+ var host = window.location.host;
+
+ // Redirects apex and rt to www
+ if (host === 'draw.io' || host === 'rt.draw.io')
+ {
+ host = 'www.draw.io';
+ }
+
+ var href = proto + '//' + host + window.location.href.substring(
+ window.location.protocol.length +
+ window.location.host.length + 2);
+
+ // Redirects if href changes
+ if (href != window.location.href)
+ {
+ window.location.href = href;
+ }
+ }
+ })();
+ }
+
/**
* Adds meta tags with application name (depends on offline URL parameter)
*/
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 028c2e50..d1d48af8 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -6774,261 +6774,261 @@ DrawioFile.prototype.autosave=function(a,b,d,c){null==this.lastAutosave&&(this.l
mxUtils.bind(this,function(a){null!=c&&c(a)}))}else null!=d&&d(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var d=a.lastIndexOf("."),c=0<d?a.substring(d):"",d=b.lastIndexOf(".");return c===(0<d?b.substring(d):"")}return a==b};
DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,b,d,c){DrawioFile.call(this,a,b);this.title=d;this.mode=c?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,d){this.saveAs(this.title,b,d)};LocalFile.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};
-LocalFile.prototype.saveFile=function(a,b,d,c){this.title=a;this.updateFileData();b=this.getData();var e=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),f=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,e?"image/png":"text/xml",e);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(e?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=d&&d()});e?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):f(b)};LocalFile.prototype.rename=function(a,b,d){this.title=a;this.descriptorChanged();null!=b&&b()};
+LocalFile.prototype.saveFile=function(a,b,d,c){this.title=a;this.updateFileData();b=this.getData();var e=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),g=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,e?"image/png":"text/xml",e);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(e?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=d&&d()});e?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):g(b)};LocalFile.prototype.rename=function(a,b,d){this.title=a;this.descriptorChanged();null!=b&&b()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,b,d){LocalFile.call(this,a,b,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,b,d){DrawioFile.call(this,a,b);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,b,d){this.saveAs(this.getTitle(),b,d)};StorageFile.prototype.saveAs=function(a,b,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,b,d)};
-StorageFile.prototype.saveFile=function(a,b,d,c){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!=d&&d()}))}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({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,c):e()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,b,d){var c=this.getTitle();c!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,b)}),d)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),f,d):f()})):b()};
+StorageFile.prototype.saveFile=function(a,b,d,c){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!=d&&d()}))}catch(g){null!=c&&c(g)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({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,c):e()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,b,d){var c=this.getTitle();c!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var g=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,b)}),d)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),g,d):g()})):b()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,b,d){StorageFile.call(this,a,b,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,p,t,f,q){function v(){mxEvent.addListener(x,"click",null!=q?q:function(){p!=App.MODE_GOOGLE||a.isDriveDomain()?p==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(p,g.checked);b()})):(a.setMode(p,g.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
+StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,p,t,g,q){function w(){mxEvent.addListener(x,"click",null!=q?q:function(){p!=App.MODE_GOOGLE||a.isDriveDomain()?p==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(p,f.checked);b()})):(a.setMode(p,f.checked),b()):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",e);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=c){var h=document.createElement("img");
-h.setAttribute("src",c);h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";x.appendChild(h)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");x.appendChild(u);mxUtils.write(u,e);if(null!=f)for(c=0;c<f.length;c++)mxUtils.br(u),mxUtils.write(u,f[c]);if(null!=t&&null==a[t]){h.style.visibility=
-"hidden";mxUtils.setOpacity(u,10);var l=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});l.spin(x);var z=window.setTimeout(function(){null==a[t]&&(l.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(z),mxUtils.setOpacity(u,100),h.style.visibility="",l.stop(),v(),"drive"==t&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else v();
-m.appendChild(x);++k>=d&&(mxUtils.br(m),k=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",mxResources.get("help"));f.setAttribute("target","_blank");f.style.position=
-"absolute";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("valign","bottom");h.setAttribute("src",Editor.helpImage);h.style.marginRight="2px";f.appendChild(h);mxUtils.write(f,mxResources.get("help"));e.appendChild(f)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer";l.style.fontSize="12px";
+h.setAttribute("src",c);h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";x.appendChild(h)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");x.appendChild(u);mxUtils.write(u,e);if(null!=g)for(c=0;c<g.length;c++)mxUtils.br(u),mxUtils.write(u,g[c]);if(null!=t&&null==a[t]){h.style.visibility=
+"hidden";mxUtils.setOpacity(u,10);var l=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});l.spin(x);var z=window.setTimeout(function(){null==a[t]&&(l.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(z),mxUtils.setOpacity(u,100),h.style.visibility="",l.stop(),w(),"drive"==t&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else w();
+m.appendChild(x);++k>=d&&(mxUtils.br(m),k=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){g=document.createElement("a");g.setAttribute("href","https://about.draw.io/support/");g.setAttribute("title",mxResources.get("help"));g.setAttribute("target","_blank");g.style.position=
+"absolute";g.style.textDecoration="none";g.style.cursor="pointer";g.style.fontSize="12px";g.style.bottom="28px";g.style.left="26px";g.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("valign","bottom");h.setAttribute("src",Editor.helpImage);h.style.marginRight="2px";g.appendChild(h);mxUtils.write(g,mxResources.get("help"));e.appendChild(g)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer";l.style.fontSize="12px";
l.style.bottom="28px";l.style.color="gray";mxUtils.write(l,mxResources.get("decideLater"));a.isOfflineApp()?l.style.right="20px":(mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)"),l.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=-Math.round(l.clientWidth/2)+"px"};e.appendChild(l);mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
-!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var k=0,n=document.createElement("p"),f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.paddingTop=
-"4px";f.style.paddingBottom="16px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("saveDiagramsTo")+":");e.appendChild(f);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",
-mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(m);f=document.createElement("p");f.style.marginTop="12px";f.style.marginBottom="6px";f.appendChild(g);h=document.createElement("span");h.style.color="gray";h.style.fontSize="12px";mxUtils.write(h," "+mxResources.get("rememberThisSetting"));f.appendChild(h);mxUtils.br(f);var u=a.getRecent();if(null!=u&&
+!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;var k=0,n=document.createElement("p"),g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.paddingTop=
+"4px";g.style.paddingBottom="16px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");e.appendChild(g);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",
+mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(m);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(f);h=document.createElement("span");h.style.color="gray";h.style.fontSize="12px";mxUtils.write(h," "+mxResources.get("rememberThisSetting"));g.appendChild(h);mxUtils.br(g);var u=a.getRecent();if(null!=u&&
0<u.length){var p=document.createElement("select");p.style.marginTop="8px";p.style.width="140px";var q=document.createElement("option");q.setAttribute("value","");q.setAttribute("selected","selected");q.style.textAlign="center";mxUtils.write(q,mxResources.get("openRecent")+"...");p.appendChild(q);for(q=0;q<u.length;q++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,
-a.title+" ("+mxResources.get(b)+")");p.appendChild(c)})(u[q]);f.appendChild(p);mxEvent.addListener(p,"change",function(b){""!=p.value&&a.loadFile(p.value)})}else f.style.marginTop="20px",m.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(u=document.createElement("div"),u.style.cursor="pointer",u.style.padding="18px 0px 6px 0px",u.style.fontSize="12px",u.style.color="gray",mxUtils.write(u,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(u,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),f.appendChild(u),m.style.paddingBottom="4px");m.appendChild(f);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
+a.title+" ("+mxResources.get(b)+")");p.appendChild(c)})(u[q]);g.appendChild(p);mxEvent.addListener(p,"change",function(b){""!=p.value&&a.loadFile(p.value)})}else g.style.marginTop="20px",m.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(u=document.createElement("div"),u.style.cursor="pointer",u.style.padding="18px 0px 6px 0px",u.style.fontSize="12px",u.style.color="gray",mxUtils.write(u,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(u,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),g.appendChild(u),m.style.paddingBottom="4px");m.appendChild(g);mxEvent.addListener(h,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",e.appendChild(n))},5E3);this.container=
e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";d.style.left="26px";d.style.color=
"gray";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);c.style.marginRight="2px";d.appendChild(c);mxUtils.write(d,mxResources.get("help"));b.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="40px";
c.style.height="40px";c.style.marginRight="12px";c.style.paddingBottom="4px";var e="";a.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",e=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",e=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",e=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",e=mxResources.get("github")):a.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+
-"/trello-logo.svg",e=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",e=mxResources.get("device"));var f=document.createElement("div");f.style.margin="4px 0px 0px 0px";var h=document.createElement("button");h.className="geBigButton";h.style.overflow="hidden";h.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(f.style.padding="42px 0px 56px 0px",h.style.marginBottom="12px"):
-(d.appendChild(c),mxUtils.write(d,e),b.appendChild(d),f.style.border="1px solid #d3d3d3",f.style.borderWidth="1px 0px 1px 0px",f.style.padding="18px 0px 24px 0px",h.style.marginBottom="8px");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");mxClient.IS_QUIRKS&&(h.style.width="340px");mxUtils.write(h,mxResources.get("createNewDiagram"));mxEvent.addListener(h,"click",function(){a.hideDialog();a.actions.get("new").funct()});f.appendChild(h);mxUtils.br(f);h=document.createElement("button");
-h.className="geBigButton";h.style.marginBottom="22px";h.style.overflow="hidden";h.style.width="340px";mxClient.IS_QUIRKS&&(h.style.width="340px");mxUtils.write(h,mxResources.get("openExistingDiagram"));mxEvent.addListener(h,"click",function(){a.actions.get("open").funct()});f.appendChild(h);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):
-a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(e=function(b){h.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));h.style.marginBottom="16px";f.style.paddingBottom="18px";mxEvent.addListener(c,"click",
-function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});f.appendChild(c)},c=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=c?(h.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+c.displayName+")"),h.style.marginBottom="16px",f.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();
-a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),f.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
+"/trello-logo.svg",e=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",e=mxResources.get("device"));var g=document.createElement("div");g.style.margin="4px 0px 0px 0px";var h=document.createElement("button");h.className="geBigButton";h.style.overflow="hidden";h.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(g.style.padding="42px 0px 56px 0px",h.style.marginBottom="12px"):
+(d.appendChild(c),mxUtils.write(d,e),b.appendChild(d),g.style.border="1px solid #d3d3d3",g.style.borderWidth="1px 0px 1px 0px",g.style.padding="18px 0px 24px 0px",h.style.marginBottom="8px");mxClient.IS_QUIRKS&&(g.style.whiteSpace="nowrap",g.style.cssFloat="left");mxClient.IS_QUIRKS&&(h.style.width="340px");mxUtils.write(h,mxResources.get("createNewDiagram"));mxEvent.addListener(h,"click",function(){a.hideDialog();a.actions.get("new").funct()});g.appendChild(h);mxUtils.br(g);h=document.createElement("button");
+h.className="geBigButton";h.style.marginBottom="22px";h.style.overflow="hidden";h.style.width="340px";mxClient.IS_QUIRKS&&(h.style.width="340px");mxUtils.write(h,mxResources.get("openExistingDiagram"));mxEvent.addListener(h,"click",function(){a.actions.get("open").funct()});g.appendChild(h);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):
+a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(e=function(b){h.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));h.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(c,"click",
+function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});g.appendChild(c)},c=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=c?(h.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+c.displayName+")"),h.style.marginBottom="16px",g.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();
+a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),g.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",[d])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
-f.appendChild(e));b.appendChild(f);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,h,l,m){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);g.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");
-f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(n.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",
-e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);m?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),g.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=
-g},ErrorDialog=function(a,b,d,c,e,f,h,l,m,g,k){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var u=document.createElement("div");u.style.padding="0px";u.style.margin="0px";u.style.fontSize="18px";u.style.paddingBottom="16px";u.style.marginBottom="16px";u.style.borderBottom="1px solid #c0c0c0";u.style.color="gray";mxUtils.write(u,b);n.appendChild(u)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");
-d.style.marginTop="16px";d.style.textAlign="center";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=k&&k()}),g.className="geBtn",d.appendChild(g));var p=mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});p.className="geBtn";d.appendChild(p);null!=h&&(c=mxUtils.button(h,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",
-d.appendChild(c));this.init=function(){p.focus()};n.appendChild(d);this.container=n},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var l=document.createElement("textarea");
+g.appendChild(e));b.appendChild(g);this.container=b},ConfirmDialog=function(a,b,d,c,e,g,h,l,m){var f=document.createElement("div");f.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);f.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");
+g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(n.checked)});g.className="geBtn";null!=l&&(g.innerHTML=l+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&k.appendChild(g);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",
+e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(g);f.appendChild(k);m?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),f.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=
+f},ErrorDialog=function(a,b,d,c,e,g,h,l,m,f,k){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var u=document.createElement("div");u.style.padding="0px";u.style.margin="0px";u.style.fontSize="18px";u.style.paddingBottom="16px";u.style.marginBottom="16px";u.style.borderBottom="1px solid #c0c0c0";u.style.color="gray";mxUtils.write(u,b);n.appendChild(u)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");
+d.style.marginTop="16px";d.style.textAlign="center";null!=g&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=k&&k()}),f.className="geBtn",d.appendChild(f));var p=mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});p.className="geBtn";d.appendChild(p);null!=h&&(c=mxUtils.button(h,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",
+d.appendChild(c));this.init=function(){p.focus()};n.appendChild(d);this.container=n},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var g=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var l=document.createElement("textarea");
l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),
-function(){var c=5E5>b.length?l.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=c.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var k=window.open().document;k.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");k.close()}}),m.className="geBtn",h.appendChild(m));if(!f||7500<b.length){var g=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",b,"text/plain")});g.className="geBtn";h.appendChild(g)}if(f&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(u){a.handleError({message:u.message||
-mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");k.appendChild(g);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+
-encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign=
-"bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(g);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?
-g.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(h);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,b){function d(){var a=null!=y.getTitle()?y.getTitle():this.defaultFilename;if(H.checked&&""!=u.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=p.value&&"0"!=p.value&&(b+="&border="+p.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(x.checked?"1":"0");b+="&resize="+
-(t.checked?"1":"0");b+="&x0="+Number(k.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1");z.checked?b+="&edit=_blank":v.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else y.constructor==DriveFile||y.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?b+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(b+=y.getHash().substring(1),b=y.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
-encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(k.value),b+="&height="+a),g.value=b):g.value=""}var c=document.createElement("div"),e=a.editor.graph,f=e.getGraphBounds(),h=e.view.scale,l=Math.floor(f.x/h-e.view.translate.x),m=Math.floor(f.y/h-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);
-mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=l;c.appendChild(k);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
-"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(f.height/h);c.appendChild(n);mxUtils.br(c);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";c.appendChild(f);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=b||"";
-c.appendChild(u);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","3");p.style.marginBottom="8px";p.style.marginLeft="4px";p.value="0";c.appendChild(p);mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";c.appendChild(q);mxUtils.write(c,mxResources.get("pan")+" ");var w=document.createElement("input");
-w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("zoom")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";v.setAttribute("title",window.location.href);c.appendChild(v);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
+l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),
+function(){var c=5E5>b.length?l.value:b;if(null!=e)e(c);else if(g)try{var f=a.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var k=window.open().document;k.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
+'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");k.close()}}),m.className="geBtn",h.appendChild(m));if(!g||7500<b.length){var f=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",b,"text/plain")});f.className="geBtn";h.appendChild(f)}if(g&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(u){a.handleError({message:u.message||
+mxResources.get("drawingTooLarge")})}}),f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");k.appendChild(f);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+
+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom="5px",k.appendChild(f),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign=
+"bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(f);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?
+f.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",f.className="geBtn"):(h.appendChild(m),f.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(h);this.container=c};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,b){function d(){var a=null!=y.getTitle()?y.getTitle():this.defaultFilename;if(H.checked&&""!=u.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=p.value&&"0"!=p.value&&(b+="&border="+p.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(x.checked?"1":"0");b+="&resize="+
+(t.checked?"1":"0");b+="&x0="+Number(k.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1");z.checked?b+="&edit=_blank":w.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));f.value=b}else y.constructor==DriveFile||y.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?b+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(b+=y.getHash().substring(1),b=y.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(k.value),b+="&height="+a),f.value=b):f.value=""}var c=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),h=e.view.scale,l=Math.floor(g.x/h-e.view.translate.x),m=Math.floor(g.y/h-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.marginTop="2px";f.style.width="410px";c.appendChild(f);
+mxUtils.br(c);this.init=function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=l;c.appendChild(k);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
+"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(g.height/h);c.appendChild(n);mxUtils.br(c);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";c.appendChild(g);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=b||"";
+c.appendChild(u);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","3");p.style.marginBottom="8px";p.style.marginLeft="4px";p.value="0";c.appendChild(p);mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";c.appendChild(q);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");
+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";w.setAttribute("title",window.location.href);c.appendChild(w);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
mxResources.get("asNew")+" ");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";c.appendChild(t);mxUtils.write(c,mxResources.get("resize")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("fit")+" ");var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginLeft=
-"8px";c.appendChild(H);mxUtils.write(c,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),y=a.getCurrentFile();mxEvent.addListener(q,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(H,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);d();
-mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn gePrimaryBtn";f.appendChild(h);c.appendChild(f);this.container=c},CreateGraphDialog=function(a,b,d){var c=document.createElement("div");c.style.textAlign=
-"right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);c.appendChild(b);var f=new Graph(b);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var h="curved=1;";f.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))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
-!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,h);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=f.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var d=f.getCellGeometry(a),g;n(function(){g=f.insertVertex(l,null,"Entry",d.x,d.y,80,30,"rounded=1;");m(g);f.view.refresh(g);
-f.insertEdge(l,null,"",a,g,h)},function(){f.scrollCellToVisible(g)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var g=mxUtils.convertPoint(f.container,mxEvent.getClientX(c),mxEvent.getClientY(c));f.connectionHandler.start(d,g.x,g.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var g;try{g=f.insertVertex(l,null,"Start",
-0,0,80,30,"ellipse"),m(g)}finally{f.getModel().endUpdate()}var k;"horizontalTree"==d?(k=new mxCompactTreeLayout(f),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(k=new mxCompactTreeLayout(f,!1),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(k=new mxRadialTreeLayout(f,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==d?k=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?k=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==d?(k=new mxFastOrganicLayout(f,!1),k.forceConstant=80):"circle"==d&&(k=new mxCircleLayout(f));if(null!=k){var n=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),k.execute(f.getDefaultParent(),g)}catch(t){throw t;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,d,g){u.apply(this,arguments);n()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var p=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&c.appendChild(p);var q=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,g=d.getBounds(c);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(p)};this.container=c};
+"8px";c.appendChild(H);mxUtils.write(c,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),y=a.getCurrentFile();mxEvent.addListener(q,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(H,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);d();
+mxEvent.addListener(f,"click",function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn gePrimaryBtn";g.appendChild(h);c.appendChild(g);this.container=c},CreateGraphDialog=function(a,b,d){var c=document.createElement("div");c.style.textAlign=
+"right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);c.appendChild(b);var g=new Graph(b);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var h="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,h);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=g.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){g.connectionHandler.reset();g.clearSelection();var d=g.getCellGeometry(a),f;n(function(){f=g.insertVertex(l,null,"Entry",d.x,d.y,80,30,"rounded=1;");m(f);g.view.refresh(f);
+g.insertEdge(l,null,"",a,f,h)},function(){g.scrollCellToVisible(f)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var f=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(d,f.x,f.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var f;try{f=g.insertVertex(l,null,"Start",
+0,0,80,30,"ellipse"),m(f)}finally{g.getModel().endUpdate()}var k;"horizontalTree"==d?(k=new mxCompactTreeLayout(g),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(k=new mxCompactTreeLayout(g,!1),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(k=new mxRadialTreeLayout(g,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==d?k=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?k=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==d?(k=new mxFastOrganicLayout(g,!1),k.forceConstant=80):"circle"==d&&(k=new mxCircleLayout(g));if(null!=k){var n=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),k.execute(g.getDefaultParent(),f)}catch(t){throw t;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,d,f){u.apply(this,arguments);n()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var p=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&c.appendChild(p);var q=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();
+var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,f=d.getBounds(c);f.x-=d.translate.x;f.y-=d.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(p)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,b){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=a.editor.graph.backgroundImage,e=document.createElement("input");e.setAttribute("type","text");e.style.marginTop="4px";e.style.marginBottom="4px";e.style.width="350px";e.value=
-null!=c?c.src:"";var f=!1,h=function(){f||""==e.value||a.isOffline()?(l.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
-c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,d,g,k){e.value=a;h()},function(){},
+null!=c?c.src:"";var g=!1,h=function(){g||""==e.value||a.isOffline()?(l.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
+c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,d,f,k){e.value=a;h()},function(){},
function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(e.value=decodeURIComponent(d),h())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(e);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var l=document.createElement("input");
-l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=c?c.width:"";d.appendChild(l);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.height:"";d.appendChild(m);c=mxUtils.button(mxResources.get("reset"),function(){e.value="";l.value="";m.value="";f=!1});mxEvent.addListener(c,"mousedown",
-function(){f=!0});mxEvent.addListener(c,"touchstart",function(){f=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(e,"change",h);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,h()));e.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var k=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)});
+l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=c?c.width:"";d.appendChild(l);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.height:"";d.appendChild(m);c=mxUtils.button(mxResources.get("reset"),function(){e.value="";l.value="";m.value="";g=!1});mxEvent.addListener(c,"mousedown",
+function(){g=!0});mxEvent.addListener(c,"touchstart",function(){g=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(e,"change",h);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,h()));e.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var k=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)});
k.className="geBtn";c.appendChild(k);null!=a.drive&&"1"==urlParams.photos&&(k=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)}))}),k.className="geBtn",c.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});k.className="geBtn gePrimaryBtn";c.appendChild(k);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
-c||"plantUmlTxt"==c){var d="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+=
-k(c4&63)},t=new XMLHttpRequest;t.open("GET",d+function(a){r="";for(h=0;h<a.length;h+=3)r=h+2==a.length?r+n(a.charCodeAt(h),a.charCodeAt(h+1),0):h+1==a.length?r+n(a.charCodeAt(h),0,0):r+n(a.charCodeAt(h),a.charCodeAt(h+1),a.charCodeAt(h+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(t.responseType="blob");t.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c){a.spinner.stop();g.getModel().beginUpdate();try{cell=g.insertVertex(null,
-null,"<pre>"+this.response+"</pre>",e.x,e.y,1,1,"text;html=1;overflow=fill;"),g.updateCellSize(cell,!0)}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var k=d.width,t=d.height;if(0==k&&0==t){var n=c.target.result,p=n.indexOf(","),n=decodeURIComponent(escape(atob(n.substring(p+1)))),n=mxUtils.parseXml(n).getElementsByTagName("svg");
-0<n.length&&(k=parseFloat(n[0].getAttribute("width")),t=parseFloat(n[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,e.x,e.y,k,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},d.onerror=function(b){a.handleError(b)};else a.spinner.stop(),a.handleError(d)};t.onerror=
-function(b){a.handleError(b)};t.send()}}else if("table"==c){for(var p=null,f=[],u=0,h=0;h<d.length;h++)if(t=mxUtils.trim(d[h]),"create table"==t.substring(0,12).toLowerCase())t=mxUtils.trim(t.substring(12)),"("==t.charAt(t.length-1)&&(t=t.substring(0,t.lastIndexOf(" "))),p=new mxCell(t,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;"),
-p.vertex=!0,f.push(p),t=a.editor.graph.getPreferredSizeForCell(m),null!=t&&(p.geometry.width=t.width+10);else if(null!=p&&")"==t.charAt(0))u+=p.geometry.width+40,p=null;else if("("!=t&&null!=p&&(t=t.substring(0,","==t.charAt(t.length-1)?t.length-1:t.length),"primary key"!=t.substring(0,11).toLowerCase())){var l=t.toLowerCase().indexOf("primary key"),t=t.replace(/primary key/i,""),m=new mxCell(t,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-m.vertex=!0;t=sb.cloneCell(m,0<l?"PK":"");t.connectable=!1;t.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;";t.geometry.width=30;t.geometry.height=26;m.insert(t);t=a.editor.graph.getPreferredSizeForCell(m);null!=t&&p.geometry.width<t.width+10&&(p.geometry.width=Math.min(220,t.width+10));p.insert(m);p.geometry.height+=26}0<f.length&&(g=a.editor.graph,
-d=g.view,t=g.getGraphBounds(),g.setSelectionCells(g.importCells(f,Math.ceil(Math.max(0,t.x/d.scale-d.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(t.y+t.height)/d.scale-d.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==c){if(0<d.length){g=a.editor.graph;p=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-p.vertex=!0;t=g.getPreferredSizeForCell(p);null!=t&&p.geometry.width<t.width+10&&(p.geometry.width=t.width+10);m=[p];if(1<d.length)for(h=1;h<d.length;h++)"--"==d[h]?(t=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;"),t.vertex=!0,p.geometry.height+=t.geometry.height,p.insert(t),m.push(t)):0<d[h].length&&";"!=d[h].charAt(0)&&(u=new mxCell(d[h],
-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,t=g.getPreferredSizeForCell(u),null!=t&&u.geometry.width<t.width&&(u.geometry.width=t.width),p.geometry.width=Math.max(p.geometry.width,u.geometry.width),p.geometry.height+=u.geometry.height,p.insert(u),m.push(u));g.getModel().beginUpdate();try{p=g.importCells([p],e.x,e.y)[0],g.fireEvent(new mxEventObject("cellsInserted",
-"cells",[p].concat(p.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(p);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var m=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,f.push(b));return b},F={},f=[],h=0;h<d.length;h++)if(";"!=d[h].charAt(0)){var A=d[h].split("->");2<=A.length&&(u=m(A[0]),l=m(A[A.length-1]),A=new mxCell(2<A.length?A[1]:"",new mxGeometry),A.edge=!0,u.insertEdge(A,!0),l.insertEdge(A,!1),
-f.push(A))}if(0<f.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);g=new Graph(d);g.getModel().beginUpdate();try{f=g.importCells(f);for(h=0;h<f.length;h++)g.getModel().isVertex(f[h])&&(t=g.getPreferredSizeForCell(f[h]),f[h].geometry.width=Math.max(f[h].geometry.width,t.width),f[h].geometry.height=Math.max(f[h].geometry.height,t.height));p=new mxFastOrganicLayout(g);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();
-m=[];a.editor.graph.getModel().beginUpdate();try{m=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();d.parentNode.removeChild(d)}}}function c(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),k.className="geBtn",c.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});k.className="geBtn gePrimaryBtn";c.appendChild(k);a.editor.cancelFirst||c.appendChild(f);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
+c||"plantUmlTxt"==c){var d="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",f=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+=
+k(c4&63)},t=new XMLHttpRequest;t.open("GET",d+function(a){r="";for(h=0;h<a.length;h+=3)r=h+2==a.length?r+n(a.charCodeAt(h),a.charCodeAt(h+1),0):h+1==a.length?r+n(a.charCodeAt(h),0,0):r+n(a.charCodeAt(h),a.charCodeAt(h+1),a.charCodeAt(h+2));return r}(f.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(t.responseType="blob");t.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c){a.spinner.stop();f.getModel().beginUpdate();try{cell=f.insertVertex(null,
+null,"<pre>"+this.response+"</pre>",e.x,e.y,1,1,"text;html=1;overflow=fill;"),f.updateCellSize(cell,!0)}finally{f.getModel().endUpdate()}f.setSelectionCell(cell);f.scrollCellToVisible(f.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var k=d.width,t=d.height;if(0==k&&0==t){var n=c.target.result,p=n.indexOf(","),n=decodeURIComponent(escape(atob(n.substring(p+1)))),n=mxUtils.parseXml(n).getElementsByTagName("svg");
+0<n.length&&(k=parseFloat(n[0].getAttribute("width")),t=parseFloat(n[0].getAttribute("height")))}f.getModel().beginUpdate();try{cell=f.insertVertex(null,null,b,e.x,e.y,k,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{f.getModel().endUpdate()}f.setSelectionCell(cell);f.scrollCellToVisible(f.getSelectionCell())};d.src=c.target.result},d.onerror=function(b){a.handleError(b)};else a.spinner.stop(),a.handleError(d)};t.onerror=
+function(b){a.handleError(b)};t.send()}}else if("table"==c){for(var p=null,g=[],u=0,h=0;h<d.length;h++)if(t=mxUtils.trim(d[h]),"create table"==t.substring(0,12).toLowerCase())t=mxUtils.trim(t.substring(12)),"("==t.charAt(t.length-1)&&(t=t.substring(0,t.lastIndexOf(" "))),p=new mxCell(t,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;"),
+p.vertex=!0,g.push(p),t=a.editor.graph.getPreferredSizeForCell(m),null!=t&&(p.geometry.width=t.width+10);else if(null!=p&&")"==t.charAt(0))u+=p.geometry.width+40,p=null;else if("("!=t&&null!=p&&(t=t.substring(0,","==t.charAt(t.length-1)?t.length-1:t.length),"primary key"!=t.substring(0,11).toLowerCase())){var l=t.toLowerCase().indexOf("primary key"),t=t.replace(/primary key/i,""),m=new mxCell(t,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+m.vertex=!0;t=sb.cloneCell(m,0<l?"PK":"");t.connectable=!1;t.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;";t.geometry.width=30;t.geometry.height=26;m.insert(t);t=a.editor.graph.getPreferredSizeForCell(m);null!=t&&p.geometry.width<t.width+10&&(p.geometry.width=Math.min(220,t.width+10));p.insert(m);p.geometry.height+=26}0<g.length&&(f=a.editor.graph,
+d=f.view,t=f.getGraphBounds(),f.setSelectionCells(f.importCells(g,Math.ceil(Math.max(0,t.x/d.scale-d.translate.x)+4*f.gridSize),Math.ceil(Math.max(0,(t.y+t.height)/d.scale-d.translate.y)+4*f.gridSize))),f.scrollCellToVisible(f.getSelectionCell()))}else if("list"==c){if(0<d.length){f=a.editor.graph;p=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+p.vertex=!0;t=f.getPreferredSizeForCell(p);null!=t&&p.geometry.width<t.width+10&&(p.geometry.width=t.width+10);m=[p];if(1<d.length)for(h=1;h<d.length;h++)"--"==d[h]?(t=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;"),t.vertex=!0,p.geometry.height+=t.geometry.height,p.insert(t),m.push(t)):0<d[h].length&&";"!=d[h].charAt(0)&&(u=new mxCell(d[h],
+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,t=f.getPreferredSizeForCell(u),null!=t&&u.geometry.width<t.width&&(u.geometry.width=t.width),p.geometry.width=Math.max(p.geometry.width,u.geometry.width),p.geometry.height+=u.geometry.height,p.insert(u),m.push(u));f.getModel().beginUpdate();try{p=f.importCells([p],e.x,e.y)[0],f.fireEvent(new mxEventObject("cellsInserted",
+"cells",[p].concat(p.children)))}finally{f.getModel().endUpdate()}f.setSelectionCell(p);f.scrollCellToVisible(f.getSelectionCell())}}else{for(var m=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,g.push(b));return b},F={},g=[],h=0;h<d.length;h++)if(";"!=d[h].charAt(0)){var A=d[h].split("->");2<=A.length&&(u=m(A[0]),l=m(A[A.length-1]),A=new mxCell(2<A.length?A[1]:"",new mxGeometry),A.edge=!0,u.insertEdge(A,!0),l.insertEdge(A,!1),
+g.push(A))}if(0<g.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);f=new Graph(d);f.getModel().beginUpdate();try{g=f.importCells(g);for(h=0;h<g.length;h++)f.getModel().isVertex(g[h])&&(t=f.getPreferredSizeForCell(g[h]),g[h].geometry.width=Math.max(g[h].geometry.width,t.width),g[h].geometry.height=Math.max(g[h].geometry.height,t.height));p=new mxFastOrganicLayout(f);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(f.getDefaultParent())}finally{f.getModel().endUpdate()}f.clearCellOverlays();
+m=[];a.editor.graph.getModel().beginUpdate();try{m=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());f.destroy();d.parentNode.removeChild(d)}}}function c(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
"table"==l.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==l.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==l.value||"plantUmlTxt"==l.value?
-"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height="354px";h.style.marginBottom="16px";
+"@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(),g=document.createElement("div");g.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height="354px";h.style.marginBottom="16px";
var l=document.createElement("select"),m=document.createElement("option");m.setAttribute("value","list");m.setAttribute("selected","selected");mxUtils.write(m,mxResources.get("list"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("table"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value",
-"plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(m),l.appendChild(g),
-l.appendChild(k));var n=c();h.value=n;f.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.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){h.value=a.target.result};b.readAsText(a)}},!1));f.appendChild(l);mxEvent.addListener(l,"change",function(){var a=c();if(0==h.value.length||
-h.value==n)n=a,h.value=n});m=mxUtils.button(mxResources.get("close"),function(){h.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});m.className="geBtn";a.editor.cancelFirst&&f.appendChild(m);g=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(h.value,l.value)});f.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(m);this.container=f},NewDialog=function(a,b,d,c,e,f,h,l,m,g,k,n,u,p,q){function w(){for(var a=
-!0;G<N.length&&(a||0!=mxUtils.mod(G,30));)a=N[G++],t(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function v(){if(P)d||a.hideDialog(),p(P,O,B.value);else if(c)d||a.hideDialog(),c(T,B.value);else{var b=B.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
-null,c)})}}function z(a,b,c,d,g){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");F.removeAttribute("disabled");T=b;V=c;R=a;P=d;O=g;R.style.backgroundColor=l;R.style.border=m}function t(a,b,c,d,g,k,t,e){var n=document.createElement("div");n.className="geTemplate";n.style.height=S+"px";n.style.width=Y+"px";null!=d&&0<d.length&&n.setAttribute("title",d);if(null!=k)n.style.backgroundImage="url("+k+")",n.style.backgroundSize="contain",n.style.backgroundPosition=
-"center center",n.style.backgroundRepeat="no-repeat",mxEvent.addListener(n,"click",function(b){z(n,null,null,a,t)}),mxEvent.addListener(n,"dblclick",function(a){v()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);n.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";var p=!1;mxEvent.addListener(n,"click",function(c){F.setAttribute("disabled","disabled");n.style.backgroundColor="transparent";
-n.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(z(n,a.getText(),b),p&&v())}))});mxEvent.addListener(n,"dblclick",function(a){p=!0})}else n.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",g&&z(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){z(n)}),mxEvent.addListener(n,"dblclick",function(a){v()}));
-K.appendChild(n)}function x(){mxEvent.addListener(K,"scroll",function(a){K.scrollTop+K.clientHeight>=K.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,b;for(b in J){var c=document.createElement("div"),d=mxResources.get(b),k=J[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+
-k.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);Q.appendChild(c);null==a&&(a=c,a.style.backgroundColor=h);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=h,K.scrollTop=0,K.innerHTML="",G=0,N=J[b],C=null,w())})})(b,c)}w()}d=null!=d?d:!0;e=null!=e?e:!1;h=null!=h?h:"#ebf2f9";l=null!=l?l:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";k=null!=k?k:TEMPLATE_PATH+"/index.xml";var H=document.createElement("div");
+"plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(m),l.appendChild(f),
+l.appendChild(k));var n=c();h.value=n;g.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.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){h.value=a.target.result};b.readAsText(a)}},!1));g.appendChild(l);mxEvent.addListener(l,"change",function(){var a=c();if(0==h.value.length||
+h.value==n)n=a,h.value=n});m=mxUtils.button(mxResources.get("close"),function(){h.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);f=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(h.value,l.value)});g.appendChild(f);f.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);this.container=g},NewDialog=function(a,b,d,c,e,g,h,l,m,f,k,n,u,p,q){function v(){for(var a=
+!0;G<N.length&&(a||0!=mxUtils.mod(G,30));)a=N[G++],t(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function w(){if(P)d||a.hideDialog(),p(P,O,D.value);else if(c)d||a.hideDialog(),c(T,D.value);else{var b=D.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
+null,c)})}}function z(a,b,c,d,f){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");F.removeAttribute("disabled");T=b;V=c;R=a;P=d;O=f;R.style.backgroundColor=l;R.style.border=m}function t(a,b,c,d,f,k,t,e){var n=document.createElement("div");n.className="geTemplate";n.style.height=S+"px";n.style.width=Y+"px";null!=d&&0<d.length&&n.setAttribute("title",d);if(null!=k)n.style.backgroundImage="url("+k+")",n.style.backgroundSize="contain",n.style.backgroundPosition=
+"center center",n.style.backgroundRepeat="no-repeat",mxEvent.addListener(n,"click",function(b){z(n,null,null,a,t)}),mxEvent.addListener(n,"dblclick",function(a){w()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);n.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";var p=!1;mxEvent.addListener(n,"click",function(c){F.setAttribute("disabled","disabled");n.style.backgroundColor="transparent";
+n.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(z(n,a.getText(),b),p&&w())}))});mxEvent.addListener(n,"dblclick",function(a){p=!0})}else n.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",f&&z(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){z(n)}),mxEvent.addListener(n,"dblclick",function(a){w()}));
+K.appendChild(n)}function x(){mxEvent.addListener(K,"scroll",function(a){K.scrollTop+K.clientHeight>=K.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in J){var c=document.createElement("div"),d=mxResources.get(b),k=J[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+
+k.length+")");mxUtils.write(c,c.getAttribute("title"));null!=f&&(c.style.padding=f);Q.appendChild(c);null==a&&(a=c,a.style.backgroundColor=h);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=h,K.scrollTop=0,K.innerHTML="",G=0,N=J[b],B=null,v())})})(b,c)}v()}d=null!=d?d:!0;e=null!=e?e:!1;h=null!=h?h:"#ebf2f9";l=null!=l?l:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";k=null!=k?k:TEMPLATE_PATH+"/index.xml";var H=document.createElement("div");
H.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";d&&H.appendChild(E);var y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="40px";y.style.height="40px";y.style.marginRight="10px";y.style.paddingBottom="4px";y.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":
a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&E.appendChild(y);d&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");y=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?y=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?y=a.dropbox.extension:
-a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?y=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?y=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(y=a.trello.extension);var B=document.createElement("input");B.setAttribute("value",a.defaultFilename+y);B.style.marginRight="20px";B.style.marginLeft="10px";B.style.width=b?"220px":"430px";this.init=function(){d&&(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",
-!1,null))};d&&E.appendChild(B);var E=!1,G=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");v();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(n||u){var A=[],C=null,L=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<A.length;b++)A[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},E=!0,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="30px";H.appendChild(y);var D=mxUtils.button(mxResources.get("Templates",
-null,"Templates"),function(){Q.style.display="";K.style.left="160px";L(0);K.scrollTop=0;K.innerHTML="";G=0;C!=N&&(N=C,w(),C=null)});A.push(D);y.appendChild(D);var I=function(a){Q.style.display="none";K.style.left="30px";L(a?-1:1);null==C&&(C=N);K.scrollTop=0;K.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(K);G=0;var c=function(a,c){b.stop();N=a;c?K.innerHTML=c:0==a.length?K.innerHTML=
-mxResources.get("noDiagrams",null,"No Diagrams Found"):(K.innerHTML="",w())};a?u(M.value,c):n(c)};n&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){I()}),y.appendChild(D),A.push(D));if(u){D=document.createElement("span");D.style.marginLeft="10px";D.innerHTML=mxResources.get("search")+":";y.appendChild(D);var M=document.createElement("input");M.style.marginRight="10px";M.style.marginLeft="10px";M.style.width="220px";mxEvent.addListener(M,"keypress",function(a){13==a.keyCode&&
-I(!0)});y.appendChild(M);D=mxUtils.button(mxResources.get("search"),function(){I(!0)});D.className="geBtn";y.appendChild(D)}L(0)}var V=null,T=null,R=null,P=null,O=null,K=document.createElement("div");K.style.border="1px solid #d3d3d3";K.style.position="absolute";K.style.left="160px";K.style.right="34px";E=(d?72:40)+(E?30:0);K.style.top=E+"px";K.style.bottom="68px";K.style.margin="6px 0 0 -1px";K.style.padding="6px";K.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+
+a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?y=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?y=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(y=a.trello.extension);var D=document.createElement("input");D.setAttribute("value",a.defaultFilename+y);D.style.marginRight="20px";D.style.marginLeft="10px";D.style.width=b?"220px":"430px";this.init=function(){d&&(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?D.select():document.execCommand("selectAll",
+!1,null))};d&&E.appendChild(D);var E=!1,G=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");w();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(n||u){var A=[],B=null,L=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<A.length;b++)A[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},E=!0,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="30px";H.appendChild(y);var C=mxUtils.button(mxResources.get("Templates",
+null,"Templates"),function(){Q.style.display="";K.style.left="160px";L(0);K.scrollTop=0;K.innerHTML="";G=0;B!=N&&(N=B,v(),B=null)});A.push(C);y.appendChild(C);var I=function(a){Q.style.display="none";K.style.left="30px";L(a?-1:1);null==B&&(B=N);K.scrollTop=0;K.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(K);G=0;var c=function(a,c){b.stop();N=a;c?K.innerHTML=c:0==a.length?K.innerHTML=
+mxResources.get("noDiagrams",null,"No Diagrams Found"):(K.innerHTML="",v())};a?u(M.value,c):n(c)};n&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){I()}),y.appendChild(C),A.push(C));if(u){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxResources.get("search")+":";y.appendChild(C);var M=document.createElement("input");M.style.marginRight="10px";M.style.marginLeft="10px";M.style.width="220px";mxEvent.addListener(M,"keypress",function(a){13==a.keyCode&&
+I(!0)});y.appendChild(M);C=mxUtils.button(mxResources.get("search"),function(){I(!0)});C.className="geBtn";y.appendChild(C)}L(0)}var V=null,T=null,R=null,P=null,O=null,K=document.createElement("div");K.style.border="1px solid #d3d3d3";K.style.position="absolute";K.style.left="160px";K.style.right="34px";E=(d?72:40)+(E?30:0);K.style.top=E+"px";K.style.bottom="68px";K.style.margin="6px 0 0 -1px";K.style.padding="6px";K.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+
E+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,J={},aa=1;J.basic=[{title:"blankDiagram",select:!0}];var N=J.basic;if(!b){H.appendChild(Q);H.appendChild(K);var X=!1;mxUtils.get(k,function(a){if(!X){X=!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=J[b];null==c&&(aa++,c=[],J[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),
-title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}x()}})}mxEvent.addListener(B,"keypress",function(a){13==a.keyCode&&v()});k=document.createElement("div");k.style.marginTop=b?"4px":"16px";k.style.textAlign="right";k.style.position="absolute";k.style.left="40px";k.style.bottom="24px";k.style.right="40px";E=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});E.className="geBtn";!a.editor.cancelFirst||e&&null==f||k.appendChild(E);b||a.isOffline()||
-!d||null!=c||e||(y=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",k.appendChild(y));b||"1"==urlParams.embed||e||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(B.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?
+title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}x()}})}mxEvent.addListener(D,"keypress",function(a){13==a.keyCode&&w()});k=document.createElement("div");k.style.marginTop=b?"4px":"16px";k.style.textAlign="right";k.style.position="absolute";k.style.left="40px";k.style.bottom="24px";k.style.right="40px";E=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});E.className="geBtn";!a.editor.cancelFirst||e&&null==g||k.appendChild(E);b||a.isOffline()||
+!d||null!=c||e||(y=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",k.appendChild(y));b||"1"==urlParams.embed||e||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(D.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?
window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",k.appendChild(b));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),q.className="geBtn",k.appendChild(q));k.appendChild(F);a.editor.cancelFirst||null!=
-c||e&&null==f||k.appendChild(E);H.appendChild(k);this.container=H},CreateDialog=function(a,b,d,c,e,f,h,l,m,g,k,n,u,p,q){function w(c,d,g,k){function t(){mxEvent.addListener(e,"click",function(){var c=g;if(h){var d=x.value,k=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>k){var c=null!=c?c:y.value,t="";c==App.MODE_GOOGLE?t=a.drive.extension:c==App.MODE_GITHUB?t=a.gitHub.extension:c==App.MODE_TRELLO?t=a.trello.extension:c==App.MODE_DROPBOX?t=a.dropbox.extension:c==App.MODE_ONEDRIVE?t=a.oneDrive.extension:
-c==App.MODE_DEVICE&&(t=".xml");0<=k&&(d=d.substring(0,k));x.value=d+t}}v(g)})}var e=document.createElement("a");e.style.overflow="hidden";var p=document.createElement("img");p.src=c;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.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(p);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var f=document.createElement("div");e.appendChild(f);mxUtils.write(f,d);if(null!=k&&null==a[k]){p.style.visibility="hidden";mxUtils.setOpacity(f,10);var q=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});q.spin(e);var u=window.setTimeout(function(){null==a[k]&&(q.stop(),e.style.display=
-"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(u),mxUtils.setOpacity(f,100),p.style.visibility="",q.stop(),t())}))}else t();H.appendChild(e);++E==n&&(mxUtils.br(H),E=0)}function v(b){var c=x.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}h=null!=h?h:!0;l=null!=l?l:!0;n=null!=n?n:4;var z=document.createElement("div");null==c&&a.addLanguageMenu(z);var t=document.createElement("h2");mxUtils.write(t,e||mxResources.get("create"));t.style.marginTop=
+c||e&&null==g||k.appendChild(E);H.appendChild(k);this.container=H},CreateDialog=function(a,b,d,c,e,g,h,l,m,f,k,n,u,p,q){function v(c,d,f,k){function t(){mxEvent.addListener(e,"click",function(){var c=f;if(h){var d=x.value,k=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>k){var c=null!=c?c:y.value,t="";c==App.MODE_GOOGLE?t=a.drive.extension:c==App.MODE_GITHUB?t=a.gitHub.extension:c==App.MODE_TRELLO?t=a.trello.extension:c==App.MODE_DROPBOX?t=a.dropbox.extension:c==App.MODE_ONEDRIVE?t=a.oneDrive.extension:
+c==App.MODE_DEVICE&&(t=".xml");0<=k&&(d=d.substring(0,k));x.value=d+t}}w(f)})}var e=document.createElement("a");e.style.overflow="hidden";var p=document.createElement("img");p.src=c;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.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(p);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var g=document.createElement("div");e.appendChild(g);mxUtils.write(g,d);if(null!=k&&null==a[k]){p.style.visibility="hidden";mxUtils.setOpacity(g,10);var q=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});q.spin(e);var u=window.setTimeout(function(){null==a[k]&&(q.stop(),e.style.display=
+"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(u),mxUtils.setOpacity(g,100),p.style.visibility="",q.stop(),t())}))}else t();H.appendChild(e);++E==n&&(mxUtils.br(H),E=0)}function w(b){var c=x.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}h=null!=h?h:!0;l=null!=l?l:!0;n=null!=n?n:4;var z=document.createElement("div");null==c&&a.addLanguageMenu(z);var t=document.createElement("h2");mxUtils.write(t,e||mxResources.get("create"));t.style.marginTop=
"0px";t.style.marginBottom="24px";z.appendChild(t);mxUtils.write(z,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",b);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};z.appendChild(x);null!=u&&null!=p&&"image/"==p.substring(0,6)&&(x.style.width="160px",e=null,"image/svg+xml"==
p&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(u),u=e.getElementsByTagName("svg")[0],p=parseInt(u.getAttribute("width")),q=parseInt(u.getAttribute("height")),u.setAttribute("viewBox","0 0 "+p+" "+q),u.setAttribute("width","120px"),u.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+p+(q?";base64,":";utf8,")+u)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",
-mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),z.appendChild(e),m&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){v("_blank")})));mxUtils.br(z);var H=document.createElement("div");H.style.textAlign="center";var E=0;H.style.marginTop="6px";z.appendChild(H);var y=document.createElement("select");y.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),
-mxUtils.write(e,mxResources.get("googleDrive")),y.appendChild(e),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),y.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
-"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),y.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),y.appendChild(e),w(IMAGE_PATH+"/github-logo.svg",
-mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),y.appendChild(e),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),
-y.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected","selected"),k&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),y.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");
-l.style.marginTop="26px";l.style.textAlign="center";null!=g&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==c&&(u=mxUtils.button(mxResources.get("decideLater"),function(){v(null)}),u.className="geBtn",l.appendChild(u));m&&(m=
-mxUtils.button(mxResources.get("openInNewWindow"),function(){v("_blank")}),m.className="geBtn",l.appendChild(m));mxClient.IS_IOS||(f=mxUtils.button(f||mxResources.get("create"),function(){v(k?"download":App.MODE_DEVICE)}),f.className="geBtn gePrimaryBtn",l.appendChild(f));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(x,"keypress",function(b){13==b.keyCode?v(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});z.appendChild(l);this.container=z},PopupDialog=
-function(a,b,d,c,e){e=null!=e?e:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var h=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=c&&c()});h.className="geBtn";h.style.marginBottom="8px";h.style.width="280px";f.appendChild(h);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});l.className=
-"geBtn gePrimaryBtn";l.style.width=h.style.width;f.appendChild(l);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,b,d,c,e,f){f=null!=f?f:!0;var h=a.editor.graph,l=document.createElement("div");mxUtils.write(l,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||
+mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),z.appendChild(e),m&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){w("_blank")})));mxUtils.br(z);var H=document.createElement("div");H.style.textAlign="center";var E=0;H.style.marginTop="6px";z.appendChild(H);var y=document.createElement("select");y.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),
+mxUtils.write(e,mxResources.get("googleDrive")),y.appendChild(e),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),y.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
+"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),y.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),y.appendChild(e),v(IMAGE_PATH+"/github-logo.svg",
+mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),y.appendChild(e),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),
+y.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected","selected"),k&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),y.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");
+l.style.marginTop="26px";l.style.textAlign="center";null!=f&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==c&&(u=mxUtils.button(mxResources.get("decideLater"),function(){w(null)}),u.className="geBtn",l.appendChild(u));m&&(m=
+mxUtils.button(mxResources.get("openInNewWindow"),function(){w("_blank")}),m.className="geBtn",l.appendChild(m));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){w(k?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",l.appendChild(g));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(x,"keypress",function(b){13==b.keyCode?w(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});z.appendChild(l);this.container=z},PopupDialog=
+function(a,b,d,c,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 h=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=c&&c()});h.className="geBtn";h.style.marginBottom="8px";h.style.width="280px";g.appendChild(h);mxUtils.br(g);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});l.className=
+"geBtn gePrimaryBtn";l.style.width=h.style.width;g.appendChild(l);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,b,d,c,e,g){g=null!=g?g:!0;var h=a.editor.graph,l=document.createElement("div");mxUtils.write(l,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||
(b.style.paddingRight="20px");var m=document.createElement("input");m.setAttribute("value",d);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition=
"100% 50%";m.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){m.value="";m.focus()});b.appendChild(m);b.appendChild(d);l.appendChild(b);
-var g=function(b,d,g,k){var e="data:"==b.substring(0,5);!a.isOffline()||e&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(t){a.spinner.stop();a.hideDialog();var e=!1===k?1:null!=d&&null!=g?Math.max(d/t.width,g/t.height):Math.min(1,Math.min(520/t.width,520/t.height));f&&(b=a.convertDataUri(b));c(b,Math.round(Number(t.width)*e),Math.round(Number(t.height)*e))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,g=null==g?100:g,a.hideDialog(),c(b,d,g))},k=function(b,d){if(null!=b){var k=e?null:h.getModel().getGeometry(h.getSelectionCell());null!=k?g(b,k.width,k.height,d):g(b,null,null,d)}else a.hideDialog(),c(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=l.parentNode,c=null;mxEvent.addListener(b,"dragleave",
-function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,g,e,n,p){k(a,
+var f=function(b,d,f,k){var e="data:"==b.substring(0,5);!a.isOffline()||e&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(t){a.spinner.stop();a.hideDialog();var e=!1===k?1:null!=d&&null!=f?Math.max(d/t.width,f/t.height):Math.min(1,Math.min(520/t.width,520/t.height));g&&(b=a.convertDataUri(b));c(b,Math.round(Number(t.width)*e),Math.round(Number(t.height)*e))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,f=null==f?100:f,a.hideDialog(),c(b,d,f))},k=function(b,d){if(null!=b){var k=e?null:h.getModel().getGeometry(h.getSelectionCell());null!=k?f(b,k.width,k.height,d):f(b,null,null,d)}else a.hideDialog(),c(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=l.parentNode,c=null;mxEvent.addListener(b,"dragleave",
+function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,f,e,n,p){k(a,
p)},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)&&k(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),
function(){a.spinner.stop();a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(m.value=a.url));m.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,
-0,0,a.maxImageSize,function(a,b,c,d,g,e){k(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var u=mxUtils.button(mxResources.get("open"),function(){n.click()});u.className="geBtn";d.appendChild(u)}}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,11)&&"data:image/svg"!=m.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,m.value,function(a){m.value=
+0,0,a.maxImageSize,function(a,b,c,d,f,e){k(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var u=mxUtils.button(mxResources.get("open"),function(){n.click()});u.className="geBtn";d.appendChild(u)}}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,11)&&"data:image/svg"!=m.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,m.value,function(a){m.value=
a});a.showDialog(b.container,200,180,!0,!0);b.init()}),u.className="geBtn",d.appendChild(u));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(u=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
u.className="geBtn",d.appendChild(u),null!=a.drive&&"1"==urlParams.photos&&(u=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),u.className="geBtn",d.appendChild(u)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&k(m.value)});u=mxUtils.button(mxResources.get("apply"),function(){k(m.value)});u.className="geBtn gePrimaryBtn";d.appendChild(u);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition=
-"center 65%",l.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),l.appendChild(b));l.appendChild(d);this.container=l},LinkDialog=function(a,b,d,c,e){function f(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);v.appendChild(c)}var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var m=document.createElement("input");
-m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="400px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";
-g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){m.value="";m.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";
-n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(m.setAttribute("value",b),k.setAttribute("checked","checked"),k.defaultChecked=!0);m.style.width="380px";l.appendChild(k);l.appendChild(m);l.appendChild(g);mxUtils.br(l);l.appendChild(n);e=!1;for(g=0;g<a.pages.length;g++){var p=
-document.createElement("option");mxUtils.write(p,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));p.setAttribute("value","data:page/id,"+a.pages[g].getId());b==p.getAttribute("value")&&(p.setAttribute("selected","selected"),e=!0);u.appendChild(p)}if(!e&&n.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");u.appendChild(q);mxEvent.addListener(u,
-"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}l.appendChild(u)}else m.setAttribute("value",b),l.appendChild(m),l.appendChild(g);h.appendChild(l);var w=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==u.value?u.value:b:m.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?u.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+"center 65%",l.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),l.appendChild(b));l.appendChild(d);this.container=l},LinkDialog=function(a,b,d,c,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);w.appendChild(c)}var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var m=document.createElement("input");
+m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="400px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";
+f.style.display=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){m.value="";m.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";
+n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(m.setAttribute("value",b),k.setAttribute("checked","checked"),k.defaultChecked=!0);m.style.width="380px";l.appendChild(k);l.appendChild(m);l.appendChild(f);mxUtils.br(l);l.appendChild(n);e=!1;for(f=0;f<a.pages.length;f++){var p=
+document.createElement("option");mxUtils.write(p,a.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+a.pages[f].getId());b==p.getAttribute("value")&&(p.setAttribute("selected","selected"),e=!0);u.appendChild(p)}if(!e&&n.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");u.appendChild(q);mxEvent.addListener(u,
+"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}l.appendChild(u)}else m.setAttribute("value",b),l.appendChild(m),l.appendChild(f);h.appendChild(l);var v=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==u.value?u.value:b:m.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){n.checked?u.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
m.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){k.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var b=h.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
-mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var v=document.createElement("div");
-v.style.marginTop="20px";v.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&v.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
-"https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&f(IMAGE_PATH+"/google-drive-logo.svg",
-mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
-b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(d).addView(g).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&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl;
-m.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(n.checked?u.value:m.value,LinkDialog.selectedDocs))});v.appendChild(w);a.editor.cancelFirst||v.appendChild(d);h.appendChild(v);this.container=
+mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var w=document.createElement("div");
+w.style.marginTop="20px";w.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&w.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
+"https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&g(IMAGE_PATH+"/google-drive-logo.svg",
+mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
+b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(d).addView(f).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&g(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=a.oneDrive&&g(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl;
+m.focus()})});null!=a.gitHub&&g(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(n.checked?u.value:m.value,LinkDialog.selectedDocs))});w.appendChild(v);a.editor.cancelFirst||w.appendChild(d);h.appendChild(w);this.container=
h},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+
"/logo-flat.png"));b.appendChild(d);mxUtils.br(b);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),
function(){var b=(h.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b),
-function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\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(c,"change",
-function(){0<c.value.length&&0<f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(c,"keyup",function(){0<c.value.length&&f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(c);this.init=function(){c.focus()};var h=document.createElement("input");h.setAttribute("type","checkbox");h.setAttribute("checked","checked");h.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(h);
+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(c,"change",
+function(){0<c.value.length&&0<g.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(c,"keyup",function(){0<c.value.length&&g.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(c);this.init=function(){c.focus()};var h=document.createElement("input");h.setAttribute("type","checkbox");h.setAttribute("checked","checked");h.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(h);
var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(l);mxEvent.addListener(l,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));b.appendChild(d);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("commentsNotes"));
b.appendChild(m);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(d.appendChild(l),d.appendChild(e)):(d.appendChild(e),d.appendChild(l));b.appendChild(d);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));c.appendChild(e);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";c.appendChild(f);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.left="199px";h.style.width="470px";h.style.height=
-"376px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);c.appendChild(h);var l=new Graph(h);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var m=0,g=null,k=0,n=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==a?k+1:n.apply(this,arguments)};l.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var u=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),p=a.getCurrentFile(),q=null,w=null,v=null,z=null,t=mxUtils.button("",function(){null!=v&&l.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));
-t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var x=mxUtils.button("",function(){null!=v&&l.zoomOut()});x.className="geSprite geSprite-zoomout";x.setAttribute("title",mxResources.get("zoomOut"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var H=mxUtils.button("",function(){null!=v&&(l.maxFitScale=8,l.fit(8),l.center())});H.className=
-"geSprite geSprite-fit";H.setAttribute("title",mxResources.get("fit"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var E=mxUtils.button("",function(){null!=v&&(l.zoomActual(),l.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 y=
-document.createElement("div");y.style.position="absolute";y.style.textAlign="right";y.style.color="gray";y.style.marginTop="10px";y.style.backgroundColor="transparent";y.style.top="440px";y.style.right="32px";y.style.maxWidth="380px";y.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=v){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(v.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
-(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=v&&null!=z&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(z):a.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(b){a.spinner.stop();
+var RevisionDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));c.appendChild(e);var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";c.appendChild(g);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.left="199px";h.style.width="470px";h.style.height=
+"376px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);c.appendChild(h);var l=new Graph(h);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var m=0,f=null,k=0,n=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=f&&null!=f[k]?f[k].getAttribute("name"):"pagenumber"==a?k+1:n.apply(this,arguments)};l.getLinkForCell=function(){return null};Editor.MathJaxRender&&
+l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var u=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),p=a.getCurrentFile(),q=null,v=null,w=null,z=null,t=mxUtils.button("",function(){null!=w&&l.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));
+t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var x=mxUtils.button("",function(){null!=w&&l.zoomOut()});x.className="geSprite geSprite-zoomout";x.setAttribute("title",mxResources.get("zoomOut"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var H=mxUtils.button("",function(){null!=w&&(l.maxFitScale=8,l.fit(8),l.center())});H.className=
+"geSprite geSprite-fit";H.setAttribute("title",mxResources.get("fit"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var E=mxUtils.button("",function(){null!=w&&(l.zoomActual(),l.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 y=
+document.createElement("div");y.style.position="absolute";y.style.textAlign="right";y.style.color="gray";y.style.marginTop="10px";y.style.backgroundColor="transparent";y.style.top="440px";y.style.right="32px";y.style.maxWidth="380px";y.style.cursor="default";var D=mxUtils.button(mxResources.get("download"),function(){if(null!=w){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(w.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
+(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});D.className="geBtn";D.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=w&&null!=z&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(z):a.spinner.spin(document.body,mxResources.get("restoring"))&&p.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)})})});G.className="geBtn";G.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 A=null;mxEvent.addListener(F,"change",function(a){null!=
-A&&(A(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=v&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(v.documentElement)),window.openWindow(a.getUrl()))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=d&&(C.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
-"disabled");null!=d&&(L.style.display="none",G.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var I=null;if(null!=b&&0<b.length){h.style.cursor="move";var M=document.createElement("table");M.style.border=
-"1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var R=b.length-1;0<=R;R--){var P=function(c){var d=new Date(c.modifiedDate),e=null;if(0<=d.getTime()){var n=function(b){u.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){var f=function(b){null!=b&&(b=
-q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},q=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};F.style.display="none";F.innerHTML="";v=c;z=b;g=parseSelectFunction=null;k=0;if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");g=[];for(b=0;b<c.length;b++)g.push(c[b]);
-k=Math.min(m,g.length-1);0<g.length&&f(g[k]);if(1<g.length)for(F.removeAttribute("disabled"),F.style.display="",b=0;b<g.length;b++)c=document.createElement("option"),mxUtils.write(c,g[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==k&&c.setAttribute("selected","selected"),F.appendChild(c);A=function(){k=m=parseInt(F.value);f(g[m])}}else q(n);y.innerHTML="";mxUtils.write(y,d.toLocaleDateString()+" "+d.toLocaleTimeString());y.setAttribute("title",e.getAttribute("title"));
-t.removeAttribute("disabled");x.removeAttribute("disabled");H.removeAttribute("disabled");E.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),B.removeAttribute("disabled"),L.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(E,60)}else F.style.display="none",F.innerHTML="",y.innerHTML="",mxUtils.write(y,mxResources.get("errorLoadingFile"))},
-e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var f=document.createElement("td");f.style.padding="6px";f.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(f,mxResources.get("current")):d.toDateString()===T?mxUtils.write(f,d.toLocaleTimeString()):mxUtils.write(f,d.toLocaleDateString()+" "+d.toLocaleTimeString());e.appendChild(f);e.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
-(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){w!=c&&(u.stop(),null!=q&&(q.style.backgroundColor=""),w=c,q=e,q.style.backgroundColor="#ebf2f9",z=v=null,y.removeAttribute("title"),y.innerHTML=mxResources.get("loading")+"...",h.style.backgroundColor="#ffffff",l.getModel().clear(),G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),E.setAttribute("disabled",
-"disabled"),H.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(E,20),u.spin(h),c.getXml(function(a){w==c&&n(a)},function(a){u.stop();F.style.display="none";F.innerHTML="";y.innerHTML="";mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){L.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(e)}return e}(b[R]);null!=P&&R==b.length-1&&(I=P)}M.appendChild(V);f.appendChild(M)}else null==p||null==a.drive&&p.constructor==window.DriveFile||null==a.dropbox&&p.constructor==window.DropboxFile?(h.style.display="none",D.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(h.style.display="none",D.style.display="none",mxUtils.write(f,
-mxResources.get("noRevisions")));this.init=function(){null!=I&&I.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";D.appendChild(F);D.appendChild(t);D.appendChild(x);D.appendChild(E);D.appendChild(H);a.editor.cancelFirst?(e.appendChild(f),e.appendChild(B),e.appendChild(C),e.appendChild(G),e.appendChild(L)):(e.appendChild(B),e.appendChild(C),e.appendChild(G),e.appendChild(L),e.appendChild(f));c.appendChild(e);c.appendChild(D);c.appendChild(y);this.container=
-c},DraftDialog=function(a,b,d,c,e,f,h,l){var m=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,b);m.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.marginTop="10px";k.style.width="640px";k.style.top="46px";k.style.bottom="74px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);m.appendChild(k);var n=new Graph(k);
-n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(d);var u=a.editor.extractGraphModel(b.documentElement,!0),p=0,q=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[p]?q[p].getAttribute("name"):"pagenumber"==a?p+1:w.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className=
-"geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});g.className="geSprite geSprite-fit";g.setAttribute("title",
-mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var v=mxUtils.button("",function(){n.zoomActual();n.center()});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);e=mxUtils.button(h||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";c=mxUtils.button(f||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.width="640px";f.style.textAlign="right";h=document.createElement("div");h.className="geToolbarContainer";h.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+A&&(A(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=w&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(w.documentElement)),window.openWindow(a.getUrl()))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=d&&(B.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
+"disabled");null!=d&&(L.style.display="none",G.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var C=document.createElement("div");C.className="geToolbarContainer";C.style.backgroundColor="transparent";C.style.padding="2px";C.style.border="none";C.style.left="199px";C.style.top="442px";var I=null;if(null!=b&&0<b.length){h.style.cursor="move";var M=document.createElement("table");M.style.border=
+"1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var R=b.length-1;0<=R;R--){var P=function(c){var d=new Date(c.modifiedDate),e=null;if(0<=d.getTime()){var n=function(b){u.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){var g=function(b){null!=b&&(b=
+q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},q=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};F.style.display="none";F.innerHTML="";w=c;z=b;f=parseSelectFunction=null;k=0;if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");f=[];for(b=0;b<c.length;b++)f.push(c[b]);
+k=Math.min(m,f.length-1);0<f.length&&g(f[k]);if(1<f.length)for(F.removeAttribute("disabled"),F.style.display="",b=0;b<f.length;b++)c=document.createElement("option"),mxUtils.write(c,f[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==k&&c.setAttribute("selected","selected"),F.appendChild(c);A=function(){k=m=parseInt(F.value);g(f[m])}}else q(n);y.innerHTML="";mxUtils.write(y,d.toLocaleDateString()+" "+d.toLocaleTimeString());y.setAttribute("title",e.getAttribute("title"));
+t.removeAttribute("disabled");x.removeAttribute("disabled");H.removeAttribute("disabled");E.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),D.removeAttribute("disabled"),L.removeAttribute("disabled"),B.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(E,60)}else F.style.display="none",F.innerHTML="",y.innerHTML="",mxUtils.write(y,mxResources.get("errorLoadingFile"))},
+e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===T?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());e.appendChild(g);e.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){v!=c&&(u.stop(),null!=q&&(q.style.backgroundColor=""),v=c,q=e,q.style.backgroundColor="#ebf2f9",z=w=null,y.removeAttribute("title"),y.innerHTML=mxResources.get("loading")+"...",h.style.backgroundColor="#ffffff",l.getModel().clear(),G.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),E.setAttribute("disabled",
+"disabled"),H.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(E,20),u.spin(h),c.getXml(function(a){v==c&&n(a)},function(a){u.stop();F.style.display="none";F.innerHTML="";y.innerHTML="";mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){L.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(e)}return e}(b[R]);null!=P&&R==b.length-1&&(I=P)}M.appendChild(V);g.appendChild(M)}else null==p||null==a.drive&&p.constructor==window.DriveFile||null==a.dropbox&&p.constructor==window.DropboxFile?(h.style.display="none",C.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(h.style.display="none",C.style.display="none",mxUtils.write(g,
+mxResources.get("noRevisions")));this.init=function(){null!=I&&I.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";C.appendChild(F);C.appendChild(t);C.appendChild(x);C.appendChild(E);C.appendChild(H);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(D),e.appendChild(B),e.appendChild(G),e.appendChild(L)):(e.appendChild(D),e.appendChild(B),e.appendChild(G),e.appendChild(L),e.appendChild(g));c.appendChild(e);c.appendChild(C);c.appendChild(y);this.container=
+c},DraftDialog=function(a,b,d,c,e,g,h,l){var m=document.createElement("div"),f=document.createElement("div");f.style.marginTop="0px";f.style.whiteSpace="nowrap";f.style.overflow="auto";mxUtils.write(f,b);m.appendChild(f);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.marginTop="10px";k.style.width="640px";k.style.top="46px";k.style.bottom="74px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);m.appendChild(k);var n=new Graph(k);
+n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(d);var u=a.editor.extractGraphModel(b.documentElement,!0),p=0,q=null,v=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[p]?q[p].getAttribute("name"):"pagenumber"==a?p+1:v.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className=
+"geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);f=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",
+mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);var w=mxUtils.button("",function(){n.zoomActual();n.center()});w.className="geSprite geSprite-actualsize";w.setAttribute("title",mxResources.get("actualSize"));w.style.outline="none";w.style.border="none";w.style.margin="2px";mxUtils.setOpacity(w,60);e=mxUtils.button(h||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";c=mxUtils.button(g||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.width="640px";g.style.textAlign="right";h=document.createElement("div");h.className="geToolbarContainer";h.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(z,"change",function(a){p=parseInt(z.value);c(q[p]);mxEvent.consume(a)});if("mxfile"==u.nodeName){var d=u.getElementsByTagName("diagram");
-q=[];for(var g=0;g<d.length;g++)q.push(d[g]);0<q.length&&c(q[p]);if(1<q.length)for(z.style.display="",g=0;g<q.length;g++)d=document.createElement("option"),mxUtils.write(d,q[g].getAttribute("name")||mxResources.get("pageWithNumber",[g+1])),d.setAttribute("value",g),g==p&&d.setAttribute("selected","selected"),z.appendChild(d)}else b(u)};h.appendChild(z);h.appendChild(b);h.appendChild(d);h.appendChild(v);h.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
-"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(f.appendChild(b),null!=l&&f.appendChild(l),f.appendChild(e),f.appendChild(c)):(f.appendChild(c),f.appendChild(e),null!=l&&f.appendChild(l),f.appendChild(b));m.appendChild(f);m.appendChild(h);this.container=m},FindWindow=function(a,b,d,c,e){function f(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var g=
-mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,c.length)===c||null!=a&&a.test(g))return!0}}return!1}function h(){var a=m.model.getDescendants(m.model.getRoot()),b=u.value.toLowerCase(),c=p.checked?new RegExp(b):null,d=null;g!=b&&(g=b,k=null);var e=null==k;if(0<b.length)for(var n=0;n<a.length;n++){var h=m.view.getState(a[n]);if(null!=h&&null!=h.cell.value&&(e||null==d)&&(m.model.isVertex(h.cell)||m.model.isEdge(h.cell))&&(m.isHtmlLabel(h.cell)?
-(q.innerHTML=m.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([q])):label=m.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||f(c,h.cell,b))||null!=c&&(c.test(label)||f(c,h.cell,b))))if(e){d=h;break}else null==d&&(d=h);e=e||h==k}null!=d?(k=d,m.scrollCellToVisible(k.cell),m.isEnabled()?m.setSelectionCell(k.cell):m.highlightCell(k.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}
-var l=a.actions.get("find"),m=a.editor.graph,g=null,k=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";n.appendChild(u);mxUtils.br(n);var p=document.createElement("input");
-p.setAttribute("type","checkbox");p.style.marginRight="4px";n.appendChild(p);mxUtils.write(n,mxResources.get("regularExpression"));var q=document.createElement("div");mxUtils.br(n);var w=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";g=k=null;u.focus()});w.setAttribute("title",mxResources.get("reset"));w.style.marginTop="6px";w.style.marginRight="4px";w.className="geBtn";n.appendChild(w);w=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
-h()?"":"#ffcfcf"}catch(v){a.handleError(v)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.className="geBtn gePrimaryBtn";n.appendChild(w);mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(g!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=h()?"":"#ffcfcf"}catch(z){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&
+q=[];for(var f=0;f<d.length;f++)q.push(d[f]);0<q.length&&c(q[p]);if(1<q.length)for(z.style.display="",f=0;f<q.length;f++)d=document.createElement("option"),mxUtils.write(d,q[f].getAttribute("name")||mxResources.get("pageWithNumber",[f+1])),d.setAttribute("value",f),f==p&&d.setAttribute("selected","selected"),z.appendChild(d)}else b(u)};h.appendChild(z);h.appendChild(b);h.appendChild(d);h.appendChild(w);h.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
+"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(g.appendChild(b),null!=l&&g.appendChild(l),g.appendChild(e),g.appendChild(c)):(g.appendChild(c),g.appendChild(e),null!=l&&g.appendChild(l),g.appendChild(b));m.appendChild(g);m.appendChild(h);this.container=m},FindWindow=function(a,b,d,c,e){function g(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var f=
+mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&f.substring(0,c.length)===c||null!=a&&a.test(f))return!0}}return!1}function h(){var a=m.model.getDescendants(m.model.getRoot()),b=u.value.toLowerCase(),c=p.checked?new RegExp(b):null,d=null;f!=b&&(f=b,k=null);var e=null==k;if(0<b.length)for(var n=0;n<a.length;n++){var h=m.view.getState(a[n]);if(null!=h&&null!=h.cell.value&&(e||null==d)&&(m.model.isVertex(h.cell)||m.model.isEdge(h.cell))&&(m.isHtmlLabel(h.cell)?
+(q.innerHTML=m.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([q])):label=m.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||g(c,h.cell,b))||null!=c&&(c.test(label)||g(c,h.cell,b))))if(e){d=h;break}else null==d&&(d=h);e=e||h==k}null!=d?(k=d,m.scrollCellToVisible(k.cell),m.isEnabled()?m.setSelectionCell(k.cell):m.highlightCell(k.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}
+var l=a.actions.get("find"),m=a.editor.graph,f=null,k=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";n.appendChild(u);mxUtils.br(n);var p=document.createElement("input");
+p.setAttribute("type","checkbox");p.style.marginRight="4px";n.appendChild(p);mxUtils.write(n,mxResources.get("regularExpression"));var q=document.createElement("div");mxUtils.br(n);var v=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";f=k=null;u.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";n.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
+h()?"":"#ffcfcf"}catch(w){a.handleError(w)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";n.appendChild(v);mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(f!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=h()?"":"#ffcfcf"}catch(z){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&
a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},
-TagsWindow=function(a,b,d,c,e){function f(a){a=null!=a?a:l.model.getDescendants(l.model.getRoot());for(var b=k.value.split(" "),c=[],d=0;d<a.length;d++)if(l.model.isVertex(a[d])||l.model.isEdge(a[d])){var g=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(m)||""):"",e=!0;if(0<g.length)for(var g=g.toLowerCase().split(" "),n=0;n<b.length&&e;n++)var f=mxUtils.trim(b[n]).toLowerCase(),e=e&&(0==f.length||0<=mxUtils.indexOf(g,f));else e=0==mxUtils.trim(k.value).length;
-e&&c.push(a[d])}return c}function h(a,b){l.model.beginUpdate();try{for(var c=0;c<a.length;c++)l.model.setVisible(a[c],b)}finally{l.model.endUpdate()}}var l=a.editor.graph,m="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("allTags"));k.setAttribute("type","text");k.style.marginTop="4px";k.style.width="260px";k.style.fontSize="12px";
-k.style.borderRadius="4px";k.style.padding="6px";g.appendChild(k);if(!a.isOffline()||mxClient.IS_CHROMEAPP){k.style.width="240px";var n=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");n.firstChild.style.marginBottom="6px";n.style.marginLeft="6px";g.appendChild(n)}mxEvent.addListener(k,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,
-300,80,!0,!0);b.init()});k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);n=mxUtils.button(mxResources.get("hide"),function(){h(f(),!1)});n.setAttribute("title",mxResources.get("hide"));n.style.marginTop="8px";n.style.marginRight="4px";n.className="geBtn";g.appendChild(n);n=mxUtils.button(mxResources.get("show"),function(){var a=f();h(a,!0);l.isEnabled()&&l.setSelectionCells(a)});n.setAttribute("title",mxResources.get("show"));n.style.marginTop="8px";n.style.marginRight=
-"4px";n.className="geBtn";g.appendChild(n);var u=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){u.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.className="geBtn gePrimaryBtn";g.appendChild(n);mxEvent.addListener(k,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||u.funct()});this.window=new mxWindow(mxResources.get("tags"),g,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
-this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},AuthDialog=function(a,b,d,c){var e=document.createElement("div");e.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,
+TagsWindow=function(a,b,d,c,e){function g(a){a=null!=a?a:l.model.getDescendants(l.model.getRoot());for(var b=k.value.split(" "),c=[],d=0;d<a.length;d++)if(l.model.isVertex(a[d])||l.model.isEdge(a[d])){var f=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(m)||""):"",e=!0;if(0<f.length)for(var f=f.toLowerCase().split(" "),n=0;n<b.length&&e;n++)var g=mxUtils.trim(b[n]).toLowerCase(),e=e&&(0==g.length||0<=mxUtils.indexOf(f,g));else e=0==mxUtils.trim(k.value).length;
+e&&c.push(a[d])}return c}function h(a,b){l.model.beginUpdate();try{for(var c=0;c<a.length;c++)l.model.setVisible(a[c],b)}finally{l.model.endUpdate()}}var l=a.editor.graph,m="tags",f=document.createElement("div");f.style.userSelect="none";f.style.overflow="hidden";f.style.padding="10px";f.style.height="100%";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("allTags"));k.setAttribute("type","text");k.style.marginTop="4px";k.style.width="260px";k.style.fontSize="12px";
+k.style.borderRadius="4px";k.style.padding="6px";f.appendChild(k);if(!a.isOffline()||mxClient.IS_CHROMEAPP){k.style.width="240px";var n=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");n.firstChild.style.marginBottom="6px";n.style.marginLeft="6px";f.appendChild(n)}mxEvent.addListener(k,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,
+300,80,!0,!0);b.init()});k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(f);n=mxUtils.button(mxResources.get("hide"),function(){h(g(),!1)});n.setAttribute("title",mxResources.get("hide"));n.style.marginTop="8px";n.style.marginRight="4px";n.className="geBtn";f.appendChild(n);n=mxUtils.button(mxResources.get("show"),function(){var a=g();h(a,!0);l.isEnabled()&&l.setSelectionCells(a)});n.setAttribute("title",mxResources.get("show"));n.style.marginTop="8px";n.style.marginRight=
+"4px";n.className="geBtn";f.appendChild(n);var u=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){u.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.className="geBtn gePrimaryBtn";f.appendChild(n);mxEvent.addListener(k,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||u.funct()});this.window=new mxWindow(mxResources.get("tags"),f,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
+this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},AuthDialog=function(a,b,d,c){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 h="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";b==a.drive?(h=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(h=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(h=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):b==a.gitHub?(h=mxResources.get("github"),l.src=IMAGE_PATH+
-"/github-logo-white.svg"):b==a.trello&&(h=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[h]));var m=document.createElement("input");m.setAttribute("type","checkbox");h=mxUtils.button(mxResources.get("authorize"),function(){c(m.checked)});h.insertBefore(l,h.firstChild);h.style.marginTop="6px";h.className="geBigButton";e.appendChild(f);e.appendChild(a);e.appendChild(h);d&&(d=document.createElement("p"),
-d.style.marginTop="20px",d.appendChild(m),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),d.appendChild(f),e.appendChild(d),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,d){d=null!=d?d:a.sidebar.entries;var c=document.createElement("div");if(b){b=document.createElement("div");b.className="geDialogTitle";mxUtils.write(b,mxResources.get("shapes"));
-b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.lineHeight="40px";b.style.height="40px";b.style.right="0px";mxClient.IS_QUIRKS&&(b.style.width="718px");var e=document.createElement("div"),f=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.style.marginTop="1px");f.style.position="absolute";f.style.left="202px";f.style.right=
-"0px";f.style.top="40px";f.style.bottom="60px";f.style.overflow="auto";f.style.borderLeft="1px solid rgb(211, 211, 211)";f.style.textAlign="center";mxClient.IS_QUIRKS&&(f.style.width=parseInt(b.style.width)-202+"px",f.style.height=e.style.height,f.style.marginTop=e.style.marginTop);var h=null,l=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";for(var g=0;g<d.length;g++)(function(b){var c=m.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
+"/github-logo-white.svg"):b==a.trello&&(h=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[h]));var m=document.createElement("input");m.setAttribute("type","checkbox");h=mxUtils.button(mxResources.get("authorize"),function(){c(m.checked)});h.insertBefore(l,h.firstChild);h.style.marginTop="6px";h.className="geBigButton";e.appendChild(g);e.appendChild(a);e.appendChild(h);d&&(d=document.createElement("p"),
+d.style.marginTop="20px",d.appendChild(m),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberMe")),d.appendChild(g),e.appendChild(d),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,d){d=null!=d?d:a.sidebar.entries;var c=document.createElement("div");if(b){b=document.createElement("div");b.className="geDialogTitle";mxUtils.write(b,mxResources.get("shapes"));
+b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.lineHeight="40px";b.style.height="40px";b.style.right="0px";mxClient.IS_QUIRKS&&(b.style.width="718px");var e=document.createElement("div"),g=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.style.marginTop="1px");g.style.position="absolute";g.style.left="202px";g.style.right=
+"0px";g.style.top="40px";g.style.bottom="60px";g.style.overflow="auto";g.style.borderLeft="1px solid rgb(211, 211, 211)";g.style.textAlign="center";mxClient.IS_QUIRKS&&(g.style.width=parseInt(b.style.width)-202+"px",g.style.height=e.style.height,g.style.marginTop=e.style.marginTop);var h=null,l=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";for(var f=0;f<d.length;f++)(function(b){var c=m.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);e.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=m.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.checked=a.sidebar.isEntryVisible(b.id);k.defaultChecked=k.checked;c.appendChild(k);mxUtils.write(c," "+b.title);e.appendChild(c);var n=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
-b.imageCallback?b.imageCallback(f):null!=b.image?f.innerHTML='<img border="0" src="'+b.image+'"/>':(f.innerHTML="<br>",mxUtils.write(f,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});l.push(function(){return k.checked?b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);
-c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=
+b.imageCallback?b.imageCallback(g):null!=b.image?g.innerHTML='<img border="0" src="'+b.image+'"/>':(g.innerHTML="<br>",mxUtils.write(g,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});l.push(function(){return k.checked?b.id:null});0==f&&0==d&&n()})(b.entries[d])})(d[f]);
+c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(g);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=
document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),
-function(){a.hideDialog();for(var b=[],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),k.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var u=document.createElement("table"),p=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var q=document.createElement("tr");u.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),w=document.createElement("td"),v=mxUtils.bind(this,function(b,
-c,d){var g=document.createElement("input");g.type="checkbox";u.appendChild(g);g.checked=a.sidebar.isEntryVisible(d);var k=document.createElement("span");mxUtils.write(k,c);c=document.createElement("div");c.style.display="block";c.appendChild(g);c.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return g.checked?d:null}});q.appendChild(b);q.appendChild(n);q.appendChild(w);p.appendChild(q);u.appendChild(p);for(var l=
-[],z=0,g=0;g<d.length;g++)for(p=0;p<d[g].entries.length;p++)z++;for(var t=[b,n,w],x=0,g=0;g<d.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];l.push(v(t[Math.floor(x/(z/3))],c.title,c.id));x++}})(d[g]);c.appendChild(u);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";k=document.createElement("input");isLocalStorage&&(k.setAttribute("type","checkbox"),k.checked=!0,k.defaultChecked=!0,d.appendChild(k),b=document.createElement("span"),
+function(){a.hideDialog();for(var b=[],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),k.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var u=document.createElement("table"),p=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var q=document.createElement("tr");u.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),v=document.createElement("td"),w=mxUtils.bind(this,function(b,
+c,d){var f=document.createElement("input");f.type="checkbox";u.appendChild(f);f.checked=a.sidebar.isEntryVisible(d);var k=document.createElement("span");mxUtils.write(k,c);c=document.createElement("div");c.style.display="block";c.appendChild(f);c.appendChild(k);mxEvent.addListener(k,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return f.checked?d:null}});q.appendChild(b);q.appendChild(n);q.appendChild(v);p.appendChild(q);u.appendChild(p);for(var l=
+[],z=0,f=0;f<d.length;f++)for(p=0;p<d[f].entries.length;p++)z++;for(var t=[b,n,v],x=0,f=0;f<d.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];l.push(w(t[Math.floor(x/(z/3))],c.title,c.id));x++}})(d[f]);c.appendChild(u);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";k=document.createElement("input");isLocalStorage&&(k.setAttribute("type","checkbox"),k.checked=!0,k.defaultChecked=!0,d.appendChild(k),b=document.createElement("span"),
mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",k.checked);a.hideDialog()});n.className=
-"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var f=document.createElement("span");f.className="geSprite geSprite-delete";
-f.style.position="relative";f.style.cursor="pointer";f.style.top="5px";f.style.marginRight="4px";f.style.display="inline-block";g.appendChild(f);mxUtils.write(g,e[d]);c.appendChild(g);mxUtils.br(c);mxEvent.addListener(f,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(d))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var e=mxSettings.getPlugins().slice();
-d.appendChild(c);b();var f=mxUtils.button(mxResources.get("add"),function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var g=d.split(";"),d=0;d<g.length;d++){var f=App.pluginRegistry[g[d]];null!=f&&(c+=f+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){g=a.split(";");for(a=0;a<g.length;a++){var c=g[a],d=App.pluginRegistry[c];null!=d&&(c=d);0<c.length&&0>mxUtils.indexOf(e,c)&&e.push(c)}b()}},mxResources.get("enterValue")+
-" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
-m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(h),g.appendChild(m),g.appendChild(f),g.appendChild(l)):(g.appendChild(m),g.appendChild(f),g.appendChild(l),g.appendChild(h));d.appendChild(g);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),
-h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");h.appendChild(l);f.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();
-k.select()};g.appendChild(k);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";g.appendChild(n);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("right")+
-":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";g.appendChild(u);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";g.appendChild(p);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");
-m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var q=document.createElement("input");q.setAttribute("type","checkbox");g.appendChild(q);h.appendChild(g);f.appendChild(h);e.appendChild(f);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=w.width,
-e=w.height,f=parseInt(k.value),h=parseInt(n.value),g=Math.max(1,g-f-parseInt(u.value)),e=Math.max(1,e-h-parseInt(p.value));b.width=g;b.height=e;q.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,f,h,g,e,0,0,g,e);d(b.toDataURL())});v.setAttribute("disabled","disabled");w.onload=function(){v.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+
-": "+w.height)};w.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&v.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(v)):(b.appendChild(v),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),h=document.createElement("tbody"),
-l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};g.appendChild(k);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+
-":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.width:"";g.appendChild(u);l.appendChild(m);l.appendChild(g);h.appendChild(l);
-l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.height:"";g.appendChild(p);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var q=document.createElement("input");
-q.setAttribute("type","text");q.style.width="100px";q.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(q);l.appendChild(m);l.appendChild(g);h.appendChild(l);f.appendChild(h);e.appendChild(f);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var g=d.getCellGeometry(b[c]);null!=g&&(g=g.clone(),d.isCellMovable(b[c])&&
-(0<mxUtils.trim(k.value).length&&(g.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(g.y=Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(u.value).length&&(g.width=Number(u.value)),0<mxUtils.trim(p.value).length&&(g.height=Number(p.value))),d.getModel().setGeometry(b[c],g));0<mxUtils.trim(q.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(q.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&w.click()});f=document.createElement("div");
-f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(c),f.appendChild(w)):(f.appendChild(w),f.appendChild(c));e.appendChild(f);this.container=e},LibraryDialog=function(a,b,d,c,e,f){function h(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=p;)a=a.parentNode;var b=null;if(null!=a)for(var c=p.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,d,g,e,n,f,u,m){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&
-null!=f||null==w[b]){var z=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=A.title&&0<A.title.length?A.title:mxResources.get("untitled"));I.style.color=null==A.title||0==A.title.length?"#d0d0d0":""};p.style.backgroundImage="";q.style.display="none";var C=e,E=n;if(e>a.maxImageSize||n>a.maxImageSize){var y=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=y;n*=y}C>E?(E=Math.round(100*
-E/C),C=100):(C=Math.round(100*C/E),E=100);var D=document.createElement("div");D.setAttribute("draggable","true");D.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";D.style.position="relative";D.style.cursor="move";mxUtils.setPrefixedStyle(D.style,"transition","transform .1s ease-in-out");if(null!=b){var B=document.createElement("img");B.setAttribute("src",x.convert(b));B.style.width=C+"px";B.style.height=E+"px";B.style.margin="10px";B.style.paddingBottom=Math.floor((100-E)/2)+"px";B.style.paddingLeft=
-Math.floor((100-C)/2)+"px";D.appendChild(B)}else if(null!=f){var L=a.stringToCells(a.editor.graph.decompress(f.xml));0<L.length&&(a.sidebar.createThumb(L,100,100,D,null,!0,!1),D.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",D.firstChild.style.cursor="")}var M=document.createElement("img");M.setAttribute("src",Editor.closeImage);M.setAttribute("border","0");M.setAttribute("title",mxResources.get("delete"));M.setAttribute("align","top");M.style.paddingTop="4px";M.style.position=
-"absolute";M.style.marginLeft="-12px";M.style.zIndex="1";M.style.cursor="pointer";mxEvent.addListener(M,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(M,"click",function(d){w[b]=null;for(var g=0;g<k.length;g++)if(null!=k[g].data&&k[g].data==b||null!=k[g].xml&&null!=c&&k[g].xml==c.xml){k.splice(g,1);break}D.parentNode.removeChild(a);0==k.length&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(M,
-"dblclick",function(a){mxEvent.consume(a)})})(D,b,f);D.appendChild(M);D.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var A=null;null!=b?(A={data:b,w:e,h:n,title:m},null!=u&&(A.aspect=u),w[b]=B,k.push(A)):null!=f&&(f.aspect="fixed",k.push(f),A=f);mxEvent.addListener(I,"keydown",
-function(a){13==a.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(a))});z();D.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});L=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,A.title||"",mxResources.get("ok"),function(a){null!=a&&(A.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();
-mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=t&&(t(),t=null);if(null==A.title||0==A.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",!1,null);t=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";A.title=I.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",L);mxEvent.addListener(D,"dblclick",
-L);p.appendChild(D);mxEvent.addListener(D,"dragstart",function(a){null==b&&null!=f&&(M.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);v=h(a);mxClient.IS_GC&&(D.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);M.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(a){"hidden"==M.style.visibility&&(M.style.visibility=
-"",I.style.visibility="");v=null;mxUtils.setOpacity(D,100);mxUtils.setPrefixedStyle(D.style,"transform",null)})}else H||(H=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),C=mxUtils.parseXml(b),"mxlibrary"==C.documentElement.nodeName){E=JSON.parse(mxUtils.getTextContent(C.documentElement));if(null!=E&&0<E.length)for(var G=0;G<E.length;G++)null!=E[G].xml?l(null,null,0,0,0,0,E[G]):l(E[G].data,null,0,0,E[G].w,E[G].h,null,"fixed",E[G].title);e=!0}else if("mxfile"==
-C.documentElement.nodeName){for(var F=C.documentElement.getElementsByTagName("diagram"),G=0;G<F.length;G++){var E=mxUtils.getTextContent(F[G]),L=a.stringToCells(a.editor.graph.decompress(E)),X=a.editor.graph.getBoundingBoxFromGeometry(L);l(null,null,0,0,0,0,{xml:E,w:X.width,h:X.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function m(a){a.dataTransfer.dropEffect=null!=v?"move":"copy";a.stopPropagation();a.preventDefault()}
-function g(b){b.stopPropagation();b.preventDefault();H=!1;z=h(b);if(null!=v)null!=z&&z<p.children.length?(k.splice(z>v?z-1:z,0,k.splice(v,1)[0]),p.insertBefore(p.children[v],p.children[z])):(k.push(k.splice(v,1)[0]),p.appendChild(p.children[v]));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)||
+"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";
+g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";f.appendChild(g);mxUtils.write(f,e[d]);c.appendChild(f);mxUtils.br(c);mxEvent.addListener(g,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(d))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var e=mxSettings.getPlugins().slice();
+d.appendChild(c);b();var g=mxUtils.button(mxResources.get("add"),function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var f=d.split(";"),d=0;d<f.length;d++){var g=App.pluginRegistry[f[d]];null!=g&&(c+=g+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){f=a.split(";");for(a=0;a<f.length;a++){var c=f[a],d=App.pluginRegistry[c];null!=d&&(c=d);0<c.length&&0>mxUtils.indexOf(e,c)&&e.push(c)}b()}},mxResources.get("enterValue")+
+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});g.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
+m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(h),f.appendChild(m),f.appendChild(g),f.appendChild(l)):(f.appendChild(m),f.appendChild(g),f.appendChild(l),f.appendChild(h));d.appendChild(f);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"),
+h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");h.appendChild(l);g.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();
+k.select()};f.appendChild(k);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";f.appendChild(n);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("right")+
+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";f.appendChild(u);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";f.appendChild(p);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");
+m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var q=document.createElement("input");q.setAttribute("type","checkbox");f.appendChild(q);h.appendChild(f);g.appendChild(h);e.appendChild(g);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),f=v.width,
+e=v.height,g=parseInt(k.value),w=parseInt(n.value),f=Math.max(1,f-g-parseInt(u.value)),e=Math.max(1,e-w-parseInt(p.value));b.width=f;b.height=e;q.checked&&(c.fillStyle="#000000",c.arc(f/2,e/2,Math.min(f/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(v,g,w,f,e,0,0,f,e);d(b.toDataURL())});w.setAttribute("disabled","disabled");v.onload=function(){w.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+
+": "+v.height)};v.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&w.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(w)):(b.appendChild(w),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),g=document.createElement("table"),h=document.createElement("tbody"),
+l=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};f.appendChild(k);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+
+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";f.appendChild(n);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.width:"";f.appendChild(u);l.appendChild(m);l.appendChild(f);h.appendChild(l);
+l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.height:"";f.appendChild(p);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var q=document.createElement("input");
+q.setAttribute("type","text");q.style.width="100px";q.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";f.appendChild(q);l.appendChild(m);l.appendChild(f);h.appendChild(l);g.appendChild(h);e.appendChild(g);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var f=d.getCellGeometry(b[c]);null!=f&&(f=f.clone(),d.isCellMovable(b[c])&&
+(0<mxUtils.trim(k.value).length&&(f.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(f.y=Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(u.value).length&&(f.width=Number(u.value)),0<mxUtils.trim(p.value).length&&(f.height=Number(p.value))),d.getModel().setGeometry(b[c],f));0<mxUtils.trim(q.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(q.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&v.click()});g=document.createElement("div");
+g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(c),g.appendChild(v)):(g.appendChild(v),g.appendChild(c));e.appendChild(g);this.container=e},LibraryDialog=function(a,b,d,c,e,g){function h(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=p;)a=a.parentNode;var b=null;if(null!=a)for(var c=p.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,d,f,e,n,g,u,m){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&
+null!=g||null==v[b]){var z=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=A.title&&0<A.title.length?A.title:mxResources.get("untitled"));I.style.color=null==A.title||0==A.title.length?"#d0d0d0":""};p.style.backgroundImage="";q.style.display="none";var B=e,E=n;if(e>a.maxImageSize||n>a.maxImageSize){var y=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=y;n*=y}B>E?(E=Math.round(100*
+E/B),B=100):(B=Math.round(100*B/E),E=100);var C=document.createElement("div");C.setAttribute("draggable","true");C.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";C.style.position="relative";C.style.cursor="move";mxUtils.setPrefixedStyle(C.style,"transition","transform .1s ease-in-out");if(null!=b){var D=document.createElement("img");D.setAttribute("src",x.convert(b));D.style.width=B+"px";D.style.height=E+"px";D.style.margin="10px";D.style.paddingBottom=Math.floor((100-E)/2)+"px";D.style.paddingLeft=
+Math.floor((100-B)/2)+"px";C.appendChild(D)}else if(null!=g){var L=a.stringToCells(a.editor.graph.decompress(g.xml));0<L.length&&(a.sidebar.createThumb(L,100,100,C,null,!0,!1),C.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",C.firstChild.style.cursor="")}var M=document.createElement("img");M.setAttribute("src",Editor.closeImage);M.setAttribute("border","0");M.setAttribute("title",mxResources.get("delete"));M.setAttribute("align","top");M.style.paddingTop="4px";M.style.position=
+"absolute";M.style.marginLeft="-12px";M.style.zIndex="1";M.style.cursor="pointer";mxEvent.addListener(M,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(M,"click",function(d){v[b]=null;for(var f=0;f<k.length;f++)if(null!=k[f].data&&k[f].data==b||null!=k[f].xml&&null!=c&&k[f].xml==c.xml){k.splice(f,1);break}C.parentNode.removeChild(a);0==k.length&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(M,
+"dblclick",function(a){mxEvent.consume(a)})})(C,b,g);C.appendChild(M);C.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var A=null;null!=b?(A={data:b,w:e,h:n,title:m},null!=u&&(A.aspect=u),v[b]=D,k.push(A)):null!=g&&(g.aspect="fixed",k.push(g),A=g);mxEvent.addListener(I,"keydown",
+function(a){13==a.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(a))});z();C.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});L=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,A.title||"",mxResources.get("ok"),function(a){null!=a&&(A.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();
+mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=t&&(t(),t=null);if(null==A.title||0==A.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",!1,null);t=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";A.title=I.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",L);mxEvent.addListener(C,"dblclick",
+L);p.appendChild(C);mxEvent.addListener(C,"dragstart",function(a){null==b&&null!=g&&(M.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);w=h(a);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(C,30);M.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(C,"dragend",function(a){"hidden"==M.style.visibility&&(M.style.visibility=
+"",I.style.visibility="");w=null;mxUtils.setOpacity(C,100);mxUtils.setPrefixedStyle(C.style,"transform",null)})}else H||(H=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),B=mxUtils.parseXml(b),"mxlibrary"==B.documentElement.nodeName){E=JSON.parse(mxUtils.getTextContent(B.documentElement));if(null!=E&&0<E.length)for(var G=0;G<E.length;G++)null!=E[G].xml?l(null,null,0,0,0,0,E[G]):l(E[G].data,null,0,0,E[G].w,E[G].h,null,"fixed",E[G].title);e=!0}else if("mxfile"==
+B.documentElement.nodeName){for(var F=B.documentElement.getElementsByTagName("diagram"),G=0;G<F.length;G++){var E=mxUtils.getTextContent(F[G]),L=a.stringToCells(a.editor.graph.decompress(E)),X=a.editor.graph.getBoundingBoxFromGeometry(L);l(null,null,0,0,0,0,{xml:E,w:X.width,h:X.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function m(a){a.dataTransfer.dropEffect=null!=w?"move":"copy";a.stopPropagation();a.preventDefault()}
+function f(b){b.stopPropagation();b.preventDefault();H=!1;z=h(b);if(null!=w)null!=z&&z<p.children.length?(k.splice(z>w?z-1:z,0,k.splice(w,1)[0]),p.insertBefore(p.children[w],p.children[z])):(k.push(k.splice(w,1)[0]),p.appendChild(p.children[w]));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){l(c,null,0,0,a.width,a.height);p.scrollTop=p.scrollHeight})}b.stopPropagation();b.preventDefault()}var k=[];d=document.createElement("div");d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",
b);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==e||e.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);var p=document.createElement("div");p.style.borderWidth="1px 0px 1px 0px";p.style.borderColor="#d3d3d3";p.style.borderStyle="solid";p.style.marginTop="6px";
-p.style.overflow="auto";p.style.height="340px";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));d.appendChild(q);var w={},v=null,z=null,t=null;
+p.style.overflow="auto";p.style.height="340px";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));d.appendChild(q);var v={},w=null,z=null,t=null;
b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=t&&(t(),t=null,mxEvent.consume(a))};mxEvent.addListener(p,"mousedown",b);mxEvent.addListener(p,"pointerdown",b);mxEvent.addListener(p,"touchstart",b);var x=new mxUrlConverter,H=!1;if(null!=c)for(b=0;b<c.length;b++)n=c[b],l(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(p,"dragleave",function(a){q.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==p||b==q){a.stopPropagation();a.preventDefault();
-break}b=b.parentNode}});var E=function(b){return function(c,d,g,k,e,n,t,f,h){null!=h&&(/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name))?a.importVisio(h,mxUtils.bind(this,function(c){a.spinner.stop();l(c,d,g,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=h&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,h.name)?a.parseFile(h,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=
-c.status&&(l(c.responseText,d,g,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight))})):(l(c,d,g,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight)}};mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",g);mxEvent.addListener(q,"dragover",m);mxEvent.addListener(q,"drop",g);d.appendChild(p);c=document.createElement("div");c.style.textAlign="right";
+break}b=b.parentNode}});var E=function(b){return function(c,d,f,k,e,n,t,g,h){null!=h&&(/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name))?a.importVisio(h,mxUtils.bind(this,function(c){a.spinner.stop();l(c,d,f,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=h&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,h.name)?a.parseFile(h,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=
+c.status&&(l(c.responseText,d,f,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight))})):(l(c,d,f,k,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight)}};mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",f);mxEvent.addListener(q,"dragover",m);mxEvent.addListener(q,"drop",f);d.appendChild(p);c=document.createElement("div");c.style.textAlign="right";
c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),c=u.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,
-"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(y,"change",function(b){H=!1;a.importFiles(y.files,0,0,a.maxImageSize,function(a,c,d,g,k,e,n,t,f){E(b)(a,c,d,g,k,e,n,t,f);y.value=""});p.scrollTop=p.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);y.click()}),n.setAttribute("id",
-"btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){H=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}l(a,null,0,0,b,c);p.scrollTop=p.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,g){a.saveLibrary(b,
-c,d,g)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(u.value,k,e,f)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var f,h,l=document.createElement("table"),m=document.createElement("tbody");l.style.cellPadding="4px";f=document.createElement("tr");h=
-document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";mxUtils.write(h,d);f.appendChild(h);m.appendChild(f);f=document.createElement("tr");h=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=c-200+"px";g.style.height=e+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};h.appendChild(g);f.appendChild(h);h=document.createElement("td");d=document.createElement("div");d.style.position=
-"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);h.appendChild(d);var k=new Graph(d);k.setEnabled(!1);var n=a.editor.graph.cloneCells([b])[0];k.addCells([n]);d=k.view.getState(n);var u="";null!=d.shape&&null!=d.shape.stencil&&(u=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(g,u||"");d=k.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);k.view.scaleAndTranslate(e,
-20/e-d.x,20/e-d.y);f.appendChild(h);m.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.setAttribute("colspan","2");h.style.paddingTop="2px";h.style.whiteSpace="nowrap";h.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&h.appendChild(e);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-d.className="geBtn",h.appendChild(d));var p=function(b,c,d){var k=g.value,e=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||k!=u){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x;
-c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[c])}catch(H){throw H;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){p(k,n,!1)});d.className="geBtn";h.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){p(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";h.appendChild(d);a.editor.cancelFirst||h.appendChild(e);f.appendChild(h);m.appendChild(f);l.appendChild(m);this.container=
-l},CustomDialog=function(a,b,d,c,e,f,h,l){var m=document.createElement("div");m.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=h&&b.appendChild(h);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});h.className="geBtn";l&&(h.style.display="none");a.editor.cancelFirst&&b.appendChild(h);a.isOffline()||null==f||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),l.className="geBtn",b.appendChild(l));
+"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(y,"change",function(b){H=!1;a.importFiles(y.files,0,0,a.maxImageSize,function(a,c,d,f,k,e,n,t,g){E(b)(a,c,d,f,k,e,n,t,g);y.value=""});p.scrollTop=p.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);y.click()}),n.setAttribute("id",
+"btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){H=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}l(a,null,0,0,b,c);p.scrollTop=p.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,f){a.saveLibrary(b,
+c,d,f)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(u.value,k,e,g)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var g,h,l=document.createElement("table"),m=document.createElement("tbody");l.style.cellPadding="4px";g=document.createElement("tr");h=
+document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";mxUtils.write(h,d);g.appendChild(h);m.appendChild(g);g=document.createElement("tr");h=document.createElement("td");var f=document.createElement("textarea");f.style.outline="none";f.style.resize="none";f.style.width=c-200+"px";f.style.height=e+"px";this.textarea=f;this.init=function(){f.focus();f.scrollTop=0};h.appendChild(f);g.appendChild(h);h=document.createElement("td");d=document.createElement("div");d.style.position=
+"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);h.appendChild(d);var k=new Graph(d);k.setEnabled(!1);var n=a.editor.graph.cloneCells([b])[0];k.addCells([n]);d=k.view.getState(n);var u="";null!=d.shape&&null!=d.shape.stencil&&(u=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(f,u||"");d=k.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);k.view.scaleAndTranslate(e,
+20/e-d.x,20/e-d.y);g.appendChild(h);m.appendChild(g);g=document.createElement("tr");h=document.createElement("td");h.setAttribute("colspan","2");h.style.paddingTop="2px";h.style.whiteSpace="nowrap";h.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&h.appendChild(e);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+d.className="geBtn",h.appendChild(d));var p=function(b,c,d){var k=f.value,e=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||k!=u){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x;
+c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[c])}catch(H){throw H;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){p(k,n,!1)});d.className="geBtn";h.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){p(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";h.appendChild(d);a.editor.cancelFirst||h.appendChild(e);g.appendChild(h);m.appendChild(g);l.appendChild(m);this.container=
+l},CustomDialog=function(a,b,d,c,e,g,h,l){var m=document.createElement("div");m.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=h&&b.appendChild(h);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});h.className="geBtn";l&&(h.style.display="none");a.editor.cancelFirst&&b.appendChild(h);a.isOffline()||null==g||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),l.className="geBtn",b.appendChild(l));
e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});b.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(h);m.appendChild(b);this.cancelBtn=h;this.okButton=e;this.container=m};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -7040,43 +7040,43 @@ Editor.shadowOptionEnabled=!0;Editor.configure=function(a){if(null!=a){Editor.co
a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);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)),c=document.getElementsByTagName("script")[0],c.parentNode.insertBefore(b,c),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};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],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[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&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(g=new mxCodec(d.ownerDocument),g.decode(d,
-this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var g=new mxCodec(d.ownerDocument);g.decode(d,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);
+null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[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&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,
+this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=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?!0:this.originalNoForeignObject;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 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 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(x){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var g=0;g<c.length;g++)if("mxgraph"==c[g].getAttribute("class")){d.push(c[g]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),
+null!=b&&0<b.length)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var f=0;f<c.length;f++)if("mxgraph"==c[f].getAttribute("class")){d.push(c[f]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),
a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=this.graph.decompress(c),0<c.length&&(d=mxUtils.parseXml(c),a=d.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||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(c=this.graph.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};var d=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?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,b){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};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"],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){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var g=document.createElement("script");g.type="text/javascript";g.src=a;d[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
-var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,d,g){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==g&&b.push(g);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var h=Format.prototype.init;Format.prototype.init=function(){h.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+b){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
+var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,d,f){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==f&&b.push(f);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var h=Format.prototype.init;Format.prototype.init=function(){h.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
l.apply(this,arguments):this.clear()};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);var b=this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&("1"==urlParams.embed||null!=b&&b.isEditable())){var c=this.editorUi,d=c.editor.graph,b=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var b=new ChangePageSetup(c);b.ignoreColor=!0;b.ignoreImage=!0;b.shadowVisible=a;d.model.execute(b)},{install:function(a){this.listener=
-function(){a(d.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(b.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(b,60));a.appendChild(b)}return a};var g=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=g.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&
+function(){a(d.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(b.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(b,60));a.appendChild(b)}return a};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=f.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&
(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,
{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var k=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));k.apply(this,arguments)};var n=StyleFormatPanel.prototype.addStyleOps;
StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
-b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var g=d.getModel().getStyle(c[b]),e=0;e<k.length;e++)g=mxUtils.removeStylename(g,
-k[e]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],g)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height=
-"30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");g.appendChild(b)}g.innerHTML=
-"";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(g),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
+b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var f=d.getModel().getStyle(c[b]),e=0;e<k.length;e++)f=mxUtils.removeStylename(f,
+k[e]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],f)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height=
+"30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");f.appendChild(b)}f.innerHTML=
+"";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(f),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(a.appendChild(e),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(e);c(n);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,g=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==c?b.style.width="202px":
(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var u=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}u.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
-b,c){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),g=new mxCellHighlight(this,b,d,!1);g.highlight(a);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition","all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;
-var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");
-k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):
-d.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");g.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),
-null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=k[0];d.appendChild(g);c||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+b,c){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),f=new mxCellHighlight(this,b,d,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;
+var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");f.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");
+k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");f.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");f.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):
+d.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");f.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");f.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),
+null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=k[0];d.appendChild(f);c||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return f};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"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];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=
@@ -7084,88 +7084,88 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/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.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.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 q=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,g,k,e,n,f,p){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);
-null!=t&&mxStencilRegistry.getStencil(t)}return q.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){l.value=Math.max(1,Math.min(n,Math.max(parseInt(l.value),parseInt(q.value))));q.value=Math.max(1,Math.min(n,Math.min(parseInt(l.value),parseInt(q.value))))}function d(b){function c(b,c,g){var k=b.getGraphBounds(),e=0,n=0,f=Z.get(),t=1/b.pageScale,p=z.checked;if(p)var t=parseInt(N.value),h=parseInt(X.value),t=Math.min(f.height*h/(k.height/b.view.scale),f.width*t/(k.width/
-b.view.scale));else t=parseInt(w.value)/(100*b.pageScale),isNaN(t)&&(d=1/b.pageScale,w.value="100 %");f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*d);f.height=Math.ceil(f.height*d);t*=d;!p&&b.pageVisible?(k=b.getPageLayout(),e-=k.x*f.width,n-=k.y*f.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,f,0,e,n,p);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var u=c.writeHead;c.writeHead=function(b){u.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 q=c.renderPage;c.renderPage=function(a,b,c,d,g,k){var e=q.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=p;c.appendGraph(b,t,e,n,g,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value=
-"100 %");var d=.75*d,k=q.value,e=l.value,n=!h.checked,t=null;n&&(n=k==f&&e==f);if(!n&&null!=a.pages&&a.pages.length){var p=0,n=a.pages.length-1;h.checked||(p=parseInt(k)-1,n=parseInt(e)-1);for(var u=p;u<=n;u++){var m=a.pages[u],k=m==a.currentPage?g:null;if(null==k){var k=a.createTemporaryGraph(g.getStylesheet()),e=!0,p=!1,x=null,v=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(e=m.viewState.pageVisible,p=m.viewState.mathEnabled,x=m.viewState.background,
-v=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(p="0"!=m.mapping.diagramMap.get("mathEnabled"),x=m.mapping.diagramMap.get("background"),v=m.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);k.background=x;k.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;k.pageVisible=e;k.mathEnabled=p;var C=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?u+1:C.apply(this,arguments)};document.body.appendChild(k.container);
-a.updatePageRoot(m);k.model.setRoot(m.root)}t=c(k,t,u!=n);k!=g&&k.container.parentNode.removeChild(k.container)}}else t=c(g);t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.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 q=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,f,k,e,n,g,p){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);
+null!=t&&mxStencilRegistry.getStencil(t)}return q.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){l.value=Math.max(1,Math.min(n,Math.max(parseInt(l.value),parseInt(q.value))));q.value=Math.max(1,Math.min(n,Math.min(parseInt(l.value),parseInt(q.value))))}function d(b){function c(b,c,f){var k=b.getGraphBounds(),e=0,n=0,g=Z.get(),t=1/b.pageScale,p=z.checked;if(p)var t=parseInt(N.value),h=parseInt(X.value),t=Math.min(g.height*h/(k.height/b.view.scale),g.width*t/(k.width/
+b.view.scale));else t=parseInt(v.value)/(100*b.pageScale),isNaN(t)&&(d=1/b.pageScale,v.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);t*=d;!p&&b.pageVisible?(k=b.getPageLayout(),e-=k.x*g.width,n-=k.y*g.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,g,0,e,n,p);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var u=c.writeHead;c.writeHead=function(b){u.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 q=c.renderPage;c.renderPage=function(a,b,c,d,f,k){var e=q.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,f,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=p;c.appendGraph(b,t,e,n,f,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value=
+"100 %");var d=.75*d,k=q.value,e=l.value,n=!h.checked,t=null;n&&(n=k==g&&e==g);if(!n&&null!=a.pages&&a.pages.length){var p=0,n=a.pages.length-1;h.checked||(p=parseInt(k)-1,n=parseInt(e)-1);for(var u=p;u<=n;u++){var m=a.pages[u],k=m==a.currentPage?f:null;if(null==k){var k=a.createTemporaryGraph(f.getStylesheet()),e=!0,p=!1,w=null,x=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(e=m.viewState.pageVisible,p=m.viewState.mathEnabled,w=m.viewState.background,
+x=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(p="0"!=m.mapping.diagramMap.get("mathEnabled"),w=m.mapping.diagramMap.get("background"),x=m.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);k.background=w;k.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;k.pageVisible=e;k.mathEnabled=p;var B=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?u+1:B.apply(this,arguments)};document.body.appendChild(k.container);
+a.updatePageRoot(m);k.model.setRoot(m.root)}t=c(k,t,u!=n);k!=f&&k.container.parentNode.removeChild(k.container)}}else t=c(f);t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
-var g=a.editor.graph,k=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));k.appendChild(e);var n=1,f=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","all");h.setAttribute("type","radio");
+var f=a.editor.graph,k=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));k.appendChild(e);var n=1,g=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","all");h.setAttribute("type","radio");
h.setAttribute("name","pages-printdialog");p.appendChild(h);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));p.appendChild(e);mxUtils.br(p);var u=h.cloneNode(!0);h.setAttribute("checked","checked");u.setAttribute("value","range");p.appendChild(u);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");p.appendChild(e);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type",
-"number");q.setAttribute("min","1");q.style.width="50px";p.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));p.appendChild(e);var l=q.cloneNode(!0);p.appendChild(l);mxEvent.addListener(q,"focus",function(){u.checked=!0});mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(q,"change",c);mxEvent.addListener(l,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){f=e+
-1;q.value=f;l.value=f;break}q.setAttribute("max",n);l.setAttribute("max",n);1<n&&k.appendChild(p);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);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));m.appendChild(e);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";
-w.setAttribute("value","100 %");w.style.width="50px";m.appendChild(w);mxEvent.addListener(w,"focus",function(){v.checked=!0});k.appendChild(m);var p=p.cloneNode(!1),z=v.cloneNode(!0);z.setAttribute("value","fit");v.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(z);p.appendChild(e);m=document.createElement("table");m.style.display="inline-block";var R=document.createElement("tbody"),
+"number");q.setAttribute("min","1");q.style.width="50px";p.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));p.appendChild(e);var l=q.cloneNode(!0);p.appendChild(l);mxEvent.addListener(q,"focus",function(){u.checked=!0});mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(q,"change",c);mxEvent.addListener(l,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){g=e+
+1;q.value=g;l.value=g;break}q.setAttribute("max",n);l.setAttribute("max",n);1<n&&k.appendChild(p);var m=document.createElement("div");m.style.marginBottom="10px";var w=document.createElement("input");w.style.marginRight="8px";w.setAttribute("value","adjust");w.setAttribute("type","radio");w.setAttribute("name","printZoom");m.appendChild(w);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));m.appendChild(e);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
+v.setAttribute("value","100 %");v.style.width="50px";m.appendChild(v);mxEvent.addListener(v,"focus",function(){w.checked=!0});k.appendChild(m);var p=p.cloneNode(!1),z=w.cloneNode(!0);z.setAttribute("value","fit");w.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(z);p.appendChild(e);m=document.createElement("table");m.style.display="inline-block";var R=document.createElement("tbody"),
P=document.createElement("tr"),O=P.cloneNode(!0),K=document.createElement("td"),Q=K.cloneNode(!0),S=K.cloneNode(!0),Y=K.cloneNode(!0),J=K.cloneNode(!0),aa=K.cloneNode(!0);K.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(K,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";Q.appendChild(N);e=document.createElement("span");mxUtils.write(e,
mxResources.get("fitToSheetsAcross"));S.appendChild(e);mxUtils.write(Y,mxResources.get("fitToBy"));var X=N.cloneNode(!0);J.appendChild(X);mxEvent.addListener(N,"focus",function(){z.checked=!0});mxEvent.addListener(X,"focus",function(){z.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));aa.appendChild(e);P.appendChild(K);P.appendChild(Q);P.appendChild(S);O.appendChild(Y);O.appendChild(J);O.appendChild(aa);R.appendChild(P);R.appendChild(O);m.appendChild(R);
p.appendChild(m);k.appendChild(p);p=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));p.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));p.appendChild(e);
-var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";p.appendChild(U);k.appendChild(p);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&e.appendChild(p);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-m.className="geBtn",e.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),m.className="geBtn",e.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});m.className="geBtn gePrimaryBtn";e.appendChild(m);a.editor.cancelFirst||e.appendChild(p);k.appendChild(e);this.container=k};var w=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)):(w.apply(this,arguments),null!=this.mathEnabled&&
+var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";p.appendChild(U);k.appendChild(p);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&e.appendChild(p);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+m.className="geBtn",e.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),m.className="geBtn",e.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});m.className="geBtn gePrimaryBtn";e.appendChild(m);a.editor.cancelFirst||e.appendChild(p);k.appendChild(e);this.container=k};var v=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)):(v.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))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.1";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.2";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=
b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");
EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};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);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=
a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=d.spin;d.spin=function(c,k){var e=!1;this.active||(g.call(this,c),this.active=!0,null!=k&&(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=
+function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,k){var e=!1;this.active||(f.call(this,c),this.active=!0,null!=k&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize=
"9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=k+"...",c.appendChild(e),d.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=
Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),e=!0);return e};var k=d.stop;d.stop=function(){k.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
-b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=g(a);var e=d(a,4);if(null!=b&&b(k-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,
-!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>d&&(c=b.substring(d,g+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),f=this.editor.extractGraphModel(e.documentElement,
-null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(w){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
-b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var g=d.length-1;0<=g;g--){var e=this.updatePageRoot(new DiagramPage(d[g]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[g+1]));b.model.execute(new ChangePage(this,e,0==g?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(g=0;g<c.length;g++)b.model.execute(new ChangePage(this,c[g],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(a,b,c,d,e,f,h,l,m,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var g,k=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":k=g=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(p);if(b.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,n);n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}t?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),
-n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!f&&!e&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,g,k);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
-App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,m,k);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var g=0;g<this.pages.length;g++){var e=
-this.pages[g].mapping;this.currentPage!=this.pages[g]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[g].node,d),e.needsUpdate=!1);c.appendChild(this.pages[g].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,h,l,m){e=null!=e?e:!0;h=null!=h?h:this.getXmlFileData(e,null!=f?f:!1);m=null!=m?m:this.getCurrentFile();
-f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var g=f.getGlobalVariable,k=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(k.root)}a=this.createFileData(h,f,m,window.location.href,a,b,c,d,e,l);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);
-return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,k="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;f=Math.floor(g.x/n-b.view.translate.x);n=Math.floor(g.y/n-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(k="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",f);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var e=d(a,4);if(null!=b&&b(k-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,
+!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var f=b.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=b.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),g=this.editor.extractGraphModel(e.documentElement,
+null!=this.pages),c=null!=g?mxUtils.getXml(g):""}catch(v){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
+b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var e=this.updatePageRoot(new DiagramPage(d[f]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,e,0==f?e:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(a,b,c,d,e,g,h,l,m,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var f,k=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":k=f=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(p);if(b.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,n);n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}t?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),
+n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!g&&!e&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,f,k);else if(g||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,m,k);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=
+this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),e.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,h,l,m){e=null!=e?e:!0;h=null!=h?h:this.getXmlFileData(e,null!=g?g:!1);m=null!=m?m:this.getCurrentFile();
+g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,k=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(k.root)}a=this.createFileData(h,g,m,window.location.href,a,b,c,d,e,l);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);
+return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,k="https://www.draw.io/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;g=Math.floor(f.x/n-b.view.translate.x);n=Math.floor(f.y/n-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(k="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=g&&g!=mxConstants.NONE?' style="background-color:'+g+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+k+'">\x3c/script>':
+">")+"\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="'+k+'">\x3c/script>':
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),k=g+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(k,a,n,"text/xml")}else if("html"==
-a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(k,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=g+".png":"jpeg"==a&&(k=g+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,c){try{var g=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var e=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=g;return e}catch(A){this.handleError(A)}}));else{var t=null,p=
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(),k=f+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(k,a,n,"text/xml")}else if("html"==
+a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(k,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=f+".png":"jpeg"==a&&(k=f+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var e=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=f;return e}catch(A){this.handleError(A)}}));else{var t=null,p=
mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"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 h=this.editor.graph.background;h==mxConstants.NONE&&(h=null);var l=this.editor.graph.getSvg(h,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(l);this.convertImages(l,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a))})))}else k=g+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),d)}}catch(y){this.handleError(y)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var e="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
-0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){e="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+e+"&base64="+d+"&embedXml="+g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
+mxUtils.getXml(a))})))}else k=f+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),d)}}catch(y){this.handleError(y)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var f=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var e="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){e="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+e+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});
if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||
this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),
title:a.getTitle(),mode:a.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(p){}}catch(p){null!=window.console&&console.log("error in fileLoaded:",a,p);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=p&&null!=p.message?":err:"+encodeURIComponent(p.message):
"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(q){}this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=
-null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,h){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,g,h){};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 g=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign=
-"center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var d=0;d<b.length;d++){var e=b[d],k=e.data;if(null!=k){var k=this.convertDataUri(k),n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(n+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(n+"image="+k,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(k=this.stringToCells(this.editor.graph.decompress(e.xml)),
+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){if(0==b.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign=
+"center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f);else for(var d=0;d<b.length;d++){var e=b[d],k=e.data;if(null!=k){var k=this.convertDataUri(k),n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(n+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(n+"image="+k,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(k=this.stringToCells(this.editor.graph.decompress(e.xml)),
0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var k=0;k<b.length;k++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",
-a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);c=null!=c&&0<c.length?c:a.getTitle();var n=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var f=n.parentNode.previousSibling;c=f.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=
-a.title&&f.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");f.style.position="relative";var h=document.createElement("img");h.setAttribute("src",Dialog.prototype.closeImage);h.setAttribute("title",mxResources.get("close"));h.setAttribute("valign","absmiddle");h.setAttribute("border","0");
-h.style.margin="0 3px";var l=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,y=null,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
-n,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y),y=h.cloneNode(!1),y.setAttribute("src",Editor.spinImage),y.setAttribute("title",mxResources.get("saving")),y.style.cursor="default",y.style.marginRight="2px",y.style.marginTop="-2px",t.insertBefore(y,t.firstChild),f.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=y&&null!=
-y.parentNode&&(y.parentNode.removeChild(y),f.style.paddingRight=18*t.childNodes.length+"px")})):null==l&&(l=h.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),t.insertBefore(l,t.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(f.style.paddingRight=18*t.childNodes.length+"px",l.parentNode.removeChild(l),
-l=null)});mxEvent.consume(c)})),f.style.paddingRight=18*t.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,e){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var f=m.getCellGeometry(a[k]);null!=f&&f.translate(-c.x,-c.y)}n.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);
-G(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),A=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;F(b,c)}mxEvent.consume(a)});
-n.style.border="3px solid transparent";mxEvent.addGestureListeners(n,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)",n.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility=
-"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(n.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),n.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility=
-"visible",n.style.border="3px solid transparent",n.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";n.style.cursor=
-"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"drop",mxUtils.bind(this,function(a){n.style.border="3px solid transparent";n.style.cursor="";null!=g&&(g.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,f,t,h,p,m,l){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),
-c=[new mxCell("",new mxGeometry(0,0,t,h),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,t,h),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var q=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var f=JSON.parse(mxUtils.getTextContent(k.documentElement));e(f,n);b=b.concat(f);G(a);this.spinner.stop();
-q=!0}catch(U){}else if("mxfile"==k.documentElement.nodeName)try{for(var t=k.documentElement.getElementsByTagName("diagram"),k=0;k<t.length;k++){var f=mxUtils.getTextContent(t[k]),h=this.stringToCells(this.editor.graph.decompress(f)),p=this.editor.graph.getBoundingBoxFromGeometry(h);F(h,new mxRectangle(0,0,p.width,p.height),a)}q=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&
-null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=l&&null!=p&&(/(\.vsdx)($|\?)/i.test(p)||/(\.vssx)($|\?)/i.test(p)||/(\.vsd)($|\?)/i.test(p))?this.importVisio(l,function(a){u(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,p)&&null!=l?this.parseFile(l,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(n,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",n.style.cursor="");a.stopPropagation();a.preventDefault()}));h=h.cloneNode(!1);h.setAttribute("src",IMAGE_PATH+"/edit.gif");h.setAttribute("title",mxResources.get("edit"));t.insertBefore(h,t.firstChild);mxEvent.addListener(h,
-"click",B);mxEvent.addListener(n,"dblclick",function(a){mxEvent.getSource(a)==n&&B(a)});c=h.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.firstChild);mxEvent.addListener(c,"click",A);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,
-"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(c,t.firstChild))}f.appendChild(t);f.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=
+a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);c=null!=c&&0<c.length?c:a.getTitle();var n=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var g=n.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=
+a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");g.style.position="relative";var h=document.createElement("img");h.setAttribute("src",Dialog.prototype.closeImage);h.setAttribute("title",mxResources.get("close"));h.setAttribute("valign","absmiddle");h.setAttribute("border","0");
+h.style.margin="0 3px";var l=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,y=null,D=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
+n,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y),y=h.cloneNode(!1),y.setAttribute("src",Editor.spinImage),y.setAttribute("title",mxResources.get("saving")),y.style.cursor="default",y.style.marginRight="2px",y.style.marginTop="-2px",t.insertBefore(y,t.firstChild),g.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=y&&null!=
+y.parentNode&&(y.parentNode.removeChild(y),g.style.paddingRight=18*t.childNodes.length+"px")})):null==l&&(l=h.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),t.insertBefore(l,t.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(g.style.paddingRight=18*t.childNodes.length+"px",l.parentNode.removeChild(l),
+l=null)});mxEvent.consume(c)})),g.style.paddingRight=18*t.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,e){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var g=m.getCellGeometry(a[k]);null!=g&&g.translate(-c.x,-c.y)}n.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);
+G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;F(b,c)}mxEvent.consume(a)});
+n.style.border="3px solid transparent";mxEvent.addGestureListeners(n,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)",n.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(n.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),n.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility=
+"visible",n.style.border="3px solid transparent",n.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";n.style.cursor=
+"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"drop",mxUtils.bind(this,function(a){n.style.border="3px solid transparent";n.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,g,t,h,p,l,m){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),
+c=[new mxCell("",new mxGeometry(0,0,t,h),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,t,h),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,q=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,n);b=b.concat(g);G(a);this.spinner.stop();
+u=!0}catch(U){}else if("mxfile"==k.documentElement.nodeName)try{for(var t=k.documentElement.getElementsByTagName("diagram"),k=0;k<t.length;k++){var g=mxUtils.getTextContent(t[k]),h=this.stringToCells(this.editor.graph.decompress(g)),p=this.editor.graph.getBoundingBoxFromGeometry(h);F(h,new mxRectangle(0,0,p.width,p.height),a)}u=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}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!=m&&null!=p&&(/(\.vsdx)($|\?)/i.test(p)||/(\.vssx)($|\?)/i.test(p)||/(\.vsd)($|\?)/i.test(p))?this.importVisio(m,function(a){q(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,p)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",n.style.cursor="");a.stopPropagation();a.preventDefault()}));h=h.cloneNode(!1);h.setAttribute("src",IMAGE_PATH+"/edit.gif");h.setAttribute("title",mxResources.get("edit"));t.insertBefore(h,t.firstChild);mxEvent.addListener(h,
+"click",D);mxEvent.addListener(n,"dblclick",function(a){mxEvent.getSource(a)==n&&D(a)});c=h.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.firstChild);mxEvent.addListener(c,"click",A);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,
+"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(c,t.firstChild))}g.appendChild(t);g.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=
function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize=
@@ -7174,194 +7174,194 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
"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,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(g=mxResources.get("cancel"),k=function(){d();e.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
+this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var f=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var n=window.location.hash;null!=n&&"#G"==n.substring(0,2)&&(n=n.substring(2),a+=' <a href="https://drive.google.com/open?id='+n+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else e.code==App.ERROR_TIMEOUT?a=
-mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,g,c,k)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,h,m,l,t,x){a=new ErrorDialog(this,a,b,c,d,e,f,h,null,m,l);this.showDialog(a.container,t||340,x||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
-b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){g();null!=b&&b()},function(){g();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,f,c,k)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,g,h,l,m,t,x){a=new ErrorDialog(this,a,b,c,d,e,g,h,null,l,m);this.showDialog(a.container,t||340,x||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
+b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,e=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
-"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),k=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(mxClient.IS_GC)var n=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),k=65==(n?parseInt(n[2],10):!1)?!1:k;if(k||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));k?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},
-0),g.click(),g.parentNode.removeChild(g)}catch(z){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),g=Array(e),
-k=0;k<e;++k){for(var f=1024*k,h=Math.min(f+1024,d),t=Array(h-f),m=0;f<h;++m,++f)t[m]=c[f].charCodeAt(0);g[k]=new Uint8Array(t)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f,h){f=null!=f?f:!1;h=null!=h?h:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");
-null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,d,e,g)}catch(H){this.handleError(H)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,h,null,1<e,4<e?3:4,a,c,d);this.showDialog(b.container,
+"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a"),k=!mxClient.IS_SF&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),k=65==(g?parseInt(g[2],10):!1)?!1:k;if(k||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));k?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(z){}}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,e=Math.ceil(d/1024),f=Array(e),
+k=0;k<e;++k){for(var g=1024*k,h=Math.min(g+1024,d),t=Array(h-g),l=0;g<h;++l,++g)t[l]=c[g].charCodeAt(0);f[k]=new Uint8Array(t)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,h){g=null!=g?g:!1;h=null!=h?h:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
+null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,e,f)}catch(H){this.handleError(H)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,h,null,1<e,4<e?3:4,a,c,d);this.showDialog(b.container,
420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:
";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);
else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";
mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var e=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});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.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.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,
-g){return this.createEchoRequest(c,a,d,e,b,g)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var g=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=g&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?g.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,
-function(c){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,f,!0,e,c)}catch(E){this.handleError(E)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,f,!0,e,c)}catch(E){this.handleError(E)}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,h,null,1<g,4<g?3:4,d,f,e);this.showDialog(a.container,380,g==(mxClient.IS_IOS?0:1)?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,h,m,l){if(this.spinner.spin(document.body,
-mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var k=this.editor.graph.getSvg(g,a,h,m,null,c);d&&this.editor.graph.addSvgShadow(k);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,l));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?
+f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var f=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=f&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?f.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,
+function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(E){this.handleError(E)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,e,c)}catch(E){this.handleError(E)}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,h,null,1<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,f==(mxClient.IS_IOS?0:1)?160:4<f?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,g,h,l,m){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 k=this.editor.graph.getSvg(f,a,h,l,null,c);d&&this.editor.graph.addSvgShadow(k);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?
b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,k,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,p,this.thumbImageCache)):p(k)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement("input");g.style.marginRight="8px";g.style.marginTop="16px";g.setAttribute("type","checkbox");c&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d&&g.setAttribute("disabled",
-"disabled");f&&(a.appendChild(g),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),e||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=g.getAttribute("disabled")&&(g.checked=!g.checked,mxEvent.consume(a))})));return g};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&
-(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));g.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");g.appendChild(d);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==
-g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return c},
-getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft=
+mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,k,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,p,this.thumbImageCache)):p(k)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled",
+"disabled");g&&(a.appendChild(f),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),e||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=f.getAttribute("disabled")&&(f.checked=!f.checked,mxEvent.consume(a))})));return f};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&
+(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==
+f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},
+getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft=
"8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value",
-"frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||
-mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,h,m){var g=this.getCurrentFile(),k=[];d&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&k.push("edit="+encodeURIComponent(e)),f&&
-k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&k.push("page="+a);break}a=!0;null!=h?c="#U"+encodeURIComponent(h):(g=this.getCurrentFile(),m||null==g||g.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+g.getHash(),a=!1));
-a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&k.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<k.length?"?"+k.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,h,m,l,t,x){this.getBasenames();var g={};""!=e&&e!=mxConstants.NONE&&(g.highlight=e);"auto"!==d&&(g.target=d);l||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;
-c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];h&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);m&&c.push("layers");0<c.length&&(l&&c.push("lightbox"),g.toolbar=c.join(" "));null!=t&&0<t.length&&(g.edit=t);null!=a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!h);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(g))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");
-mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");g=f.cloneNode(!0);g.setAttribute("value",
-"copy");k.appendChild(g);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(n);mxUtils.br(k);k.appendChild(f);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));k.appendChild(n);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href","javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),
-k.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));g.setAttribute("checked","checked");null==c&&f.setAttribute("disabled","disabled");e.appendChild(k);var h=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");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="100%";e.appendChild(l);var u=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(e,mxResources.get("allPages"),k,!k),G=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),A=this.addEditButton(e,F),C=A.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&F.checked?
-A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(f.checked?c:null,m.checked,l.value,h.getTarget(),h.getColor(),u.checked,B.checked,G.checked,F.checked,A.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
-mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var n=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384",t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var h=document.createElement("div");h.style.whiteSpace="normal";mxUtils.write(h,mxResources.get("linkAccountRequired"));t.appendChild(h);h=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));h.style.marginTop="12px";h.className="geBtn";t.appendChild(h);g.appendChild(t);h=document.createElement("a");h.style.paddingLeft="12px";h.style.color="gray";h.style.fontSize="11px";h.setAttribute("href","javascript:void(0);");mxUtils.write(h,mxResources.get("check"));
-t.appendChild(h);mxEvent.addListener(h,"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,l=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,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%",g.appendChild(m),mxUtils.write(g,mxResources.get("height")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.width="50px",l.style.marginLeft="6px",l.style.marginBottom="10px",l.value=d+"px",g.appendChild(l),mxUtils.br(g);var p=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var q=null;
-if(null==n||n.constructor!=window.DriveFile||b)q=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var u=this.addCheckbox(g,mxResources.get("lightbox"),!0),F=this.addEditButton(g,u),A=F.getEditInput(),C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=A.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(C.removeAttribute("disabled"),A.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),A.setAttribute("disabled",
-"disabled"));A.checked&&u.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(p.getTarget(),p.getColor(),null==q?!0:q.checked,u.checked,F.getLink(),C.checked,null!=m?m.value:null,null!=l?l.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
-document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g);var k=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),f=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
-!0);null!=f&&(f.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!k.checked,null!=f?f.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,h,m){h=null!=h?h:!0;var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,n="jpeg"==m?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-g.appendChild(l);mxUtils.write(g,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";g.appendChild(p);mxUtils.write(g,mxResources.get("borderWidth")+":");var 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";g.appendChild(u);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background,null,null,"jpeg"!=m),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),w=document.createElement("input");w.style.marginTop="16px";w.style.marginRight="8px";w.style.marginLeft="24px";w.setAttribute("disabled","disabled");w.setAttribute("type","checkbox");f&&(g.appendChild(w),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),
-n+=26,mxEvent.addListener(v,"change",function(){v.checked?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}));k.isSelectionEmpty()||(w.setAttribute("checked","checked"),w.defaultChecked=!0);var A=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(g.appendChild(C),mxUtils.write(g,
-mxResources.get("embedImages")),mxUtils.br(g),n+=26);var L=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=m),D=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(g,D?mxResources.get("allPages"):"",D,!D,null,"jpeg"!=m);I.style.marginLeft="24px";I.style.marginBottom="16px";D||(I.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&D?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});h&&D||I.setAttribute("disabled",
-"disabled");a=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=p.value;e(p.value,q.checked,!v.checked,A.checked,L.checked,C.checked,u.value,w.checked,!I.checked)}),null,c,d);this.showDialog(a.container,340,n,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var g=document.createElement("div");
-g.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var f=document.createElement("h3");mxUtils.write(f,b);f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";g.appendChild(f)}var n=this.addCheckbox(g,mxResources.get("fit"),!0),h=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible&&d,!d),m=this.addCheckbox(g,c),l=this.addCheckbox(g,mxResources.get("lightbox"),!0),p=this.addEditButton(g,l),u=p.getEditInput(),B=1<k.model.getChildCount(k.model.getRoot()),
-G=this.addCheckbox(g,mxResources.get("layers"),B,!B);G.style.marginLeft=u.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(B&&G.removeAttribute("disabled"),u.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&l.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,
-function(){a(n.checked,h.checked,m.checked,l.checked,p.getLink(),G.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,h,m){function g(b){var g=" ",n="";d&&(g=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');h('<img src="'+b+'"'+t+(""!=n?' style="'+n+'"':"")+g+"/>")}var k=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),
-null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var l=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));l.send(mxUtils.bind(this,function(){200<=l.getStatus()&&299>=l.getStatus()?g("data:image/png;base64,"+l.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,h){var g=this.editor.graph.getSvg(),k=g.getElementsByTagName("a");if(null!=k)for(var n=0;n<k.length;n++){var m=k[n].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==k[n].getAttribute("target")&&k[n].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var l=" ",p="";d&&(l="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+l+"/>")}))}else p="",d&&(g.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=p&&g.setAttribute("style",p),h(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
+"frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||
+mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,h,l){var f=this.getCurrentFile(),k=[];d&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&k.push("edit="+encodeURIComponent(e)),g&&
+k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&k.push("page="+a);break}a=!0;null!=h?c="#U"+encodeURIComponent(h):(f=this.getCurrentFile(),l||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+f.getHash(),a=!1));
+a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&k.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<k.length?"?"+k.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,h,l,m,t,x){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);m||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;
+c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];h&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);l&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),f.toolbar=c.join(" "));null!=t&&0<t.length&&(f.edit=t);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!h);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):"";x(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.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";e.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value",
+"copy");k.appendChild(f);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(n);mxUtils.br(k);k.appendChild(g);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));k.appendChild(n);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href","javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),
+k.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var h=this.addLinkSection(e),l=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight=
+"12px";m.value="100%";e.appendChild(m);var u=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(e,mxResources.get("allPages"),k,!k),G=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),A=this.addEditButton(e,F),B=A.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&F.checked?
+A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,l.checked,m.value,h.getTarget(),h.getColor(),u.checked,D.checked,G.checked,F.checked,A.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=document.createElement("h3");
+mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(k);var n=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384",t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var h=document.createElement("div");h.style.whiteSpace="normal";mxUtils.write(h,mxResources.get("linkAccountRequired"));t.appendChild(h);h=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));h.style.marginTop="12px";h.className="geBtn";t.appendChild(h);f.appendChild(t);h=document.createElement("a");h.style.paddingLeft="12px";h.style.color="gray";h.style.fontSize="11px";h.setAttribute("href","javascript:void(0);");mxUtils.write(h,mxResources.get("check"));
+t.appendChild(h);mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,m=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),l=document.createElement("input"),
+l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",f.appendChild(l),mxUtils.write(f,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",f.appendChild(m),mxUtils.br(f);var p=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==n||n.constructor!=window.DriveFile||b)u=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var q=this.addCheckbox(f,mxResources.get("lightbox"),!0),F=this.addEditButton(f,q),A=F.getEditInput(),B=this.addCheckbox(f,mxResources.get("layers"),!0);B.style.marginLeft=A.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(B.removeAttribute("disabled"),A.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),A.setAttribute("disabled",
+"disabled"));A.checked&&q.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(p.getTarget(),p.getColor(),null==u?!0:u.checked,q.checked,F.getLink(),B.checked,null!=l?l.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():
+document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var k=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=g&&(g.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!k.checked,null!=g?g.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,h,l){h=null!=h?h:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=this.editor.graph,n="jpeg"==l?196:300,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+f.appendChild(m);mxUtils.write(f,mxResources.get("zoom")+":");var 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%";f.appendChild(p);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"),k.background==mxConstants.NONE||null==k.background,null,null,"jpeg"!=l),w=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.style.marginLeft="24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");g&&(f.appendChild(v),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),
+n+=26,mxEvent.addListener(w,"change",function(){w.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));k.isSelectionEmpty()||(v.setAttribute("checked","checked"),v.defaultChecked=!0);var A=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");b&&(f.appendChild(B),mxUtils.write(f,
+mxResources.get("embedImages")),mxUtils.br(f),n+=26);var L=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=l),C=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(f,C?mxResources.get("allPages"):"",C,!C,null,"jpeg"!=l);I.style.marginLeft="24px";I.style.marginBottom="16px";C||(I.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&C?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});h&&C||I.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=p.value;e(p.value,q.checked,!w.checked,A.checked,L.checked,B.checked,u.value,v.checked,!I.checked)}),null,c,d);this.showDialog(a.container,340,n,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");
+f.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var n=this.addCheckbox(f,mxResources.get("fit"),!0),t=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible&&d,!d),h=this.addCheckbox(f,c),l=this.addCheckbox(f,mxResources.get("lightbox"),!0),m=this.addEditButton(f,l),p=m.getEditInput(),u=1<k.model.getChildCount(k.model.getRoot()),
+G=this.addCheckbox(f,mxResources.get("layers"),u,!u);G.style.marginLeft=p.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(u&&G.removeAttribute("disabled"),p.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"));p.checked&&l.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,
+function(){a(n.checked,t.checked,h.checked,l.checked,m.getLink(),G.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,h,l){function f(b){var f=" ",n="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');h('<img src="'+b+'"'+t+(""!=n?' style="'+n+'"':"")+f+"/>")}var k=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");f(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),
+null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?f("data:image/png;base64,"+m.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,h){var f=this.editor.graph.getSvg(),k=f.getElementsByTagName("a");if(null!=k)for(var n=0;n<k.length;n++){var l=k[n].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==k[n].getAttribute("target")&&k[n].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var m=" ",p="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",d&&(f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=p&&f.setAttribute("style",p),h(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){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],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
-e=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),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),g=d.getGlobalVariable,k=this.pages[0];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)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var g=c.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(g.substring(g.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,c,d,e,f,h){h=b.background;h==mxConstants.NONE&&(h=null);b=b.getSvg(h,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f,h,m,l){l=null!=l?l:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,l)}catch(H){"Invalid image"==H.message?this.downloadFile(l):this.handleError(H)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,f,h)}catch(x){this.spinner.stop(),this.handleError(x)}}};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,e={},g=mxUtils.bind(this,function(){if(0==d){for(var g=[c[0]],k=1;k<c.length;k++){var f=
-c[k].indexOf(")");g.push('url("');g.push(e[b(c[k].substring(0,f))]);g.push('"'+c[k].substring(f))}this.editor.resolvedFontCss=g.join("");a()}});if(0<c.length)for(var f=1;f<c.length;f++){var h=c[f].indexOf(")"),l=null,t=c[f].indexOf("format(",h);0<t&&(l=b(c[f].substring(t+7,c[f].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b=
-"application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;g()}),mxUtils.bind(this,
-function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[f].substring(0,h)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,h,l,m,t,x,H,E,y){f=null!=f?f:!0;H=null!=H?H:this.editor.graph;E=null!=E?E:0;var g=m?null:H.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==m&&(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(H.getSvg(g,null,null,y,null,null!=h?h:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,
-function(){try{var k=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),h=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*h),b/n)):b/n);n=Math.ceil(l*n)+2*E;h=Math.ceil(l*h)+2*E;k.setAttribute("width",n);k.setAttribute("height",h);var t=k.getContext("2d");null!=g&&(t.beginPath(),t.rect(0,0,n,h),t.fillStyle=g,t.fill());t.scale(l,l);t.drawImage(d,E/l,E/l);a(k)}catch(M){null!=e&&e(M)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);
-var k=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(H,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(C){null!=e&&e(C)}}),c,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
-c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,
-function(c,f){for(var k=a.getElementsByTagName(c),h=0;h<k.length;h++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(f));if(null!=k&&"data:"!=k.substring(0,5)){var h=g[k];null==h?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(g[k]=d,c.setAttribute(f,d));e--;0==e&&b(a)})):c.setAttribute(f,h)}else null!=k&&c.setAttribute(f,k)})(k[h])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,f){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
-/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var k=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}f=null!=f?f:"data:image/png;base64,";d=f+this.base64Encode(d)}b(d)}}else null!=
-c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})})});k()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,
+e=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),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,k=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,c,d,e,g,h){h=b.background;h==mxConstants.NONE&&(h=null);b=b.getSvg(h,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,h,l,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,m)}catch(H){"Invalid image"==H.message?this.downloadFile(m):this.handleError(H)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,h)}catch(x){this.spinner.stop(),this.handleError(x)}}};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,e={},f=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],g=1;g<c.length;g++){var k=
+c[g].indexOf(")");f.push('url("');f.push(e[b(c[g].substring(0,k))]);f.push('"'+c[g].substring(k))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var h=c[g].indexOf(")"),l=null,t=c[g].indexOf("format(",h);0<t&&(l=b(c[g].substring(t+7,c[g].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b=
+"application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;f()}),mxUtils.bind(this,
+function(a){d--;f()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,h)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,h,l,m,t,x,H,E,y){g=null!=g?g:!0;H=null!=H?H:this.editor.graph;E=null!=E?E:0;var f=m?null:H.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==m&&(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(H.getSvg(f,null,null,y,null,null!=h?h:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,
+function(){try{var k=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),h=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*h),b/n)):b/n);n=Math.ceil(l*n)+2*E;h=Math.ceil(l*h)+2*E;k.setAttribute("width",n);k.setAttribute("height",h);var t=k.getContext("2d");null!=f&&(t.beginPath(),t.rect(0,0,n,h),t.fillStyle=f,t.fill());t.scale(l,l);t.drawImage(d,E/l,E/l);a(k)}catch(M){null!=e&&e(M)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);
+var k=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(H,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(B){null!=e&&e(B)}}),c,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
+c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,
+function(c,g){for(var k=a.getElementsByTagName(c),n=0;n<k.length;n++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var n=f[k];null==n?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,n)}else null!=k&&c.setAttribute(g,k)})(k[n])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g){try{var f=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
+/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var k=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=
+c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})})});k()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,
23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),
-e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(w){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),h=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var n=h.getElementsByTagName("diagram");
-if(1==n.length)h=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate();try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,l,l,m))}}finally{f.model.endUpdate()}}}null!=h&&"mxGraphModel"===h.nodeName&&(g=f.importGraphModel(h,b,c,d))}}catch(E){throw e||this.handleError(E,mxResources.get("invalidOrMissingFile")),
-E;}return g};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.append("file1",a);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{this.doImportVisio(g.response,
-b,c)}catch(v){c(v)}else c({})});g.send(e)}else try{this.doImportVisio(a,b,c)}catch(v){c(v)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(k){this.handleError(k)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
-this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(w){this.handleError(w)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(g,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",g):mxscript("js/extensions.min.js",
-g))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var g in e.Pages)a.push(e.Pages[g]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(e);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,d),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
-EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f,h){f=null!=f?f:!0;h=null!=h?h:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=
-this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),n=this.importXml(k,b,c,f,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),n=this.importXml(k,b,c,f,!0),0<n.length)return n}catch(x){}this.loadImage(a,mxUtils.bind(this,
-function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),h,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,
-null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
-if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,f);else{g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,h,l,m,t,x){t=null!=t?t:!0;var g=!1,k=null,n=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,h)):b=this.importXml(a,c,d,t);null!=l&&l(b)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,t),m=
-!0)),m||(k=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&k.isGridEnabled()&&(c=k.snap(c),d=k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,t);null!=l&&l(a)})):null!=
-m&&null!=h&&(/(\.vsdx)($|\?)/i.test(h)||/(\.vssx)($|\?)/i.test(h)||/(\.vsd)($|\?)/i.test(h))?(g=!0,this.importVisio(m,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(g=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=l&&l(null))}),h)):/(\.vsd)($|\?)/i.test(h)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));g||null==l||l(k);
-return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,f;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}f=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(f&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return b};
-EditorUi.prototype.importFiles=function(a,b,c,d,e,f,h,l,m,t,x,H){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var g=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=x||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>p){n=!0;break}var u=mxUtils.bind(this,function(){var n=this.editor.graph,m=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,k,h,n){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,f,k,h,n,g,H)});f=null!=f?f:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,u=[],v=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=l)l(u);else{var c=[];n.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{n.getModel().endUpdate()}}f(c)}}),
-w=0;w<p;w++)mxUtils.bind(this,function(g){var f=a[g],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(f))if("image/"==f.type.substring(0,6))if("image/svg"==f.type.substring(0,9)){var l=a.target.result,p=l.indexOf(","),q=decodeURIComponent(escape(atob(l.substring(p+1)))),u=mxUtils.parseXml(q),q=u.getElementsByTagName("svg");if(0<q.length){var q=q[0],C=H?null:q.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));
-null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?v(g,mxUtils.bind(this,function(){try{if(l.substring(0,p+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var h=a[0],t=parseFloat(h.getAttribute("width")),q=parseFloat(h.getAttribute("height")),x=h.getAttribute("viewBox");if(null==x||0==x.length)h.setAttribute("viewBox","0 0 "+t+" "+q);else if(isNaN(t)||isNaN(q)){var v=x.split(" ");3<v.length&&(t=parseFloat(v[2]),
-q=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var C=Math.min(1,Math.min(d/Math.max(1,t)),d/Math.max(1,q)),D=e(l,f.type,b+g*m,c+g*m,Math.max(1,Math.round(t*C)),Math.max(1,Math.round(q*C)),f.name,k);if(isNaN(t)||isNaN(q)){var w=new Image;w.onload=mxUtils.bind(this,function(){t=Math.max(1,w.width);q=Math.max(1,w.height);D[0].geometry.width=t;D[0].geometry.height=q;h.setAttribute("viewBox","0 0 "+t+" "+q);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,
-a)+l.substring(l.indexOf(",",a+1)));n.setCellStyles("image",l,[D[0]])});w.src=this.createSvgDataUri(mxUtils.getXml(h))}return D}}}catch(ka){}return null})):v(g,mxUtils.bind(this,function(){return e(C,"text/xml",b+g*m,c+g*m,0,0,f.name)}))}}else{q=!1;if("image/png"==f.type){var D=H?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var w=new Image;w.src=a.target.result;v(g,mxUtils.bind(this,function(){return e(D,"text/xml",b+g*m,c+g*m,w.width,w.height,f.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?
-(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,n,l){v(g,mxUtils.bind(this,function(){if(null!=h&&h.length<t){var p=k&&this.isResampleImage(a.target.result,x)?Math.min(1,
-Math.min(d/n,d/l)):1;return e(h,f.type,b+g*m,c+g*m,Math.round(n*p),Math.round(l*p),f.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,x)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,f.type,b+g*m,c+g*m,240,160,f.name,function(a){v(g,function(){return a})})});/(\.vsdx)($|\?)/i.test(f.name)||/(\.vssx)($|\?)/i.test(f.name)||/(\.vsd)($|\?)/i.test(f.name)?e(null,f.type,b+g*m,c+g*m,240,160,
-f.name,function(a){v(g,function(){return a})},f):"image"==f.type.substring(0,5)?l.readAsDataURL(f):l.readAsText(f)})(w)});n?this.confirmImageResize(function(a){k=a;u()},m):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||
+e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),h=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var n=h.getElementsByTagName("diagram");
+if(1==n.length)h=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){g.model.beginUpdate();try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));g.model.execute(new ChangePage(this,l,l,m))}}finally{g.model.endUpdate()}}}null!=h&&"mxGraphModel"===h.nodeName&&(f=g.importGraphModel(h,b,c,d))}}catch(E){throw e||this.handleError(E,mxResources.get("invalidOrMissingFile")),
+E;}return f};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.append("file1",a);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,c)}catch(w){c(w)}else c({})});f.send(e)}else try{this.doImportVisio(a,b,c)}catch(w){c(w)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(k){this.handleError(k)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
+this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(v){this.handleError(v)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",f):mxscript("js/extensions.min.js",
+f))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var f in e.Pages)a.push(e.Pages[f]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(e);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,d),null!=this.pages){var g=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(g)}}finally{this.editor.graph.getModel().endUpdate()}}};
+EditorUi.prototype.insertTextAt=function(a,b,c,d,e,g,h){g=null!=g?g:!0;h=null!=h?h:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=
+this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),n=this.importXml(k,b,c,g,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),n=this.importXml(k,b,c,g,!0),0<n.length)return n}catch(x){}this.loadImage(a,mxUtils.bind(this,
+function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(b),f.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),h,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),g=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,
+null,"",f.snap(b),f.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,a,f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
+if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,g);else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(b),f.snap(c),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,f.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(e.value)&&
+f.setLinkForCell(e,e.value),e.geometry.width+=f.gridSize,e.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,d,e,g,h,l,m,t,x){t=null!=t?t:!0;var f=!1,k=null,n=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,h)):b=this.importXml(a,c,d,t);null!=l&&l(b)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,t),m=
+!0)),m||(k=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&k.isGridEnabled()&&(c=k.snap(c),d=k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,t);null!=l&&l(a)})):null!=
+m&&null!=h&&(/(\.vsdx)($|\?)/i.test(h)||/(\.vssx)($|\?)/i.test(h)||/(\.vsd)($|\?)/i.test(h))?(f=!0,this.importVisio(m,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(f=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=l&&l(null))}),h)):/(\.vsd)($|\?)/i.test(h)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));f||null==l||l(k);
+return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};
+EditorUi.prototype.importFiles=function(a,b,c,d,e,g,h,l,m,t,x,H){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=x||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>p){n=!0;break}var u=mxUtils.bind(this,function(){var n=this.editor.graph,m=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,h,n){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,h,n,f,H)});g=null!=g?g:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=l)l(u);else{var c=[];n.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{n.getModel().endUpdate()}}g(c)}}),
+v=0;v<p;v++)mxUtils.bind(this,function(f){var g=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,p=l.indexOf(","),q=decodeURIComponent(escape(atob(l.substring(p+1)))),u=mxUtils.parseXml(q),q=u.getElementsByTagName("svg");if(0<q.length){var q=q[0],B=H?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)?w(f,mxUtils.bind(this,function(){try{if(l.substring(0,p+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var h=a[0],t=parseFloat(h.getAttribute("width")),q=parseFloat(h.getAttribute("height")),x=h.getAttribute("viewBox");if(null==x||0==x.length)h.setAttribute("viewBox","0 0 "+t+" "+q);else if(isNaN(t)||isNaN(q)){var w=x.split(" ");3<w.length&&(t=parseFloat(w[2]),
+q=parseFloat(w[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var B=Math.min(1,Math.min(d/Math.max(1,t)),d/Math.max(1,q)),C=e(l,g.type,b+f*m,c+f*m,Math.max(1,Math.round(t*B)),Math.max(1,Math.round(q*B)),g.name,k);if(isNaN(t)||isNaN(q)){var v=new Image;v.onload=mxUtils.bind(this,function(){t=Math.max(1,v.width);q=Math.max(1,v.height);C[0].geometry.width=t;C[0].geometry.height=q;h.setAttribute("viewBox","0 0 "+t+" "+q);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,
+a)+l.substring(l.indexOf(",",a+1)));n.setCellStyles("image",l,[C[0]])});v.src=this.createSvgDataUri(mxUtils.getXml(h))}return C}}}catch(ka){}return null})):w(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*m,c+f*m,0,0,g.name)}))}}else{q=!1;if("image/png"==g.type){var C=H?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var v=new Image;v.src=a.target.result;w(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*m,c+f*m,v.width,v.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(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,n,l){w(f,mxUtils.bind(this,function(){if(null!=h&&h.length<t){var p=k&&this.isResampleImage(a.target.result,x)?Math.min(1,
+Math.min(d/n,d/l)):1;return e(h,g.type,b+f*m,c+f*m,Math.round(n*p),Math.round(l*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,x)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*m,c+f*m,240,160,g.name,function(a){w(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)||/(\.vsd)($|\?)/i.test(g.name)?e(null,g.type,b+f*m,c+f*m,240,160,
+g.name,function(a){w(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(v)});n?this.confirmImageResize(function(a){k=a;u()},m):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||
b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format",
-"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var h=Math.max(g/e,k/e);if(1<h){var t=Math.round(g/h),n=Math.round(k/h),l=document.createElement("canvas");
-l.width=t;l.height=n;l.getContext("2d").drawImage(a,0,0,t,n);var m=l.toDataURL();if(m.length<b.length){var p=document.createElement("canvas");p.width=t;p.height=n;var q=p.toDataURL();m!==q&&(b=m,g=t,k=n)}}}catch(G){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
-function(a,b,c,d,e){function g(a,b){var c=h;h+=b;return a.substring(c,h)}function f(a){a=g(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 h=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,
-h);do{var t=f(a);if("IDAT"==g(a,4)){e=a.substring(0,h-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(h-8,a.length);break}e+=a.substring(h-8,h-4+t);g(a,t);g(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&
+"xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var h=Math.max(f/e,k/e);if(1<h){var t=Math.round(f/h),n=Math.round(k/h),l=document.createElement("canvas");
+l.width=t;l.height=n;l.getContext("2d").drawImage(a,0,0,t,n);var m=l.toDataURL();if(m.length<b.length){var p=document.createElement("canvas");p.width=t;p.height=n;var q=p.toDataURL();m!==q&&(b=m,f=t,k=n)}}}catch(G){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
+function(a,b,c,d,e){function f(a,b){var c=h;h+=b;return a.substring(c,h)}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 h=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,
+h);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,h-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(h-8,a.length);break}e+=a.substring(h-8,h-4+t);f(a,t);f(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&
!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(p){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
-null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,
+null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,
c){a(c.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,
-arguments)};var e=c.addClickHandler;c.addClickHandler=function(b,d,g){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};e.call(this,b,d,g)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
-360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var l=c.createLinkForHint;c.createLinkForHint=function(d,e){var g=c.isPageLink(d);if(g){var f=d.indexOf(",");0<f&&(f=b.getPageById(d.substring(f+1)),e=null!=
-f?f.getName():mxResources.get("pageNotFound"))}f=l.call(this,d,e);g&&mxEvent.addListener(f,"click",function(b){a(d);mxEvent.consume(b)});return f};var m=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var g=d.getAttribute("href");if(null==g||!c.isPageLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))m.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(g),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
+arguments)};var e=c.addClickHandler;c.addClickHandler=function(b,d,f){var g=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=g&&g(b,d)};e.call(this,b,d,f)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
+360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var l=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=
+g?g.getName():mxResources.get("pageNotFound"))}g=l.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var m=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))m.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.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_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var g=c.items;
-for(index in g){var f=g[index];if("file"===f.kind){if(b.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace=
+this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;
+for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace=
"nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var H=!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 b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==
b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||H||(x.style.left=c.container.scrollLeft+10+"px",x.style.top=c.container.scrollTop+10+"px",c.container.appendChild(x),H=!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 b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!H||
224!=b&&17!=b&&91!=b||(H=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(x),t())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(x,!0),t())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),
window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var E=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!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,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==
-typeof mxRuler){z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="250px";z.style.width="2000px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);var y=document.createElement("div");y.style.position="absolute";y.style.top="125px";y.style.left="220px";y.style.width="30px";y.style.height="1000px";y.style.background="whiteSmoke";document.body.appendChild(y);var B=document.createElement("div");B.style.position="absolute";B.style.top=
-"95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,y,!0);this.hRuler=new mxRuler(this.editor.graph,z,!1)}if("1"==urlParams.test){z=document.getElementById("geFooter");null!=z&&(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=
+typeof mxRuler){z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="250px";z.style.width="2000px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);var y=document.createElement("div");y.style.position="absolute";y.style.top="125px";y.style.left="220px";y.style.width="30px";y.style.height="1000px";y.style.background="whiteSmoke";document.body.appendChild(y);var D=document.createElement("div");D.style.position="absolute";D.style.top=
+"95px";D.style.left="220px";D.style.width="30px";D.style.height="30px";D.style.background="whiteSmoke";document.body.appendChild(D);this.vRuler=new mxRuler(this.editor.graph,y,!0);this.hRuler=new mxRuler(this.editor.graph,z,!1)}if("1"==urlParams.test){z=document.getElementById("geFooter");null!=z&&(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)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=c.view.translate,e=c.view.scale,g=b.x/e-d.x,f=b.y/e-d.y;mxEvent.isAltDown(a)&&(f=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,g,f,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,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var t=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(h=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(t=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(h=b[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(h,g,f,!0,t,null,l))});t&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
-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 b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,
-g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var t=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(h=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(t=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(h=b[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(h,f,g,!0,t,null,l))});t&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
+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 b=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,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,
+f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,
!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||
-8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var f=e.lastIndexOf("%3E");0<=f&&f<e.length-3&&(e=e.substring(0,f+3))}catch(z){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(g=!0,e=h)}catch(z){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,
-c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,g.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(z){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(z){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(z){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,
+c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(z){}}}}};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?"https://www.draw.io/":"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,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=
-Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=
-function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var g=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(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?g(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
+EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=
+Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=
+function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,
+mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
this.spinner.stop()}));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(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,
function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,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))});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(){this.confirm(mxResources.get("allChangesLost"),
null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};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),g=0;g<e;g++)this.addBasenamesForCell(d.model.getChildAt(a,g),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=
+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")};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,
-scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};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(g){function h(a){if(null!=
-a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(I){}return a}if(g.source==(window.opener||window.parent)){var k=g.data;if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(D){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();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&f.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){l=null;l="data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):h(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();f.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();f.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(D){f.postMessage(JSON.stringify({event:"draft",error:D.toString(),message:k}),"*")}return}if("template"==
-k.action){this.spinner.stop();var l=1==k.enableRecent,m=1==k.enableSearch,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?f.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;f.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;f.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){f.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,
+scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=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){function h(a){if(null!=
+a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(I){}return a}if(f.source==(window.opener||window.parent)){var k=f.data;if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(C){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();var 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){l=null;l="data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):h(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),l,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(C){g.postMessage(JSON.stringify({event:"draft",error:C.toString(),message:k}),"*")}return}if("template"==
+k.action){this.spinner.stop();var l=1==k.enableRecent,m=1==k.enableSearch,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.recentReadyCallback=a;g.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;g.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,
k.errorMsg);else{if("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 p=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(p);f.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(this.editor.graph.compress(p))));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()),w=q.getGlobalVariable,C=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);
-q.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,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).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.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var p=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(p);g.postMessage(JSON.stringify(b),"*")}),w=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));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,B=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(q.container);
+q.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=
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)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),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);f.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));f.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)}f.postMessage(JSON.stringify(n),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=
+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&&(l=document.createElement("span"),mxUtils.write(l,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.xml&&"data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):k.xml;else{f.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}}k=h(k);c=!0;try{a(k,g)}catch(D){this.handleError(D)}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 g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(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||f.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var f=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";f.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
+this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.xml&&"data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):k.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}}k=h(k);c=!0;try{a(k,f)}catch(C){this.handleError(C)}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")),"*")}}));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");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,f="",h="auto",l="auto",m=null,x=null,H=40,E=40,y=0,B=this.editor.graph;
-B.getGraphBounds();for(var G=function(){B.setSelectionCells(U);B.scrollCellToVisible(B.getSelectionCell())},F=B.getFreeInsertPoint(),A=F.x,C=F.y,F=C,L=null,D="auto",I=[],M=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var P=mxUtils.trim(a.substring(1,R)),O=mxUtils.trim(a.substring(R+1));"label"==P?L=B.sanitizeHtml(O):
-"style"==P?e=O:"identity"==P&&0<O.length&&"-"!=O?g=O:"namespace"==P&&0<O.length&&"-"!=O?f=O:"width"==P?h=O:"height"==P?l=O:"left"==P&&0<O.length?m=O:"top"==P&&0<O.length?x=O:"ignore"==P?V=O.split(","):"connect"==P?I.push(JSON.parse(O)):"link"==P?M=O:"padding"==P?y=parseFloat(O):"edgespacing"==P?H=parseFloat(O):"nodespacing"==P?E=parseFloat(O):"layout"==P&&(D=O)}}}var K=this.editor.csvToArray(b[T]);a=null;if(null!=g)for(var Q=0;Q<K.length;Q++)if(g==K[Q]){a=Q;break}null==L&&(L="%"+K[0]+"%");if(null!=
-I)for(var S=0;S<I.length;S++)null==d[I[S].to]&&(d[I[S].to]={});B.model.beginUpdate();try{for(Q=T+1;Q<b.length;Q++){var Y=this.editor.csvToArray(b[Q]);if(Y.length==K.length){var J=null,aa=null!=a?f+Y[a]:null;null!=aa&&(J=B.model.getCell(aa));null==J&&(J=new mxCell(L,new mxGeometry(A,F,0,0),e||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=aa);for(var N=0;N<Y.length;N++)B.setAttributeForCell(J,K[N],Y[N]);B.setAttributeForCell(J,"placeholders","1");J.style=B.replacePlaceholders(J,J.style);for(S=0;S<I.length;S++)d[I[S].to][J.getAttribute(I[S].to)]=
-J;null!=M&&"link"!=M&&(B.setLinkForCell(J,J.getAttribute(M)),B.setAttributeForCell(J,M,null));B.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var X=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=m&&null!=J.getAttribute(m)&&(J.geometry.x=A+parseFloat(J.getAttribute(m))),null!=x&&null!=J.getAttribute(x)&&(J.geometry.y=C+parseFloat(J.getAttribute(x))),"@"==h.charAt(0)&&null!=J.getAttribute(h.substring(1))?J.geometry.width=parseFloat(J.getAttribute(h.substring(1))):J.geometry.width=
-"auto"==h?X.width+y:parseFloat(h),"@"==l.charAt(0)&&null!=J.getAttribute(l.substring(1))?J.geometry.height=parseFloat(J.getAttribute(l.substring(1))):J.geometry.height="auto"==l?X.height+y:parseFloat(l),F+=J.geometry.height+E);c.push(B.addCell(J))}}for(var Z=c.slice(),U=c.slice(),S=0;S<I.length;S++)for(var W=I[S],Q=0;Q<c.length;Q++){var J=c[Q],ha=J.getAttribute(W.from);if(null!=ha){B.setAttributeForCell(J,W.from,null);for(var ia=ha.split(","),N=0;N<ia.length;N++){var ba=d[W.to][ia[N]];null!=ba&&(L=
-W.label,null!=W.fromlabel&&(L=(J.getAttribute(W.fromlabel)||"")+(L||"")),null!=W.tolabel&&(L=(L||"")+(ba.getAttribute(W.tolabel)||"")),U.push(B.insertEdge(null,null,L||"",W.invert?ba:J,W.invert?J:ba,W.style||B.createCurrentEdgeStyle())),mxUtils.remove(W.invert?J:ba,Z))}}}if(null!=V)for(Q=0;Q<c.length;Q++)for(J=c[Q],N=0;N<V.length;N++)B.setAttributeForCell(J,mxUtils.trim(V[N]),null);var da=new mxParallelEdgeLayout(B);da.spacing=H;var ja=function(){da.execute(B.getDefaultParent());for(var a=0;a<c.length;a++){var b=
-B.getCellGeometry(c[a]);b.x=Math.round(B.snap(b.x));b.y=Math.round(B.snap(b.y));"auto"==h&&(b.width=Math.round(B.snap(b.width)));"auto"==l&&(b.height=Math.round(B.snap(b.height)))}};if("circle"==D){var ea=new mxCircleLayout(B);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(B.getDefaultParent());ja()},!0,G);G=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&U.length==
-2*c.length-1&&1==Z.length){B.view.validate();var fa=new mxCompactTreeLayout(B,"horizontaltree"==D);fa.levelDistance=E;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(B.getDefaultParent(),0<Z.length?Z[0]:null)},!0,G);G=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==Z.length){B.view.validate();var ga=new mxHierarchicalLayout(B,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(B.getDefaultParent(),
-U);B.moveCells(U,A,C)},!0,G);G=null}else if("organic"==D||"auto"==D&&U.length>c.length){B.view.validate();var ca=new mxFastOrganicLayout(B);ca.forceConstant=3*E;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(B);da.spacing=H;this.executeLayout(function(){ca.execute(B.getDefaultParent());ja()},!0,G);G=null}this.hideDialog()}finally{B.model.endUpdate()}null!=G&&G()}}catch(ma){this.handleError(ma)}};
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f=null,g="",h="auto",l="auto",m=null,x=null,H=40,E=40,y=0,D=this.editor.graph;
+D.getGraphBounds();for(var G=function(){D.setSelectionCells(U);D.scrollCellToVisible(D.getSelectionCell())},F=D.getFreeInsertPoint(),A=F.x,B=F.y,F=B,L=null,C="auto",I=[],M=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var P=mxUtils.trim(a.substring(1,R)),O=mxUtils.trim(a.substring(R+1));"label"==P?L=D.sanitizeHtml(O):
+"style"==P?e=O:"identity"==P&&0<O.length&&"-"!=O?f=O:"namespace"==P&&0<O.length&&"-"!=O?g=O:"width"==P?h=O:"height"==P?l=O:"left"==P&&0<O.length?m=O:"top"==P&&0<O.length?x=O:"ignore"==P?V=O.split(","):"connect"==P?I.push(JSON.parse(O)):"link"==P?M=O:"padding"==P?y=parseFloat(O):"edgespacing"==P?H=parseFloat(O):"nodespacing"==P?E=parseFloat(O):"layout"==P&&(C=O)}}}var K=this.editor.csvToArray(b[T]);a=null;if(null!=f)for(var Q=0;Q<K.length;Q++)if(f==K[Q]){a=Q;break}null==L&&(L="%"+K[0]+"%");if(null!=
+I)for(var S=0;S<I.length;S++)null==d[I[S].to]&&(d[I[S].to]={});D.model.beginUpdate();try{for(Q=T+1;Q<b.length;Q++){var Y=this.editor.csvToArray(b[Q]);if(Y.length==K.length){var J=null,aa=null!=a?g+Y[a]:null;null!=aa&&(J=D.model.getCell(aa));null==J&&(J=new mxCell(L,new mxGeometry(A,F,0,0),e||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=aa);for(var N=0;N<Y.length;N++)D.setAttributeForCell(J,K[N],Y[N]);D.setAttributeForCell(J,"placeholders","1");J.style=D.replacePlaceholders(J,J.style);for(S=0;S<I.length;S++)d[I[S].to][J.getAttribute(I[S].to)]=
+J;null!=M&&"link"!=M&&(D.setLinkForCell(J,J.getAttribute(M)),D.setAttributeForCell(J,M,null));D.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var X=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=m&&null!=J.getAttribute(m)&&(J.geometry.x=A+parseFloat(J.getAttribute(m))),null!=x&&null!=J.getAttribute(x)&&(J.geometry.y=B+parseFloat(J.getAttribute(x))),"@"==h.charAt(0)&&null!=J.getAttribute(h.substring(1))?J.geometry.width=parseFloat(J.getAttribute(h.substring(1))):J.geometry.width=
+"auto"==h?X.width+y:parseFloat(h),"@"==l.charAt(0)&&null!=J.getAttribute(l.substring(1))?J.geometry.height=parseFloat(J.getAttribute(l.substring(1))):J.geometry.height="auto"==l?X.height+y:parseFloat(l),F+=J.geometry.height+E);c.push(D.addCell(J))}}for(var Z=c.slice(),U=c.slice(),S=0;S<I.length;S++)for(var W=I[S],Q=0;Q<c.length;Q++){var J=c[Q],ha=J.getAttribute(W.from);if(null!=ha){D.setAttributeForCell(J,W.from,null);for(var ia=ha.split(","),N=0;N<ia.length;N++){var ba=d[W.to][ia[N]];null!=ba&&(L=
+W.label,null!=W.fromlabel&&(L=(J.getAttribute(W.fromlabel)||"")+(L||"")),null!=W.tolabel&&(L=(L||"")+(ba.getAttribute(W.tolabel)||"")),U.push(D.insertEdge(null,null,L||"",W.invert?ba:J,W.invert?J:ba,W.style||D.createCurrentEdgeStyle())),mxUtils.remove(W.invert?J:ba,Z))}}}if(null!=V)for(Q=0;Q<c.length;Q++)for(J=c[Q],N=0;N<V.length;N++)D.setAttributeForCell(J,mxUtils.trim(V[N]),null);var da=new mxParallelEdgeLayout(D);da.spacing=H;var ja=function(){da.execute(D.getDefaultParent());for(var a=0;a<c.length;a++){var b=
+D.getCellGeometry(c[a]);b.x=Math.round(D.snap(b.x));b.y=Math.round(D.snap(b.y));"auto"==h&&(b.width=Math.round(D.snap(b.width)));"auto"==l&&(b.height=Math.round(D.snap(b.height)))}};if("circle"==C){var ea=new mxCircleLayout(D);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(D.getDefaultParent());ja()},!0,G);G=null}else if("horizontaltree"==C||"verticaltree"==C||"auto"==C&&U.length==
+2*c.length-1&&1==Z.length){D.view.validate();var fa=new mxCompactTreeLayout(D,"horizontaltree"==C);fa.levelDistance=E;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(D.getDefaultParent(),0<Z.length?Z[0]:null)},!0,G);G=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==Z.length){D.view.validate();var ga=new mxHierarchicalLayout(D,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(D.getDefaultParent(),
+U);D.moveCells(U,A,B)},!0,G);G=null}else if("organic"==C||"auto"==C&&U.length>c.length){D.view.validate();var ca=new mxFastOrganicLayout(D);ca.forceConstant=3*E;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(D);da.spacing=H;this.executeLayout(function(){ca.execute(D.getDefaultParent());ja()},!0,G);G=null}this.hideDialog()}finally{D.model.endUpdate()}null!=G&&G()}}catch(ma){this.handleError(ma)}};
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,440,130,!0,!0);a.init()};var h=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=h.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*
@@ -7378,9 +7378,9 @@ IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.
EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());
-a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==
-c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=g.getGraphBounds(),l=Math.floor(k.width*e/g.view.scale),m=Math.floor(k.height*e/g.view.scale);h.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+f+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,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},
+a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,g){var f=a.editor.graph;if("xml"==
+c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=f.getGraphBounds(),l=Math.floor(k.width*e/f.view.scale),m=Math.floor(k.height*e/f.view.scale);h.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+
+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+g+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=
a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins=
a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle},
@@ -7394,30 +7394,30 @@ mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.sett
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,b,d,c,e){};
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
-mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,b,d,c){};mxAsyncCanvas.prototype.roundrect=function(a,b,d,c,e,f){};mxAsyncCanvas.prototype.ellipse=function(a,b,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxAsyncCanvas.prototype.image=function(a,b,d,c,e,f,h,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,b,d,c,e,f,h,l,m,g,k,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var u=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[u]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,b,d,c){};mxAsyncCanvas.prototype.roundrect=function(a,b,d,c,e,g){};mxAsyncCanvas.prototype.ellipse=function(a,b,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
+mxAsyncCanvas.prototype.image=function(a,b,d,c,e,g,h,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,b,d,c,e,g,h,l,m,f,k,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var u=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[u]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,d,c,e){return d+d+c+c+e+e});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b;this.ctx.translate(a,b)};
mxJsCanvas.prototype.rotate=function(a,b,d,c,e){c-=this.state.dx;e-=this.state.dy;this.ctx.translate(c,e);(b||d)&&this.ctx.scale(b?-1:1,d?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-c,-e)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
-mxJsCanvas.prototype.setGradient=function(a,b,d,c,e,f,h,l,m){d=this.ctx.createLinearGradient(0,c,0,c+f);c=this.state;c.fillColor=a;c.fillAlpha=null!=l?l:1;c.gradientColor=b;c.gradientAlpha=null!=m?m:1;c.gradientDirection=h;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
+mxJsCanvas.prototype.setGradient=function(a,b,d,c,e,g,h,l,m){d=this.ctx.createLinearGradient(0,c,0,c+g);c=this.state;c.fillColor=a;c.fillAlpha=null!=l?l:1;c.gradientColor=b;c.gradientAlpha=null!=m?m:1;c.gradientDirection=h;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(b){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxJsCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxJsCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxJsCanvas.prototype.setShadow=function(a){(this.state.shadow=a)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(a){if(null==a||a==mxConstants.NONE)a=null,this.ctx.shadowColor="transparent";this.state.shadowColor=a;if(this.state.shadow&&null!=a){var b=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+b+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=b)};mxJsCanvas.prototype.moveTo=function(a,b){this.ctx.moveTo(a,b);this.lastMoveX=a;this.lastMoveY=b};mxJsCanvas.prototype.lineTo=function(a,b){this.ctx.lineTo(a,b);this.lastMoveX=a;this.lastMoveY=b};mxJsCanvas.prototype.quadTo=function(a,b,d,c){this.ctx.quadraticCurveTo(a,b,d,c);this.lastMoveX=d;this.lastMoveY=c};
-mxJsCanvas.prototype.arcTo=function(a,b,d,c,e,f,h){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,d,c,e,f,h);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,d,c,e,f){this.ctx.bezierCurveTo(a,b,d,c,e,f);this.lastMoveX=e;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,b,d,c){this.begin();this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+c);this.lineTo(a,b+c);this.close()};
-mxJsCanvas.prototype.roundrect=function(a,b,d,c,e,f){this.begin();this.moveTo(a+e,b);this.lineTo(a+d-e,b);this.quadTo(a+d,b,a+d,b+f);this.lineTo(a+d,b+c-f);this.quadTo(a+d,b+c,a+d-e,b+c);this.lineTo(a+e,b+c);this.quadTo(a,b+c,a,b+c-f);this.lineTo(a,b+f);this.quadTo(a,b,a+e,b)};mxJsCanvas.prototype.ellipse=function(a,b,d,c){this.ctx.save();this.ctx.translate(a+d/2,b+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.arcTo=function(a,b,d,c,e,g,h){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,d,c,e,g,h);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,d,c,e,g){this.ctx.bezierCurveTo(a,b,d,c,e,g);this.lastMoveX=e;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(a,b,d,c){this.begin();this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+c);this.lineTo(a,b+c);this.close()};
+mxJsCanvas.prototype.roundrect=function(a,b,d,c,e,g){this.begin();this.moveTo(a+e,b);this.lineTo(a+d-e,b);this.quadTo(a+d,b,a+d,b+g);this.lineTo(a+d,b+c-g);this.quadTo(a+d,b+c,a+d-e,b+c);this.lineTo(a+e,b+c);this.quadTo(a,b+c,a,b+c-g);this.lineTo(a,b+g);this.quadTo(a,b,a+e,b)};mxJsCanvas.prototype.ellipse=function(a,b,d,c){this.ctx.save();this.ctx.translate(a+d/2,b+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,b,d,c,e,f,h,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(f){f=e.width;var g=e.height,k=Math.min(d/f,c/g);a+=(d-f*k)/2;b+=(c-g*k)/2;d=f*k;c=g*k}h&&(m.translate(2*a+d,0),m.scale(-1,1));l&&(m.translate(0,2*b+c),m.scale(1,-1));m.drawImage(e,a,b,d,c);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,b,d,c,e,g,h,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(g){g=e.width;var f=e.height,k=Math.min(d/g,c/f);a+=(d-g*k)/2;b+=(c-f*k)/2;d=g*k;c=f*k}h&&(m.translate(2*a+d,0),m.scale(-1,1));l&&(m.translate(0,2*b+c),m.scale(1,-1));m.drawImage(e,a,b,d,c);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,b=this.ctx.shadowOffsetX,d=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=b;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,b,d,c,e,f,h,l,m,g,k,n){if(null!=e&&0!=e.length){d=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;n=e.width;switch(h){case mxConstants.ALIGN_MIDDLE:b-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=m/d}switch(f){case mxConstants.ALIGN_CENTER:a-=n/2/d;break;case mxConstants.ALIGN_RIGHT:a-=n/d}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,b,d,c,e,g,h,l,m,f,k,n){if(null!=e&&0!=e.length){d=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;n=e.width;switch(h){case mxConstants.ALIGN_MIDDLE:b-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=m/d}switch(g){case mxConstants.ALIGN_CENTER:a-=n/2/d;break;case mxConstants.ALIGN_RIGHT:a-=n/d}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/d),Math.round(e.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/d),Math.round(e.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(e,
Math.round(a*d),Math.round(b*d))}else{this.ctx.save();this.updateFont();n=document.createElement("div");n.innerHTML=e;n.style.position="absolute";n.style.top="-9999px";n.style.left="-9999px";n.style.fontFamily=this.state.fontFamily;n.style.fontWeight="bold";n.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(n);m=[n.offsetWidth,n.offsetHeight];document.body.removeChild(n);e=e.split("\n");n=m[1];this.ctx.textBaseline="top";m=b;switch(h){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";b-=(e.length-1)*n/2;m=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=n*(e.length-1),m=b-this.state.fontSize}h=[];n=[];for(d=0;d<e.length;d++)n[d]=a,h[d]=this.ctx.measureText(e[d]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(n[d]-=h[d],f==mxConstants.ALIGN_CENTER&&(n[d]+=h[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];f=h[0];for(d=1;d<e.length;d++)a=Math.min(a,n[d]),f=Math.max(f,h[d]);this.ctx.save();
-a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(d=0;d<e.length;d++)this.ctx.fillText(e[d],n[d],b),b+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+"middle";b-=(e.length-1)*n/2;m=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=n*(e.length-1),m=b-this.state.fontSize}h=[];n=[];for(d=0;d<e.length;d++)n[d]=a,h[d]=this.ctx.measureText(e[d]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(n[d]-=h[d],g==mxConstants.ALIGN_CENTER&&(n[d]+=h[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];g=h[0];for(d=1;d<e.length;d++)a=Math.min(a,n[d]),g=Math.max(g,h[d]);this.ctx.save();
+a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,g,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(d=0;d<e.length;d++)this.ctx.fillText(e[d],n[d],b),b+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,b){mxEventSource.call(this);this.ui=a;this.cookieName=b;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(){var a=null;isLocalStorage&&(a=localStorage.getItem("."+this.cookieName));if(null==a&&"undefined"!=typeof Storage){var b=document.cookie,d=this.cookieName+"=",c=b.indexOf(d);0<=c&&(c+=d.length,a=b.indexOf(";",c),0>a?a=b.length:postCookie=b.substring(a),a=b.substring(c,a),a=0<a.length?a:null,null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie=d+"; expires="+b.toUTCString(),localStorage.setItem("."+this.cookieName,a)))}return a};
@@ -7457,15 +7457,15 @@ DriveRealtime.prototype.processChange=function(a){if(a instanceof RenamePage)a.p
else if(a instanceof mxChildChange){if(a.parent!=a.previous||a.index!=a.previousIndex){var b=a.child.rtCell;null==b&&(b=this.getCurrentPage().mapping.createRealtimeCell(a.child),this.getCurrentPage().mapping.saveRealtimeCell(b.cell));var d=null!=a.parent?a.parent.rtCell:null;if(null!=a.previous){var c=a.previous.rtCell;null!=c&&c.children.removeValue(b)}null!=d&&d.children.insert(Math.min(d.children.length,a.index),b);b.parent=d}}else null!=a.cell&&null!=a.cell.id&&(b=a.cell.rtCell,null!=b&&(a instanceof
mxTerminalChange?b[a.source?"source":"target"]=null!=a.terminal?a.terminal.rtCell:null:a instanceof mxGeometryChange?b.geometry=null!=a.geometry?mxUtils.getXml(this.codec.encode(a.geometry)):null:a instanceof mxStyleChange?b.style=a.style:a instanceof mxValueChange?mxUtils.isNode(a.value)?(b.value=null,b.xmlValue=mxUtils.getXml(a.value)):(b.xmlValue=null,b.value=a.value):a instanceof mxCollapseChange?b.collapsed=a.collapsed?"1":"0":a instanceof mxVisibleChange&&(b.visible=a.visible?"1":"0")))};
DriveRealtime.prototype.setFileModified=function(){this.root.set("modifiedDate",(new Date).getTime());this.file.setModified(!0);this.saving||(this.connected&&this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.saving=!0)};
-DriveRealtime.prototype.installGraphModelListener=function(){this.graphModelChangeListener=mxUtils.bind(this,function(a,b){var d=b.getProperty("edit");this.ignoreChange||!this.file.isEditable()||d.ignoreEdit||this.ui.drive.checkToken(mxUtils.bind(this,function(){this.rtModel.beginCompoundOperation();this.setFileModified();try{var a=d.changes;if(d.undone)for(var b=a.length-1;0<=b;b--)this.processChange(a[b]);else for(b=0;b<a.length;b++)this.processChange(a[b]);this.rtModel.endCompoundOperation()}catch(f){this.rtModel.endCompoundOperation(),
-this.ui.handleError(f)}null==this.isAliveThread&&(this.isAliveThread=window.setTimeout(mxUtils.bind(this,function(){this.connected&&this.ui.editor.setStatus('<div class="geStatusAlert geBlink">'+mxUtils.htmlEntities(mxResources.get("noResponse"))+' <a href="https://desk.draw.io/support/solutions/articles/16000076743" target="_blank"><img border="0" title="'+mxUtils.htmlEntities(mxResources.get("help"))+'" valign="bottom" src="'+Editor.helpImage+'"/></a></div>');this.isAliveThread=window.setTimeout(mxUtils.bind(this,
+DriveRealtime.prototype.installGraphModelListener=function(){this.graphModelChangeListener=mxUtils.bind(this,function(a,b){var d=b.getProperty("edit");this.ignoreChange||!this.file.isEditable()||d.ignoreEdit||this.ui.drive.checkToken(mxUtils.bind(this,function(){this.rtModel.beginCompoundOperation();this.setFileModified();try{var a=d.changes;if(d.undone)for(var b=a.length-1;0<=b;b--)this.processChange(a[b]);else for(b=0;b<a.length;b++)this.processChange(a[b]);this.rtModel.endCompoundOperation()}catch(g){this.rtModel.endCompoundOperation(),
+this.ui.handleError(g)}null==this.isAliveThread&&(this.isAliveThread=window.setTimeout(mxUtils.bind(this,function(){this.connected&&this.ui.editor.setStatus('<div class="geStatusAlert geBlink">'+mxUtils.htmlEntities(mxResources.get("noResponse"))+' <a href="https://desk.draw.io/support/solutions/articles/16000076743" target="_blank"><img border="0" title="'+mxUtils.htmlEntities(mxResources.get("help"))+'" valign="bottom" src="'+Editor.helpImage+'"/></a></div>');this.isAliveThread=window.setTimeout(mxUtils.bind(this,
function(){this.isAliveThread=null;this.timeoutError()}),this.realtimeHeartbeat)}),this.realtimeHeartbeat))}))});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener)};DriveRealtime.prototype.sessionExpiredError=function(){this.ui.showError(mxResources.get("error"),mxResources.get("sessionExpired"),mxResources.get("refresh"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("connecting"));this.file.setModified(!1);window.location.reload()}))};
DriveRealtime.prototype.timeoutError=function(){if(this.ui.editor.autosave)this.ui.editor.setAutosave(!1);else if(this.connected&&!this.timeoutErrorShowing){var a=new Image;a.onload=mxUtils.bind(this,function(){try{var a=this.ui.drive.getUser().email||"Unknown email",d=this.file.desc;this.ui.logEvent({category:"Disconnected",action:a,label:{id:d.id,editable:d.editable,copyable:d.copyable,labels:d.labels,capabilities:d.capabilities,fileSize:d.fileSize,teamDriveId:d.teamDriveId,fileExtension:d.fileExtension,
mimeType:d.mimeType,explicitlyTrashed:d.explicitlyTrashed,autosave:this.ui.editor.autosave}})}catch(c){}this.timeoutErrorShowing=!0;this.ui.showError(mxResources.get("timeout"),mxResources.get("realtimeTimeout"),mxResources.get("discardChangesAndReconnect"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("connecting"));this.file.setModified(!1);window.location.reload()}),null,mxResources.get("ignore"),mxUtils.bind(this,function(){this.showDisconnectedStatus();this.timeoutErrorShowing=
!1;this.realtimeHeartbeat*=2;this.saving=this.connected=!1}),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000076743")}),480,150)});a.src=IMAGE_PATH+"/1x1.png?t="+(new Date).getTime()}};
DriveRealtime.prototype.showDisconnectedStatus=function(){this.ui.editor.setStatus('<div class="geStatusAlert geBlink">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+' <a href="https://desk.draw.io/support/solutions/articles/16000076743" target="_blank"><img border="0" title="'+mxUtils.htmlEntities(mxResources.get("help"))+'" valign="bottom" src="'+Editor.helpImage+'"/></a></div>')};
DriveRealtime.prototype.initializeChat=function(){this.chatHistory=this.rtModel.createList();this.root.set("chatHistory",this.chatHistory)};
-DriveRealtime.prototype.installSelectionModelListener=function(){this.graphSelectionModelChangeListener=mxUtils.bind(this,function(a,b){this.ui.drive.checkToken(mxUtils.bind(this,function(){if(this.file.isEditable()&&!this.graph.isSelectionEmpty())try{for(var a=this.graph.getSelectionCells(),b="",e=0;e<a.length;e++)b+=a[e].id+",";this.getCurrentPage().mapping.selectionMap.set(this.userId,b)}catch(f){this.ui.handleError(f)}}))});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.graphSelectionModelChangeListener)};
+DriveRealtime.prototype.installSelectionModelListener=function(){this.graphSelectionModelChangeListener=mxUtils.bind(this,function(a,b){this.ui.drive.checkToken(mxUtils.bind(this,function(){if(this.file.isEditable()&&!this.graph.isSelectionEmpty())try{for(var a=this.graph.getSelectionCells(),b="",e=0;e<a.length;e++)b+=a[e].id+",";this.getCurrentPage().mapping.selectionMap.set(this.userId,b)}catch(g){this.ui.handleError(g)}}))});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.graphSelectionModelChangeListener)};
DriveRealtime.prototype.installCollaboratorListener=function(){this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_JOINED,mxUtils.bind(this,this.updateCollaborators));this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_LEFT,mxUtils.bind(this,this.updateCollaborators))};
DriveRealtime.prototype.updateCollaborators=function(){var a=this.doc.getCollaborators().length-1;null==this.collaboratorsElement&&(this.collaboratorsElement=document.createElement("a"),this.collaboratorsElement.setAttribute("href","javascript:void(0);"),this.collaboratorsElement.className="geItem",this.collaboratorsElement.style.position="absolute",this.collaboratorsElement.style.display="inline-block",this.collaboratorsElement.style.verticalAlign="bottom",this.collaboratorsElement.style.color="#666",
this.collaboratorsElement.style.top="10px",this.collaboratorsElement.style.right="atlas"==uiTheme?"42px":"68px",this.collaboratorsElement.style.padding="2px",this.collaboratorsElement.style.fontSize="8pt",this.collaboratorsElement.style.verticalAlign="middle",this.collaboratorsElement.style.backgroundPosition="100% 60%",this.collaboratorsElement.style.backgroundRepeat="no-repeat",540>=screen.width&&(this.collaboratorsElement.style.maxWidth=Math.max(10,screen.width-500)+"px",this.collaboratorsElement.style.overflow=
@@ -7474,8 +7474,8 @@ this.collaboratorsElement.clientHeight+this.ui.menubarHeight+8+"px",document.bod
1<this.doc.getCollaborators().length)for(var c=0;c<this.doc.getCollaborators().length;c+=1){var d=this.doc.getCollaborators()[c];if(!d.isMe){var e=document.createElement("div");e.style.cursor="pointer";e.style.whiteSpace="nowrap";b=document.createElement("img");b.src=d.photoUrl;b.style.backgroundColor=d.color;b.style.paddingBottom="8px";b.style.marginRight="10px";b.style.marginTop="2px";b.style.marginBottom="2px";b.style.height="25px";b.style.width="25px";b.setAttribute("align","absmiddle");e.appendChild(b);
mxUtils.write(e,d.displayName);this.collabPanel.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){var a=this.getCurrentPage().mapping.selectionMap.get(d.userId);if(null!=a)for(var a=a.split(","),b=0;b<a.length;b++){var c=this.model.getCell(a[b]);this.highlight(c,d.sessionId);null!=c&&0==b&&this.graph.scrollCellToVisible(c)}}))}}else mxUtils.write(this.collabPanel,mxResources.get("noOtherViewers"));else null!=this.collabPanel.parentNode&&this.collabPanel.parentNode.removeChild(this.collabPanel);
mxEvent.consume(a)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.collabPanel||null==this.collabPanel.parentNode||this.collabPanel.parentNode.removeChild(this.collabPanel)})));var b=mxResources.get(0==a?"noOtherViewers":1==a?"otherViewer":"otherViewers");0<a?(b=a+" "+b,this.collaboratorsElement.style.paddingRight="16px",this.collaboratorsElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.collaboratorsElement.style.cursor=
-"pointer"):(this.collaboratorsElement.style.paddingRight="0px",this.collaboratorsElement.style.backgroundImage="",this.collaboratorsElement.style.cursor="default");for(var a='<div title="'+b+'" style="display:inline-block;white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis;">'+b+"</div>",b={},d=0,c=0;c<this.doc.getCollaborators().length&&6>d;c+=1){var e=this.doc.getCollaborators()[c];e.isMe||null!=b[e.color]||(b[e.color]=e.displayName,d++)}for(var f in b)a+='<div title="'+mxUtils.htmlEntities(b[f])+
-'" style="display:inline-block;background-color:'+f+';width:13px;height:13px;margin-left:4px;margin-top:-1px;"></div>';this.collaboratorsElement.innerHTML=a};DriveRealtime.prototype.createPrefix=function(){for(var a=this.doc.getCollaborators(),b=0;b<a.length;b++)if(a[b].isMe)return a[b].sessionId;return""};
+"pointer"):(this.collaboratorsElement.style.paddingRight="0px",this.collaboratorsElement.style.backgroundImage="",this.collaboratorsElement.style.cursor="default");for(var a='<div title="'+b+'" style="display:inline-block;white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis;">'+b+"</div>",b={},d=0,c=0;c<this.doc.getCollaborators().length&&6>d;c+=1){var e=this.doc.getCollaborators()[c];e.isMe||null!=b[e.color]||(b[e.color]=e.displayName,d++)}for(var g in b)a+='<div title="'+mxUtils.htmlEntities(b[g])+
+'" style="display:inline-block;background-color:'+g+';width:13px;height:13px;margin-left:4px;margin-top:-1px;"></div>';this.collaboratorsElement.innerHTML=a};DriveRealtime.prototype.createPrefix=function(){for(var a=this.doc.getCollaborators(),b=0;b<a.length;b++)if(a[b].isMe)return a[b].sessionId;return""};
DriveRealtime.prototype.highlight=function(a,b){for(var d="red",c=0;c<this.doc.getCollaborators().length;c+=1){var e=this.doc.getCollaborators()[c];if(e.sessionId==b){d=e.color;break}}this.graph.highlightCell(a,d)};DriveRealtime.prototype.dumpRoot=function(){return this.dump(this.root)};
DriveRealtime.prototype.dump=function(a){var b="";if(null!=a){if(a.constructor==mxCell)return a.id;if(a.constructor==mxRootChange)b+="mxRootChange[root="+this.dump(a.root)+"]";else if(a.constructor==mxChildChange)b+="mxChildChange[parent="+this.dump(a.parent)+", child="+this.dump(a.child.id)+", index="+a.index+"]";else if(a.constructor==mxTerminalChange)b+="mxTerminalChange[cell="+this.dump(a.cell)+", terminal="+this.dump(a.terminal)+", source="+a.source+"]";else if(a.constructor==mxValueChange)b+=
"mxValueChange[cell="+this.dump(a.cell)+", value="+a.value+"]";else if(a.constructor==mxGeometryChange)b+="mxGeometryChange[cell="+this.dump(a.cell)+", geometry="+(null!=a.cell.geometry?mxUtils.getXml(this.codec.encode(a.cell.geometry)):"[null]")+"]";else if(a.constructor==mxStyleChange)b+="mxStyleChange[cell="+this.dump(a.cell)+", style="+a.style+"]";else if(a.constructor==mxVisibleChange)b+="mxVisibleChange[cell="+this.dump(a.cell)+", visible="+a.visible+"]";else if(a.constructor==mxCollapseChange)b+=
@@ -7516,11 +7516,11 @@ null!=b.getTerminalPoint(!0))&&(null!=this.graphModel.getTerminal(a.cell,!1)||nu
RealtimeMapping.prototype.beginUpdate=function(){var a=this.getGraphModel();this.driveRealtime.ignoreChange||(this.driveRealtime.ignoreChange=!0,a.beginUpdate(),window.setTimeout(mxUtils.bind(this,function(){a.endUpdate();this.driveRealtime.ignoreChange=!1}),0));return a};RealtimeMapping.prototype.installAllRealtimeCellListeners=function(a){if(null!=a){this.installRealtimeCellListeners(a);for(var b=0;b<a.children.length;b++)this.installAllRealtimeCellListeners(a.children.get(b))}};
RealtimeMapping.prototype.installRealtimeCellListeners=function(a){a.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,mxUtils.bind(this,function(b){this.handleValueChanged(a,b);this.needsUpdate=!0}));a.children.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,function(b){this.handleValuesAdded(a,b);this.needsUpdate=!0}));a.children.addEventListener(gapi.drive.realtime.EventType.VALUES_REMOVED,mxUtils.bind(this,function(b){this.handleValuesRemoved(a,b);this.needsUpdate=
!0}))};
-RealtimeMapping.prototype.handleValueChanged=function(a,b){var d=a.cell;if(!this.driveRealtime.isLocalEvent(b)&&null!=d){var c=b.newValue,e=b.property,f=this.beginUpdate();"type"==e?(d.vertex="vertex"==c,d.edge="edge"==c):"connectable"==e?d.connectable="1"==c:"source"==e||"target"==e?null==c?null!=b.oldValue&&f.setTerminal(d,null,"source"==e):null!=c.cell&&this.containsRealtimeCell(c)&&null!=f.getCell(c.cellId)?f.setTerminal(d,c.cell,"source"==e):(null!=a.parent&&(a.parent.children.removeValue(a),a.parent=
-null),f.setTerminal(d,null,"source"==e),f.remove(a.cell),a[e]=null):"value"==e?f.setValue(d,c):"xmlValue"==e?f.setValue(d,mxUtils.parseXml(c).documentElement):"style"==e?f.setStyle(d,c):"geometry"==e?(c=null!=c?this.driveRealtime.codec.decode(mxUtils.parseXml(c).documentElement):null,f.setGeometry(d,c)):"collapsed"==e?f.setCollapsed(d,"1"==c):"visible"==e?f.setVisible(d,"1"==c):"parent"==e&&(null!=b.oldValue?b.oldValue.children.removeValue(a):(this.createCell(a),this.restoreCell(a)),null==c?f.remove(d):
-(d=c.children.indexOf(a),0<=d&&f.add(c.cell,a.cell,d)))}};
-RealtimeMapping.prototype.handleValuesAdded=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var d=this.beginUpdate(),c=0;c<b.values.length;c++){var e=b.values[c];if(null!=e.parent)if(e.parent!=a)a.children.removeValue(e);else{if(null==e.cell||null==e.cell.parent)this.createCell(e),this.restoreCell(e);for(var f=a.children.indexOf(e),h=a.children.lastIndexOf(e);f!=h;)a.children.remove(h),h=a.children.lastIndexOf(e);e.parent==a&&d.add(a.cell,e.cell,Math.min(f,b.index+c))}}};
-RealtimeMapping.prototype.handleValuesRemoved=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var d=this.beginUpdate(),c=0;c<b.values.length;c++){var e=b.values[c];if(null!=e.cell)if(null!=e.parent&&e.parent!=a&&e.cell.parent!=e.parent.cell){var f=e.parent.children.indexOf(e);d.add(e.parent.cell,e.cell,f)}else f=a.children.indexOf(e),0<=f&&d.add(a.cell,e.cell,f)}};
+RealtimeMapping.prototype.handleValueChanged=function(a,b){var d=a.cell;if(!this.driveRealtime.isLocalEvent(b)&&null!=d){var c=b.newValue,e=b.property,g=this.beginUpdate();"type"==e?(d.vertex="vertex"==c,d.edge="edge"==c):"connectable"==e?d.connectable="1"==c:"source"==e||"target"==e?null==c?null!=b.oldValue&&g.setTerminal(d,null,"source"==e):null!=c.cell&&this.containsRealtimeCell(c)&&null!=g.getCell(c.cellId)?g.setTerminal(d,c.cell,"source"==e):(null!=a.parent&&(a.parent.children.removeValue(a),a.parent=
+null),g.setTerminal(d,null,"source"==e),g.remove(a.cell),a[e]=null):"value"==e?g.setValue(d,c):"xmlValue"==e?g.setValue(d,mxUtils.parseXml(c).documentElement):"style"==e?g.setStyle(d,c):"geometry"==e?(c=null!=c?this.driveRealtime.codec.decode(mxUtils.parseXml(c).documentElement):null,g.setGeometry(d,c)):"collapsed"==e?g.setCollapsed(d,"1"==c):"visible"==e?g.setVisible(d,"1"==c):"parent"==e&&(null!=b.oldValue?b.oldValue.children.removeValue(a):(this.createCell(a),this.restoreCell(a)),null==c?g.remove(d):
+(d=c.children.indexOf(a),0<=d&&g.add(c.cell,a.cell,d)))}};
+RealtimeMapping.prototype.handleValuesAdded=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var d=this.beginUpdate(),c=0;c<b.values.length;c++){var e=b.values[c];if(null!=e.parent)if(e.parent!=a)a.children.removeValue(e);else{if(null==e.cell||null==e.cell.parent)this.createCell(e),this.restoreCell(e);for(var g=a.children.indexOf(e),h=a.children.lastIndexOf(e);g!=h;)a.children.remove(h),h=a.children.lastIndexOf(e);e.parent==a&&d.add(a.cell,e.cell,Math.min(g,b.index+c))}}};
+RealtimeMapping.prototype.handleValuesRemoved=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var d=this.beginUpdate(),c=0;c<b.values.length;c++){var e=b.values[c];if(null!=e.cell)if(null!=e.parent&&e.parent!=a&&e.cell.parent!=e.parent.cell){var g=e.parent.children.indexOf(e);d.add(e.parent.cell,e.cell,g)}else g=a.children.indexOf(e),0<=g&&d.add(a.cell,e.cell,g)}};
RealtimeMapping.prototype.realtimePageFormatChanged=function(a,b){if(null!=a){var d=a.split(",");1<d.length&&(this.isActive()?b?this.graph.pageFormat=new mxRectangle(0,0,parseInt(d[0]),parseInt(d[1])):(this.driveRealtime.ignorePageFormatChanged=!0,this.ui.setPageFormat(new mxRectangle(0,0,parseInt(d[0]),parseInt(d[1]))),this.driveRealtime.ignorePageFormatChanged=!1):null!=this.page.viewState&&(this.page.viewState.pageFormat=new mxRectangle(0,0,parseInt(d[0]),parseInt(d[1]))))}};
RealtimeMapping.prototype.realtimePageScaleChanged=function(a,b){null!=a&&(this.isActive()?b?this.graph.pageScale=parseFloat(a):(this.driveRealtime.ignorePageScaleChanged=!0,this.ui.setPageScale(parseFloat(a)),this.driveRealtime.ignorePageScaleChanged=!1):null!=this.page.viewState&&(this.page.viewState.pageScale=parseFloat(a)))};
RealtimeMapping.prototype.realtimeBackgroundColorChanged=function(a,b){this.isActive()?b?this.graph.background=""==a?null:a:(this.driveRealtime.ignoreBackgroundColorChanged=!0,this.ui.setBackgroundColor(""==a?null:a),this.driveRealtime.ignoreBackgroundColorChanged=!1):null!=this.page.viewState&&(this.page.viewState.background=""==a?null:a)};
@@ -7533,8 +7533,8 @@ RealtimeMapping.prototype.removeAllRealtimeCellListeners=function(a){if(null!=a)
DriveFile.prototype.getPublicUrl=function(a){gapi.client.drive.permissions.list({fileId:this.desc.id}).execute(mxUtils.bind(this,function(b){if(null!=b&&null!=b.items)for(var d=0;d<b.items.length;d++)if("anyoneWithLink"===b.items[d].id||"anyone"===b.items[d].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isAutosave=function(){return this.ui.editor.autosave||this.isAutosaveRevision()};
DriveFile.prototype.isAutosaveNow=function(){if(null!=this.realtime&&null!=this.realtime.root){var a=parseInt(this.realtime.root.get("backupDate")),b=parseInt(this.realtime.root.get("modifiedDate"));return isNaN(a)||isNaN(b)||a<b}return!0};DriveFile.prototype.autosaveCompleted=function(){null!=this.realtime&&null!=this.realtime.root&&this.realtime.root.set("backupDate",(new Date).getTime())};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.save=function(a,b,d,c){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(null,a,b,d,c)};
-DriveFile.prototype.saveFile=function(a,b,d,c,e){if(!this.isEditable())null!=d&&d();else if(!this.savingFile){this.savingFile=!0;var f=this.isModified,h=this.isModified();this.setModified(!1);this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;0!=a?(b&&(this.lastAutosaveRevision=(new Date).getTime()),this.desc=a,this.contentChanged(),null!=d&&d(a)):(this.setModified(h||this.isModified()),null!=c&&c())}),mxUtils.bind(this,function(a){this.savingFile=!1;
-this.isModified=f;this.setModified(h||this.isModified());null!=c&&c(a)}),e,e)}};DriveFile.prototype.saveAs=function(a,b,d){this.ui.drive.copyFile(this.getId(),a,b,d)};DriveFile.prototype.rename=function(a,b,d){this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.desc=c,this.descriptorChanged(),null!=b&&b(c)):(this.desc=c,this.save(!0,b,d))}),d)};
+DriveFile.prototype.saveFile=function(a,b,d,c,e){if(!this.isEditable())null!=d&&d();else if(!this.savingFile){this.savingFile=!0;var g=this.isModified,h=this.isModified();this.setModified(!1);this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;0!=a?(b&&(this.lastAutosaveRevision=(new Date).getTime()),this.desc=a,this.contentChanged(),null!=d&&d(a)):(this.setModified(h||this.isModified()),null!=c&&c())}),mxUtils.bind(this,function(a){this.savingFile=!1;
+this.isModified=g;this.setModified(h||this.isModified());null!=c&&c(a)}),e,e)}};DriveFile.prototype.saveAs=function(a,b,d){this.ui.drive.copyFile(this.getId(),a,b,d)};DriveFile.prototype.rename=function(a,b,d){this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.desc=c,this.descriptorChanged(),null!=b&&b(c)):(this.desc=c,this.save(!0,b,d))}),d)};
DriveFile.prototype.move=function(a,b,d){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=b&&b(a)}),d)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
DriveFile.prototype.isEditable=function(){var a=DrawioFile.prototype.isEditable.apply(this,arguments);return null!=this.realtime?a&&!this.realtime.rtModel.isReadOnly:a&&this.desc.editable};DriveFile.prototype.open=function(){null!=this.realtime?this.realtime.start():DrawioFile.prototype.open.apply(this,arguments)};DriveFile.prototype.close=function(a){a=null!=a?a:!1;DrawioFile.prototype.close.apply(this,arguments);null!=this.realtime&&(this.realtime.destroy(a),this.realtime=null)};DriveLibrary=function(a,b,d){DriveFile.call(this,a,b);this.desc=d};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,b,d){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=b&&b(a)}),d)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.ui.editor.isChromelessView()&&"1"!=urlParams.rt?(this.appId="850530949725",this.clientId="850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","openid"],this.mimeType="all_types_supported"):this.ui.isDriveDomain()?(this.appId="671128082532",this.clientId="671128082532.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.realtime"):(this.appId="420247213240",this.clientId=
"420247213240-hnbju1pt13seqrc1hhd5htpotk4g9q7u.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.rtlegacy");this.mimeTypes="application/mxe,application/vnd.jgraph.mxfile,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy"};mxUtils.extend(DriveClient,mxEventSource);
@@ -7547,35 +7547,35 @@ DriveClient.prototype.setUserId=function(a,b){if(b)if(isLocalStorage)localStorag
DriveClient.prototype.getUserId=function(){var a=null;null!=this.user&&(a=this.user.id);null==a&&isLocalStorage&&(a=localStorage.getItem(".guid"));if(null==a&&"undefined"!=typeof Storage){for(var b=document.cookie.split(";"),d=0;d<b.length;d++){var c=mxUtils.trim(b[d]);if("GUID="==c.substring(0,5)){a=c.substring(5);break}}null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie="GUID=; expires="+b.toUTCString(),localStorage.setItem(".guid",a))}return a};
DriveClient.prototype.execute=function(a){var b=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,d){this.authorize(!1,mxUtils.bind(this,function(){null!=d&&d();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.ui.drive.clearUserId();this.ui.drive.setUser(null);gapi.auth.signOut();this.ui.showError(mxResources.get("error"),
b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,b)};
-DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var h=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:h})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);c&&(null!=l&&null==l.error?null!=b&&b(l):null!=d&&null!=l&&null!=l.error&&
-403==l.error.code&&("The requested mime type change is forbidden."==l.error.message||null!=l.error.data&&"domainPolicy"==l.error.data[0].reason)?d(l):null==l||null==l.error||401!=l.error.code&&403!=l.error.code?null!=l&&null!=l.error&&404!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(h,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(l):403==l.error.code&&null!=this.user?null!=d&&d(l):this.execute(h))}))});null==gapi.auth.getToken()?
-this.execute(h):h()};DriveClient.prototype.authorize=function(a,b,d,c){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=d&&d();else{var f={scope:this.scopes,client_id:this.clientId};a&&null!=e?(f.immediate=!0,f.user_id=e):(f.immediate=!1,f.authuser=-1);gapi.auth.authorize(f,mxUtils.bind(this,function(f){null!=f&&null==f.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,d,c):null!=d&&d(f);this.resetTokenRefresh(f)}))}};
+DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,g=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var h=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:h})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);c&&(null!=l&&null==l.error?null!=b&&b(l):null!=d&&null!=l&&null!=l.error&&
+403==l.error.code&&("The requested mime type change is forbidden."==l.error.message||null!=l.error.data&&"domainPolicy"==l.error.data[0].reason)?d(l):null==l||null==l.error||401!=l.error.code&&403!=l.error.code?null!=l&&null!=l.error&&404!=l.error.code&&this.currentRequest==a&&g<this.maxRetries?(g++,this.requestThread=window.setTimeout(h,Math.round(Math.pow(2,g)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(l):403==l.error.code&&null!=this.user?null!=d&&d(l):this.execute(h))}))});null==gapi.auth.getToken()?
+this.execute(h):h()};DriveClient.prototype.authorize=function(a,b,d,c){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=d&&d();else{var g={scope:this.scopes,client_id:this.clientId};a&&null!=e?(g.immediate=!0,g.user_id=e):(g.immediate=!1,g.authuser=-1);gapi.auth.authorize(g,mxUtils.bind(this,function(g){null!=g&&null==g.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,d,c):null!=d&&d(g);this.resetTokenRefresh(g)}))}};
DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*a.expires_in))};
DriveClient.prototype.checkToken=function(a){var b=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();b&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
DriveClient.prototype.updateUser=function(a,b,d){var c=gapi.auth.getToken().access_token;this.ui.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json&access_token="+c,mxUtils.bind(this,function(c){var e=JSON.parse(c);this.executeRequest(gapi.client.drive.about.get(),mxUtils.bind(this,function(b){this.setUser(new DrawioUser(e.id,b.user.emailAddress,b.user.displayName,null!=b.user.picture?b.user.picture.url:null,e.locale));this.setUserId(e.id,d);null!=a&&a()}),b)}),b)};
DriveClient.prototype.copyFile=function(a,b,d,c){null!=a&&null!=b&&this.executeRequest(gapi.client.drive.files.copy({fileId:a,resource:{title:b},supportsTeamDrives:!0}),d,c)};DriveClient.prototype.renameFile=function(a,b,d,c){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{title:b}),d,c)};DriveClient.prototype.moveFile=function(a,b,d,c){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:b}]}),d,c)};
DriveClient.prototype.createDriveRequest=function(a,b){return gapi.client.request({path:"/drive/v2/files/"+a,method:"PUT",params:{uploadType:"multipart",supportsTeamDrives:!0},headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(b)})};DriveClient.prototype.getLibrary=function(a,b,d){return this.getFile(a,b,d,!0,!0)};
-DriveClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;e=null!=e?e:!1;null!=urlParams.rev?this.executeRequest(gapi.client.drive.revisions.get({fileId:a,revisionId:urlParams.rev}),mxUtils.bind(this,function(a){this.getXmlFile(a,null,b,d)}),d):this.executeRequest(gapi.client.drive.files.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(a){if(null!=this.user){var f=/\.png$/i.test(a.title);/\.vsdx$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&f?(f=
-a.downloadUrl+"&access_token="+gapi.auth.getToken().access_token,this.ui.convertFile(f,a.title,a.mimeType,this.extension,b,d)):c||e||a.mimeType==this.libraryMimeType?this.getXmlFile(a,null,b,d,!0,e):this.loadRealtime(a,mxUtils.bind(this,function(c){try{null==c||null==c.getModel()||null==c.getModel().getRoot()||c.getModel().getRoot().isEmpty()||c.getModel().getRoot().has("cells")&&!c.getModel().getRoot().has(DriveRealtime.prototype.diagramsKey)?this.getXmlFile(a,c,b,d):b(new DriveFile(this.ui,null,
+DriveClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;e=null!=e?e:!1;null!=urlParams.rev?this.executeRequest(gapi.client.drive.revisions.get({fileId:a,revisionId:urlParams.rev}),mxUtils.bind(this,function(a){this.getXmlFile(a,null,b,d)}),d):this.executeRequest(gapi.client.drive.files.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(a){if(null!=this.user){var g=/\.png$/i.test(a.title);/\.vsdx$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&g?(g=
+a.downloadUrl+"&access_token="+gapi.auth.getToken().access_token,this.ui.convertFile(g,a.title,a.mimeType,this.extension,b,d)):c||e||a.mimeType==this.libraryMimeType?this.getXmlFile(a,null,b,d,!0,e):this.loadRealtime(a,mxUtils.bind(this,function(c){try{null==c||null==c.getModel()||null==c.getModel().getRoot()||c.getModel().getRoot().isEmpty()||c.getModel().getRoot().has("cells")&&!c.getModel().getRoot().has(DriveRealtime.prototype.diagramsKey)?this.getXmlFile(a,c,b,d):b(new DriveFile(this.ui,null,
a,c))}catch(m){d(m)}}),d)}else d({message:mxResources.get("loggedOut")})}),d)};
-DriveClient.prototype.loadRealtime=function(a,b,d){if("1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType)if("850530949725"!=this.appId&&(a.editable||"application/mxe"!=a.mimeType&&"application/vnd.jgraph.mxfile"!=a.mimeType)){var c=mxUtils.bind(this,function(){var e=!0,f=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT,retry:c})}),this.ui.timeout);gapi.drive.realtime.load(a.id,mxUtils.bind(this,
-function(a){window.clearTimeout(f);e&&b(a)}))});c()}else b();else this.redirectToNewApp(d,a.id)};
-DriveClient.prototype.getXmlFile=function(a,b,d,c,e,f){var h=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+h,mxUtils.bind(this,function(h){if(null==h)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||f)a.mimeType!=this.libraryMimeType||f?d(new DriveLibrary(this.ui,h,a)):c({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var l=h.lastIndexOf(",");0<l&&(l=this.ui.extractGraphModelFromPng(h.substring(l+
-1)),null!=l&&0<l.length&&(h=l))}var g=new DriveFile(this.ui,h,a,b);!e&&"850530949725"!=this.appId&&g.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(g,!0,mxUtils.bind(this,function(a){g.desc=a;d(g)}),c,!0):d(g)}}),c,"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
-DriveClient.prototype.saveFile=function(a,b,d,c,e,f){if(a.isEditable()){var h=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;f=null!=f?f:!1;var l=mxUtils.bind(this,function(e,k,l){var g={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||f||(e=this.placeholderThumbnail,k=this.placeholderMimeType),null!=e&&null!=k&&(g.thumbnail={image:e,mimeType:k}));var m=function(){a.saveDelay=(new Date).getTime()-h;
-d.apply(this,arguments)},n=mxUtils.bind(this,function(d,e){this.executeRequest(this.createUploadRequest(a.getId(),g,d,b||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,e),m,c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(a,!0)}),c,this.ui.getCurrentFile()!=a?a.getData():null):n(a.getData(),!1)}),m=mxUtils.bind(this,function(){!f&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&(null==
+DriveClient.prototype.loadRealtime=function(a,b,d){if("1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType)if("850530949725"!=this.appId&&(a.editable||"application/mxe"!=a.mimeType&&"application/vnd.jgraph.mxfile"!=a.mimeType)){var c=mxUtils.bind(this,function(){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT,retry:c})}),this.ui.timeout);gapi.drive.realtime.load(a.id,mxUtils.bind(this,
+function(a){window.clearTimeout(g);e&&b(a)}))});c()}else b();else this.redirectToNewApp(d,a.id)};
+DriveClient.prototype.getXmlFile=function(a,b,d,c,e,g){var h=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+h,mxUtils.bind(this,function(h){if(null==h)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?d(new DriveLibrary(this.ui,h,a)):c({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var l=h.lastIndexOf(",");0<l&&(l=this.ui.extractGraphModelFromPng(h.substring(l+
+1)),null!=l&&0<l.length&&(h=l))}var f=new DriveFile(this.ui,h,a,b);!e&&"850530949725"!=this.appId&&f.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(f,!0,mxUtils.bind(this,function(a){f.desc=a;d(f)}),c,!0):d(f)}}),c,"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
+DriveClient.prototype.saveFile=function(a,b,d,c,e,g){if(a.isEditable()){var h=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;g=null!=g?g:!1;var l=mxUtils.bind(this,function(e,k,l){var f={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||g||(e=this.placeholderThumbnail,k=this.placeholderMimeType),null!=e&&null!=k&&(f.thumbnail={image:e,mimeType:k}));var m=function(){a.saveDelay=(new Date).getTime()-h;
+d.apply(this,arguments)},n=mxUtils.bind(this,function(d,e){this.executeRequest(this.createUploadRequest(a.getId(),f,d,b||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,e),m,c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(a,!0)}),c,this.ui.getCurrentFile()!=a?a.getData():null):n(a.getData(),!1)}),m=mxUtils.bind(this,function(){!g&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&(null==
a.realtime||a.realtime.connected)&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(n){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");l(b,"image/png")}))||l(null,null,a.constructor!=DriveLibrary&&(null==a.realtime||a.realtime.connected))});e||!b?m():this.verifyMimeType(a.getId(),m,!0)}else this.ui.editor.graph.reset(),null!=c&&c({message:mxResources.get("readOnly")})};
DriveClient.prototype.verifyMimeType=function(a,b,d,c){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(d||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(d){this.checkingMimeType=!1;null!=d&&"application/vnd.jgraph.mxfile.realtime"==d.mimeType?this.redirectToNewApp(c,a):null!=
b&&b()})))};
DriveClient.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash".split(" "))+"#G"+b;null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}))}};
-DriveClient.prototype.insertFile=function(a,b,d,c,e,f,h,l){f=null!=f?f:this.mimeType;l=null!=l?l:!0;a={mimeType:f,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,h),mxUtils.bind(this,function(a){f==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):l?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision=
+DriveClient.prototype.insertFile=function(a,b,d,c,e,g,h,l){g=null!=g?g:this.mimeType;l=null!=l?l:!0;a={mimeType:g,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,h),mxUtils.bind(this,function(a){g==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):l?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision=
(new Date).getTime(),c(d)):null!=e&&e({message:mxResources.get("loggedOut")})}),e):c(a)}),e)};
DriveClient.prototype.createUploadRequest=function(a,b,d,c,e){e=null!=e?e:!1;a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:{"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'},body:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(b)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=
d?e?d:Base64.encode(d):"")+"\r\n---------314159265358979323846--"};c||(a.params.newRevision=!1);a.params.supportsTeamDrives=!0;return gapi.client.request(a)};
DriveClient.prototype.pickFile=function(a,b){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,c=b?"genericPicker":"filePicker",e=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==
-mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),h=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),f.setMimeTypes("*/*"),h.setMimeTypes("*/*")):
-(a.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),h.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
+mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),g=(new google.picker.DocsView).setIncludeFolders(!0),h=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),g.setMimeTypes("*/*"),h.setMimeTypes("*/*")):
+(a.setMimeTypes(this.mimeTypes),g.setMimeTypes(this.mimeTypes),h.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(g).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
"click",e);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",e);this[c].setVisible(!0)}))};
DriveClient.prototype.pickFolder=function(a){this.folderPickerCallback=a;this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&mxUtils.bind(this,function(){this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",d),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=
a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),e=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=
@@ -7583,122 +7583,122 @@ a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.View
"click",d);a.action==google.picker.Action.CANCEL?this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback(a)}),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxResources.get("cancel"),mxResources.get("ok")):this.folderPickerCallback(a)})).build()}mxEvent.addListener(document,"click",d);this.folderPicker.setVisible(!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(){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))}),d=gapi.auth.getToken().access_token;if(null==this.libraryPicker||this.libraryPickerToken!=d){this.libraryPickerToken=d;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),c=(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"),f=(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(c).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f).setCallback(mxUtils.bind(this,
+e=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(d).addView(c).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g).setCallback(mxUtils.bind(this,
function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}))};DriveClient.prototype.showPermissions=function(a){this.checkToken(mxUtils.bind(this,function(){var b=new gapi.drive.share.ShareClient(this.appId);b.setOAuthToken(gapi.auth.getToken().access_token);b.setItemIds([a]);b.showSettingsDialog()}))};DropboxFile=function(a,b,d){DrawioFile.call(this,a,b);this.stat=d};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.stat.path_display.substring(1))};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0};
DropboxFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};DropboxFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};DropboxFile.prototype.doSave=function(a,b,d){var c=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,arguments);this.stat.name=c;this.saveFile(a,!1,b,d)};
-DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,h=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return h}});l();var m=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(h||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}c(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!=
+DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,h=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return h}});l();var m=mxUtils.bind(this,function(b){var g=this.stat.path_display.lastIndexOf("/"),g=1<g?this.stat.path_display.substring(1,g+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(h||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}c(a)}}),g)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!=
c&&c()}),this.getTitle()==a?b(!0):this.ui.dropbox.checkExists(a,b)):null!=d&&d()};DropboxFile.prototype.rename=function(a,b,d){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=b&&b()):(this.stat=c,this.descriptorChanged(),this.save(!0,b,d))}),d)};DropboxLibrary=function(a,b,d){DropboxFile.call(this,a,b,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".html";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
-DropboxClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(null==f||401!==f.status||d?b({message:mxResources.get("accessDenied")}):(this.setUser(null),
+DropboxClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.usersGetCurrentAccount();g.then(mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));g["catch"](mxUtils.bind(this,function(g){window.clearTimeout(e);c&&(null==g||401!==g.status||d?b({message:mxResources.get("accessDenied")}):(this.setUser(null),
this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)))}))};
-DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(h,l){if(c){window.onDropboxCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.client.setAccessToken(h),
+DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!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(h,l){if(c){window.onDropboxCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=g&&g(),this.client.setAccessToken(h),
this.setUser(null),e&&this.setPersistentToken(h),a())}catch(m){b(m)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onDropboxCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);h&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
-f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},d):e(!1)};DropboxClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)};
-DropboxClient.prototype.getFile=function(a,b,d,c){c=null!=c?c:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var f=mxUtils.bind(this,function(){var c=a.split("/");this.ui.convertFile(a,0<c.length?c[c.length-1]:a,null,this.extension,b,d)});null!=this.token?f():this.authenticate(f,d)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(d,f){var h=e?d.lastIndexOf(","):
--1,g=null;0<h&&(h=this.ui.extractGraphModelFromPng(d.substring(h+1)),null!=h&&0<h.length?d=h:g=new LocalFile(this,d,a,!0));b(null!=g?g:c?new DropboxLibrary(this.ui,d,f):new DropboxFile(this.ui,d,f))}),d,e)};
-DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(h){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(a){}));g["catch"](function(a){window.clearTimeout(m);l&&null!=a&&409==a.status&&(l=!1,d({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(a);g.then(mxUtils.bind(this,
-function(a){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(u){d(u)}}}));g["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),h?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
-d)})}):this.authenticate(function(){e(!0)},d)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},d,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},d):f(!1)};
+DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(g){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);h&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+g?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},d):e(!1)};DropboxClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)};
+DropboxClient.prototype.getFile=function(a,b,d,c){c=null!=c?c:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var g=mxUtils.bind(this,function(){var c=a.split("/");this.ui.convertFile(a,0<c.length?c[c.length-1]:a,null,this.extension,b,d)});null!=this.token?g():this.authenticate(g,d)}else g={path:"/"+a},null!=urlParams.rev&&(g.rev=urlParams.rev),this.readFile(g,mxUtils.bind(this,function(d,g){var h=e?d.lastIndexOf(","):
+-1,f=null;0<h&&(h=this.ui.extractGraphModelFromPng(d.substring(h+1)),null!=h&&0<h.length?d=h:f=new LocalFile(this,d,a,!0));b(null!=f?f:c?new DropboxLibrary(this.ui,d,g):new DropboxFile(this.ui,d,g))}),d,e)};
+DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(h){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});f.then(mxUtils.bind(this,function(a){}));f["catch"](function(a){window.clearTimeout(m);l&&null!=a&&409==a.status&&(l=!1,d({message:mxResources.get("fileNotFound")}))});f=this.client.filesDownload(a);f.then(mxUtils.bind(this,
+function(a){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(u){d(u)}}}));f["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),h?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},
+d)})}):this.authenticate(function(){e(!0)},d)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},d,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},d):g(!1)};
DropboxClient.prototype.checkExists=function(a,b,d){var c=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(c,mxUtils.bind(this,function(c){d?b(!1,!0,c):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b(!0,!0,c)},function(){b(!1,!0,c)})}),function(a){b(!0,!1)})};
-DropboxClient.prototype.renameFile=function(a,b,d,c){if(/[\\\/:\?\*"\|]/.test(b))c({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=b){var e=a.stat.path_display.substring(1),f=e.lastIndexOf("/");0<f&&(b=e.substring(0,f+1)+b)}null!=a&&null!=b&&a.stat.path_lower.substring(1)!==b.toLowerCase()?this.checkExists(b,mxUtils.bind(this,function(e,f,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+b,autorename:!1});this.executePromise(e,
-d,c)}),f&&m.path_lower.substring(1)!==b.toLowerCase()?(f=this.client.filesDelete({path:"/"+b.toLowerCase()}),this.executePromise(f,e,c)):e()):c()})):c({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,b,d,c){this.insertFile(a,b,d,c,!0)};
-DropboxClient.prototype.insertFile=function(a,b,d,c,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(f){f?this.saveFile(a,b,mxUtils.bind(this,function(a){e?d(new DropboxLibrary(this.ui,b,a)):d(new DropboxFile(this.ui,b,a))}),c):c()}))};
+DropboxClient.prototype.renameFile=function(a,b,d,c){if(/[\\\/:\?\*"\|]/.test(b))c({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=b){var e=a.stat.path_display.substring(1),g=e.lastIndexOf("/");0<g&&(b=e.substring(0,g+1)+b)}null!=a&&null!=b&&a.stat.path_lower.substring(1)!==b.toLowerCase()?this.checkExists(b,mxUtils.bind(this,function(e,g,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+b,autorename:!1});this.executePromise(e,
+d,c)}),g&&m.path_lower.substring(1)!==b.toLowerCase()?(g=this.client.filesDelete({path:"/"+b.toLowerCase()}),this.executePromise(g,e,c)):e()):c()})):c({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,b,d,c){this.insertFile(a,b,d,c,!0)};
+DropboxClient.prototype.insertFile=function(a,b,d,c,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(g){g?this.saveFile(a,b,mxUtils.bind(this,function(a){e?d(new DropboxLibrary(this.ui,b,a)):d(new DropboxFile(this.ui,b,a))}),c):c()}))};
DropboxClient.prototype.saveFile=function(a,b,d,c,e){/[\\\/:\?\*"\|]/.test(a)?c({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=b.length?c({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=e?e:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([b],{type:"text/plain"})}),this.executePromise(a,d,c))};
DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),c=b[0].link.indexOf(this.appPath);if(0<c){var e=decodeURIComponent(b[0].link.substring(c+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(c,h){if(null!=h&&h.id==b[0].id)try{this.ui.spinner.stop(),
a(e.substring(1),new DropboxLibrary(this.ui,c,h))}catch(l){this.ui.handleError(l)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})};
-DropboxClient.prototype.createLibrary=function(a,b,d){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(c){this.insertFile(a.name,c,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),b(a.getHash().substring(1),a)}catch(f){d(f)}}),d,!0)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
+DropboxClient.prototype.createLibrary=function(a,b,d){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(c){this.insertFile(a.name,c,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),b(a.getHash().substring(1),a)}catch(g){d(g)}}),d,!0)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
DropboxClient.prototype.pickFile=function(a,b){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(b)this.ui.spinner.stop(),a(d[0].link);else{var c=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)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var h=d[0].link.indexOf(this.appPath);if(0<h){var l=decodeURIComponent(d[0].link.substring(h+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(b,g){if(null!=g&&g.id==d[0].id){var h=f?b.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+
-1)),null!=h&&0<h.length?b=h:m=new LocalFile(this,b,l,!0));a(l.substring(1),null!=m?m:new DropboxFile(this.ui,b,g))}else this.createFile(d[0],e,c)}),c,f)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
-DropboxClient.prototype.createFile=function(a,b,d){var c=/(\.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 f=c?e.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(e.substring(f+1)),null!=f&&0<f.length&&(e=f));this.insertFile(a.name,e,mxUtils.bind(this,function(c){b(a.name,c)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
+function(b,c){this.ui.spinner.stop();a(b,c)}),g=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&g)e(d[0].link);else{var h=d[0].link.indexOf(this.appPath);if(0<h){var l=decodeURIComponent(d[0].link.substring(h+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(b,f){if(null!=f&&f.id==d[0].id){var h=g?b.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+
+1)),null!=h&&0<h.length?b=h:m=new LocalFile(this,b,l,!0));a(l.substring(1),null!=m?m:new DropboxFile(this.ui,b,f))}else this.createFile(d[0],e,c)}),c,g)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+DropboxClient.prototype.createFile=function(a,b,d){var c=/(\.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=c?e.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(e.substring(g+1)),null!=g&&0<g.length&&(e=g));this.insertFile(a.name,e,mxUtils.bind(this,function(c){b(a.name,c)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
(this.ui.spinner.stop(),d({message:mxResources.get("errorLoadingFile")}))}),d,c)};OneDriveFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.meta.id)};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};
OneDriveFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};OneDriveFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};OneDriveFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
-OneDriveFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});h();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}));else null!=d&&d()};
+OneDriveFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});h();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}));else null!=d&&d()};
OneDriveFile.prototype.rename=function(a,b,d){this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.meta=c,this.descriptorChanged(),null!=b&&b()):(this.meta=c,this.save(!0,b,d))}),d)};OneDriveFile.prototype.move=function(a,b,d){this.ui.oneDrive.moveFile(this.meta.id,a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=b&&b(a)}),d)};OneDriveLibrary=function(a,b,d){OneDriveFile.call(this,a,b,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"odauth");this.token=this.token};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId="test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395";OneDriveClient.prototype.scopes="user.read";OneDriveClient.prototype.redirectUri="https://"+window.location.hostname+"/onedrive3.html";OneDriveClient.prototype.extension=".html";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";
OneDriveClient.prototype.get=function(a,b,d){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(b,d);return a};
-OneDriveClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200>f.getStatus()||300<=f.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,null,f.displayName)),
+OneDriveClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(e);c&&(200>g.getStatus()||300<=g.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),
a()))}),b)};
-OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){var h="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",h=window.open(h,"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!=h&&(window.onOneDriveCallback=mxUtils.bind(this,function(h,m){if(c){window.onOneDriveCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.setUser(null),this.token=h,e&&this.setPersistentToken(h),a())}catch(g){b(g)}finally{null!=m&&m.close()}}else null!=m&&m.close()}),h.focus())}),
+OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,g){var h="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",h=window.open(h,"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!=h&&(window.onOneDriveCallback=mxUtils.bind(this,function(h,m){if(c){window.onOneDriveCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=g&&g(),this.setUser(null),this.token=h,e&&this.setPersistentToken(h),a())}catch(f){b(f)}finally{null!=m&&m.close()}}else null!=m&&m.close()}),h.focus())}),
mxUtils.bind(this,function(){c&&(window.onOneDriveCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(g){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,g?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)):d(this.parseRequestText(a)))}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};OneDriveClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;this.executeRequest(this.baseUrl+"/me/drive/items/"+a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var c=JSON.parse(a.getText()),f=/\.png$/i.test(c.name);if(/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(c["@microsoft.graph.downloadUrl"],c.name,null!=c.file?c.file.mimeType:null,this.extension,b,d);else{var m=!0,g=window.setTimeout(mxUtils.bind(this,
-function(){m=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(c["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(g);if(m){var d=f?a.lastIndexOf(","):-1,h=null;0<d&&(d=this.ui.extractGraphModelFromPng(a.substring(d+1)),null!=d&&0<d.length?a=d:h=new LocalFile(this.ui,a,c.name,!0));null!=h?b(h):e?b(new OneDriveLibrary(this.ui,a,c)):b(new OneDriveFile(this.ui,a,c))}}),mxUtils.bind(this,function(a){window.clearTimeout(g);m&&d(this.parseRequestText(a))}),
-f||null!=c.file&&null!=c.file.mimeType&&"image/"==c.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};OneDriveClient.prototype.renameFile=function(a,b,d,c){null!=a&&null!=b&&this.checkExists(a.meta.parentReference.id,b,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id,JSON.stringify({name:b}),"PATCH","application/json",d,c):c()}))};
+OneDriveClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;this.executeRequest(this.baseUrl+"/me/drive/items/"+a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var c=JSON.parse(a.getText()),g=/\.png$/i.test(c.name);if(/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(c["@microsoft.graph.downloadUrl"],c.name,null!=c.file?c.file.mimeType:null,this.extension,b,d);else{var m=!0,f=window.setTimeout(mxUtils.bind(this,
+function(){m=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(c["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(f);if(m){var d=g?a.lastIndexOf(","):-1,h=null;0<d&&(d=this.ui.extractGraphModelFromPng(a.substring(d+1)),null!=d&&0<d.length?a=d:h=new LocalFile(this.ui,a,c.name,!0));null!=h?b(h):e?b(new OneDriveLibrary(this.ui,a,c)):b(new OneDriveFile(this.ui,a,c))}}),mxUtils.bind(this,function(a){window.clearTimeout(f);m&&d(this.parseRequestText(a))}),
+g||null!=c.file&&null!=c.file.mimeType&&"image/"==c.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};OneDriveClient.prototype.renameFile=function(a,b,d,c){null!=a&&null!=b&&this.checkExists(a.meta.parentReference.id,b,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id,JSON.stringify({name:b}),"PATCH","application/json",d,c):c()}))};
OneDriveClient.prototype.moveFile=function(a,b,d,c){this.writeFile(this.baseUrl+"/me/drive/items/"+a,JSON.stringify({parentReference:{id:b}}),"PATCH","application/json",d,c)};OneDriveClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
-OneDriveClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;this.checkExists(f,a,!0,mxUtils.bind(this,function(h){h?this.writeFile(this.baseUrl+(null!=f?"/me/drive/items/"+f:"/me/drive/root")+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?d(new OneDriveLibrary(this.ui,b,a)):d(new OneDriveFile(this.ui,b,a))}),c):c()}))};
+OneDriveClient.prototype.insertFile=function(a,b,d,c,e,g){e=null!=e?e:!1;this.checkExists(g,a,!0,mxUtils.bind(this,function(h){h?this.writeFile(this.baseUrl+(null!=g?"/me/drive/items/"+g:"/me/drive/root")+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?d(new OneDriveLibrary(this.ui,b,a)):d(new OneDriveFile(this.ui,b,a))}),c):c()}))};
OneDriveClient.prototype.checkExists=function(a,b,d,c){this.executeRequest(this.baseUrl+(null!=a?"/me/drive/items/"+a:"/me/drive/root")+"/children/"+b,mxUtils.bind(this,function(a){404==a.getStatus()?c(!0):d?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[b]),function(){c(!0)},function(){c(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)}))}),function(a){c(!1)},!0)};
OneDriveClient.prototype.saveFile=function(a,b,d){var c=mxUtils.bind(this,function(c){this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id+"/content/",c,"PUT",null,b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){c(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=a?a.getData():null):c(a.getData())};
-OneDriveClient.prototype.writeFile=function(a,b,d,c,e,f){if(null!=a&&null!=b){var h=mxUtils.bind(this,function(m){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout),n=new mxXmlRequest(a,b,d);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(k);g&&(200<=a.getStatus()&&299>=a.getStatus()?
-e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,m?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){l(!0)},f)})}):this.authenticate(function(){h(!0)},f)):f(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(k);g&&f(this.parseRequestText(a))}))}),l=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){l(!0)},f,a):h(a)});null==this.token?
-this.authenticate(function(){l(!0)},f):l(!1)}else f({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(d){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+OneDriveClient.prototype.writeFile=function(a,b,d,c,e,g){if(null!=a&&null!=b){var h=mxUtils.bind(this,function(m){var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;g({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout),n=new mxXmlRequest(a,b,d);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(k);f&&(200<=a.getStatus()&&299>=a.getStatus()?
+e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,m?g({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){l(!0)},g)})}):this.authenticate(function(){h(!0)},g)):g(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(k);f&&g(this.parseRequestText(a))}))}),l=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){l(!0)},g,a):h(a)});null==this.token?
+this.authenticate(function(){l(!0)},g):l(!1)}else g({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(d){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(a)};
OneDriveClient.prototype.pickFolder=function(a){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){this.token=b.accessToken;a(b)}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){null!=b&&null!=b.value&&0<b.value.length&&(this.token=b.accessToken,a(b.value[0].id,b))}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):""))};
GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(b){a(200<=b.getStatus()&&299>=b.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};
GitHubFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};GitHubFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};GitHubFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
-GitHubFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});h();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;
-this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());this.isModified()&&this.addUnsavedStatus();if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=
+GitHubFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});h();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;
+this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());this.isModified()&&this.addUnsavedStatus();if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=
!1;null!=c&&c()}),!1,b)}));else null!=d&&d()};GitHubLibrary=function(a,b,d){GitHubFile.call(this,a,b,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){DrawioClient.call(this,a,"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
-GitHubClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(401===f.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):200>f.getStatus()||300<=f.getStatus()?b({message:mxResources.get("accessDenied")}):
-(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,f.email,f.name)),a()))}))};
-GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(h,l){if(c)if(window.onGitHubCallback=null,c=!1,null==h)b({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var c=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+h,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var h=g.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(p){b(p)}finally{null!=l&&
+GitHubClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(g){window.clearTimeout(e);c&&(401===g.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):200>g.getStatus()||300<=g.getStatus()?b({message:mxResources.get("accessDenied")}):
+(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,g.email,g.name)),a()))}))};
+GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!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(h,l){if(c)if(window.onGitHubCallback=null,c=!1,null==h)b({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var c=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+h,mxUtils.bind(this,function(f){window.clearTimeout(d);if(c)try{if(200>f.getStatus()||300<=f.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=g&&g();var h=f.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(p){b(p)}finally{null!=l&&
l.close()}}))});m()}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(h)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
-function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var g=!1;try{var k=JSON.parse(a.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code)}catch(n){}d({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this,
+GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(g){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(h)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())g?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var f=!1;try{var k=JSON.parse(a.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(f="too_large"==k.errors[0].code)}catch(n){}d({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this,
function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};GitHubClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)};
-GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var f=a.split("/"),h=f[0],l=f[1],m=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);!e&&(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&f)?null!=this.token?(e=this.baseUrl+"/repos/"+h+"/"+l+"/contents/"+a+"?ref="+m+"&token="+this.token,f=a.split("/"),this.ui.convertFile(e,0<f.length?f[f.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
+GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var g=a.split("/"),h=g[0],l=g[1],m=g[2];a=g.slice(3,g.length).join("/");g=/\.png$/i.test(a);!e&&(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g)?null!=this.token?(e=this.baseUrl+"/repos/"+h+"/"+l+"/contents/"+a+"?ref="+m+"&token="+this.token,g=a.split("/"),this.ui.convertFile(e,0<g.length?g[g.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
"/repos/"+h+"/"+l+"/contents/"+a+"?ref="+m,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(h,l,m,JSON.parse(a.getText()),c))}catch(k){d(k)}}),d))};
GitHubClient.prototype.createGitHubFile=function(a,b,d,c,e){a={org:a,repo:b,ref:d,name:c.name,path:c.path,sha:c.sha,html_url:c.html_url,download_url:c.download_url};b=c.content;"base64"===c.encoding&&(/\.jpe?g$/i.test(c.name)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(c.name)?b="data:image/gif;base64,"+b:/\.png$/i.test(c.name)?(c=this.ui.extractGraphModelFromPng(b),b=null!=c&&0<c.length?c:"data:image/png;base64,"+b):b=Base64.decode(b));return e?new GitHubLibrary(this.ui,b,a):new GitHubFile(this.ui,
b,a)};GitHubClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e,!1)};
-GitHubClient.prototype.insertFile=function(a,b,d,c,e,f,h){e=null!=e?e:!1;f=f.split("/");var l=f[0],m=f[1],g=f[2],k=f.slice(3,f.length).join("/");0<k.length&&(k+="/");k+=a;this.checkExists(l+"/"+m+"/"+g+"/"+k,!0,mxUtils.bind(this,function(f,u){f?e?(h||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,m,g,k,a,b,u,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(l,m,g,b.content,e))}catch(v){c(v)}}),c)}),c)):d(new GitHubFile(this.ui,
-b,{org:l,repo:m,ref:g,name:a,path:k,sha:u,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
-GitHubClient.prototype.writeFile=function(a,b,d,c,e,f,h,l,m){f.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:f},null!=h&&(d.sha=h),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),m))};
+GitHubClient.prototype.insertFile=function(a,b,d,c,e,g,h){e=null!=e?e:!1;g=g.split("/");var l=g[0],m=g[1],f=g[2],k=g.slice(3,g.length).join("/");0<k.length&&(k+="/");k+=a;this.checkExists(l+"/"+m+"/"+f+"/"+k,!0,mxUtils.bind(this,function(g,u){g?e?(h||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,m,f,k,a,b,u,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(l,m,f,b.content,e))}catch(w){c(w)}}),c)}),c)):d(new GitHubFile(this.ui,
+b,{org:l,repo:m,ref:f,name:a,path:k,sha:u,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,b,d,c,e,g,h,l,m){g.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:g},null!=h&&(d.sha=h),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),m))};
GitHubClient.prototype.checkExists=function(a,b,d){this.getFile(a,mxUtils.bind(this,function(c){if(b&&null!=c.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();d(!0,c.meta.sha)},function(){e();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,f=a.meta.ref,h=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(g,k){this.writeFile(c,e,f,h,l,k,g,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),
-mxResources.get("cancel"),mxUtils.bind(this,function(){d()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(c+"/"+e+"/"+f+"/"+h,mxUtils.bind(this,function(a){m(a.meta.sha,k)}),mxUtils.bind(this,function(){m(null,k)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):d(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(h)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):m(a.meta.sha,
+GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,g=a.meta.ref,h=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(f,k){this.writeFile(c,e,g,h,l,k,f,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){d()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(c+"/"+e+"/"+g+"/"+h,mxUtils.bind(this,function(a){m(a.meta.sha,k)}),mxUtils.bind(this,function(){m(null,k)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):d(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(h)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):m(a.meta.sha,
Base64.encode(a.getData()))}),mxUtils.bind(this,function(){d()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
-GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,e=null,f=null,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";h.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px";
-h.appendChild(m);var g=new CustomDialog(this.ui,h,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+f)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(k(d+
-"/"+c,mxUtils.bind(this,function(){f=null;z()})));a||(mxUtils.write(b," / "),b.appendChild(k(decodeURIComponent(e),mxUtils.bind(this,function(){f=null;v()}))));if(null!=f&&0<f.length){var g=f.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(k(g[a],mxUtils.bind(this,function(){f=g.slice(0,a+1).join("/");p()})))})(a)}m.appendChild(b)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
-(f=e=c=d=null,z()):this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){var h=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(e),null,"GET");g.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(h,mxUtils.bind(this,function(g){n();this.ui.spinner.stop();var h=JSON.parse(g.getText());m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,z();else{var a=f.split("/");
-f=a.slice(0,a.length-1).join("/");p()}})));mxUtils.br(m);null==h||0==h.length?mxUtils.write(m,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var l=0;l<h.length;l++)mxUtils.bind(this,function(h){g==("dir"==h.type)&&(m.appendChild(k(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(f=h.path,p()):a&&"file"==h.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+h.path))}))),mxUtils.br(m))})(h[l])}),g(!0),a&&g(!1))}),u)}),q=null,w=null,v=mxUtils.bind(this,
-function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,
-"scroll",w);v(a+1)});mxEvent.addListener(q,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){f=null;z()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(k(a.name,mxUtils.bind(this,function(){e=a.name;f="";p()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(q),
-w=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",w))}}),u)}),z=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");
-mxUtils.write(q,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",w);z(a+1)});mxEvent.addListener(q,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
-function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var g=b[1];3>b.length?(d=a,c=g,f=e=null,v()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";p()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),
-this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){m.appendChild(k(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;f="";p()})));mxUtils.br(m)})(b[g])}100==b.length&&(m.appendChild(q),w=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",
-w))}),u)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};
+GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,e=null,g=null,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";h.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px";
+h.appendChild(m);var f=new CustomDialog(this.ui,h,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+g)}));this.ui.showDialog(f.container,340,270,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var k=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(k(d+
+"/"+c,mxUtils.bind(this,function(){g=null;z()})));a||(mxUtils.write(b," / "),b.appendChild(k(decodeURIComponent(e),mxUtils.bind(this,function(){g=null;w()}))));if(null!=g&&0<g.length){var f=g.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(k(f[a],mxUtils.bind(this,function(){g=f.slice(0,a+1).join("/");p()})))})(a)}m.appendChild(b)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
+(g=e=c=d=null,z()):this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){var h=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+g+"?ref="+encodeURIComponent(e),null,"GET");f.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(h,mxUtils.bind(this,function(f){n();this.ui.spinner.stop();var h=JSON.parse(f.getText());m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,z();else{var a=g.split("/");
+g=a.slice(0,a.length-1).join("/");p()}})));mxUtils.br(m);null==h||0==h.length?mxUtils.write(m,mxResources.get("noFiles")):(f=mxUtils.bind(this,function(f){for(var l=0;l<h.length;l++)mxUtils.bind(this,function(h){f==("dir"==h.type)&&(m.appendChild(k(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(g=h.path,p()):a&&"file"==h.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+h.path))}))),mxUtils.br(m))})(h[l])}),f(!0),a&&f(!1))}),u)}),q=null,v=null,w=mxUtils.bind(this,
+function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,
+"scroll",v);w(a+1)});mxEvent.addListener(q,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){g=null;z()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(k(a.name,mxUtils.bind(this,function(){e=a.name;g="";p()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(q),
+v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",v))}}),u)}),z=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");
+mxUtils.write(q,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",v);z(a+1)});mxEvent.addListener(q,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
+function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var f=b[1];3>b.length?(d=a,c=f,g=e=null,w()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+f+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);g="";p()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),
+this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var f=0;f<b.length;f++)mxUtils.bind(this,function(a){m.appendChild(k(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;g="";p()})));mxUtils.br(m)})(b[f])}100==b.length&&(m.appendChild(q),v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",
+v))}),u)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};
TrelloFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};TrelloFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};TrelloFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
-TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});h();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=e;this.meta=f;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&
-(this.saveNeededCounter--,this.saveFile(a,b,d,c))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(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!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
+TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,g=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});h();this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.savingFile=!1;this.isModified=e;this.meta=g;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&
+(this.saveNeededCounter--,this.saveFile(a,b,d,c))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(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!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
b,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,e)}));else null!=d&&d()};TrelloLibrary=function(a,b,d){TrelloFile.call(this,a,b,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(a,b,d){d&&this.logout();d=mxUtils.bind(this,function(c,d){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=d&&d();a()},error:function(){null!=d&&d();null!=b&&b(mxResources.get("loggedOut"))}})});this.isAuthorized()?d(!0):this.ui.showAuthDialog(this,!0,d)};TrelloClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)};
-TrelloClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;var f=mxUtils.bind(this,function(){var c=a.split(this.SEPARATOR),l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(m);if(l){var g=/\.png$/i.test(c.name);/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),
-c.name,c.mimeType,this.extension,b,d):(l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(m);if(l){c.compoundId=a;var f=g?d.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(d.substring(f+1)),null!=f&&0<f.length&&(d=f));e?b(new TrelloLibrary(this.ui,d,c)):b(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(m);
-l&&(401==b.status?this.authenticate(f,d,!0):d())}),g||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(401==a.status?this.authenticate(f,d,!0):d())}))});this.authenticate(f,d)};TrelloClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
-TrelloClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;var h=mxUtils.bind(this,function(){var h=mxUtils.bind(this,function(h){this.writeFile(a,h,f,mxUtils.bind(this,function(a){e?d(new TrelloLibrary(this.ui,b,a)):d(new TrelloFile(this.ui,b,a))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){h(this.ui.base64ToBlob(a,"image/png"))}),c,b):h(b)});this.authenticate(h,c)};
-TrelloClient.prototype.saveFile=function(a,b,d){var c=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){this.writeFile(a.meta.name,e,c[0],b,d)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(f,d,!0):d()}))}),f=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"))}),
-d,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(f,d)};
-TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;e({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof b?new Blob([b]):b,a);m.append("name",
-a);var g=new XMLHttpRequest;g.responseType="json";g.onreadystatechange=mxUtils.bind(this,function(){if(4===g.readyState&&(window.clearTimeout(l),h))if(200==g.status){var a=g.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==g.status?this.authenticate(f,e,!0):e()});g.open("POST",this.baseUrl+"cards/"+d+"/attachments");g.send(m)});this.authenticate(f,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;var g=mxUtils.bind(this,function(){var c=a.split(this.SEPARATOR),l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(m);if(l){var f=/\.png$/i.test(c.name);/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),
+c.name,c.mimeType,this.extension,b,d):(l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(m);if(l){c.compoundId=a;var g=f?d.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(d.substring(g+1)),null!=g&&0<g.length&&(d=g));e?b(new TrelloLibrary(this.ui,d,c)):b(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(m);
+l&&(401==b.status?this.authenticate(g,d,!0):d())}),f||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(401==a.status?this.authenticate(g,d,!0):d())}))});this.authenticate(g,d)};TrelloClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
+TrelloClient.prototype.insertFile=function(a,b,d,c,e,g){e=null!=e?e:!1;var h=mxUtils.bind(this,function(){var h=mxUtils.bind(this,function(h){this.writeFile(a,h,g,mxUtils.bind(this,function(a){e?d(new TrelloLibrary(this.ui,b,a)):d(new TrelloFile(this.ui,b,a))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){h(this.ui.base64ToBlob(a,"image/png"))}),c,b):h(b)});this.authenticate(h,c)};
+TrelloClient.prototype.saveFile=function(a,b,d){var c=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){this.writeFile(a.meta.name,e,c[0],b,d)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(g,d,!0):d()}))}),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"))}),
+d,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(g,d)};
+TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof b?new Blob([b]):b,a);m.append("name",
+a);var f=new XMLHttpRequest;f.responseType="json";f.onreadystatechange=mxUtils.bind(this,function(){if(4===f.readyState&&(window.clearTimeout(l),h))if(200==f.status){var a=f.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==f.status?this.authenticate(g,e,!0):e()});f.open("POST",this.baseUrl+"cards/"+d+"/attachments");f.send(m)});this.authenticate(g,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c="@me",e=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var h=document.createElement("h3");mxUtils.write(h,a?mxResources.get("selectFile"):mxResources.get("selectCard"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
-"194px";f.appendChild(l);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var m=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height=
-c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),k=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
-mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(m("../ [Up]",mxUtils.bind(this,function(){p()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){l.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,g,!0):
-null!=g&&g(b)}))});a()}),n=null,u=null,p=mxUtils.bind(this,function(f){null==f&&(e=0,l.innerHTML="",f=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",u);p(f+1)});mxEvent.addListener(n,"click",h);var q=mxUtils.bind(this,function(){Trello.get("search",
-{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==f&&(l.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,p())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var g=0;g<e.length;g++)mxUtils.bind(this,function(c){l.appendChild(m(c.name,mxUtils.bind(this,function(){a?(d=c.id,k()):(this.ui.hideDialog(),b(c.id))})))})(e[g]);100==e.length&&(l.appendChild(n),u=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",u))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,g,!0):null!=g&&g({message:a.responseText})}))});q()});p()};
-TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,d,c,e,f,h,l){this.editorUi=a;this.doc=l.doc;this.rtModel=l.rt;this.chatHistory=l.chatHistory;this.chatMap=l.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";l=document.createElement("div");l.style.padding="3px";d.appendChild(l);var m=document.createElement("div");m.style.paddingLeft="3px";m.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(m);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
+TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c="@me",e=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var h=document.createElement("h3");mxUtils.write(h,a?mxResources.get("selectFile"):mxResources.get("selectCard"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(h);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
+"194px";g.appendChild(l);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var m=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var g=document.createElement("a");g.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";g.appendChild(f)}mxUtils.write(g,a);mxEvent.addListener(g,"click",b);d.appendChild(g);return d}),f=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),k=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(m("../ [Up]",mxUtils.bind(this,function(){p()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){l.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,f,!0):
+null!=f&&f(b)}))});a()}),n=null,u=null,p=mxUtils.bind(this,function(g){null==g&&(e=0,l.innerHTML="",g=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",u);p(g+1)});mxEvent.addListener(n,"click",h);var q=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==g&&(l.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,p())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var f=0;f<e.length;f++)mxUtils.bind(this,function(c){l.appendChild(m(c.name,mxUtils.bind(this,function(){a?(d=c.id,k()):(this.ui.hideDialog(),b(c.id))})))})(e[f]);100==e.length&&(l.appendChild(n),u=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",u))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,f,!0):null!=f&&f({message:a.responseText})}))});q()});p()};
+TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,d,c,e,g,h,l){this.editorUi=a;this.doc=l.doc;this.rtModel=l.rt;this.chatHistory=l.chatHistory;this.chatMap=l.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";l=document.createElement("div");l.style.padding="3px";d.appendChild(l);var m=document.createElement("div");m.style.paddingLeft="3px";m.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(m);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";l.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
-"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));m.appendChild(this.chatLineArea);m.appendChild(this.sendBtn);this.window=new mxWindow(b,d,c,e,f,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));m.appendChild(this.chatLineArea);m.appendChild(this.sendBtn);this.window=new mxWindow(b,d,c,e,g,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.handleResize();this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.MAXIMIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,this.handleResize));if(null!=this.chatHistory){for(a=Math.max(0,this.chatHistory.length-this.chatHistoryShow);a<this.chatHistory.length;a++)this.updateChatArea(this.chatHistory.get(a));this.chatHistory.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,
function(a){this.updateChatArea(a.target.get(a.index))}))}this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_JOINED,mxUtils.bind(this,this.collaboratorListener));this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_LEFT,mxUtils.bind(this,this.collaboratorListener));null!=this.chatMap&&this.chatMap.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,mxUtils.bind(this,function(a){this.updateChatArea(a.target.get(a.property))}))}
ChatWindow.prototype.window=null;ChatWindow.prototype.doc=null;ChatWindow.prototype.chatHistory=null;ChatWindow.prototype.chatMap=null;ChatWindow.prototype.chatHistoryShow=10;ChatWindow.prototype.chatHistorySize=0;ChatWindow.prototype.setChatMap=function(a){this.chatMap=a};
@@ -7717,10 +7717,10 @@ App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
-App.main=function(a,b){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,e,f){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var g=new Image,h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";g.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+h+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height",
-"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var h=e.split(";"),e=0;e<h.length;e++){var l=App.pluginRegistry[h[e]];null!=l?mxscript(f+l):null!=window.console&&console.log("Unknown plugin:",h[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
-null,null,null,mxClient.IS_SVG);if(null!=c&&0<c.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;h=!0;for(e=0;e<c.length&&h;e++)"/"!=c[e].charAt(0)&&c[e].substring(0,f.length)!=f&&(h=!1);if(h||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[c.join("\n")]).replace(/\\n/g,
+App.main=function(a,b){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,e,g){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var f=new Image,h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";f.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+h+"&v="+encodeURIComponent(EditorUi.VERSION)+
+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(v){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height",
+"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var g="";"1"==urlParams.drawdev&&(g=document.location.protocol+"//drawhost.jgraph.com/");for(var h=e.split(";"),e=0;e<h.length;e++){var l=App.pluginRegistry[h[e]];null!=l?mxscript(g+l):null!=window.console&&console.log("Unknown plugin:",h[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
+null,null,null,mxClient.IS_SVG);if(null!=c&&0<c.length&&"0"!=urlParams.plugins){g=window.location.protocol+"//"+window.location.host;h=!0;for(e=0;e<c.length&&h;e++)"/"!=c[e].charAt(0)&&c[e].substring(0,g.length)!=g&&(h=!1);if(h||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[c.join("\n")]).replace(/\\n/g,
"\n")))for(e=0;e<c.length;e++)try{mxscript(c[e])}catch(m){}}}"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();
mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=null!=b?b():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=
@@ -7747,8 +7747,8 @@ IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.ge
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),b=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=b){var d=b.lastIndexOf("@"),c=b;0<=d&&(c=b.substring(d+1),b=this.crc32(b.substring(0,d))+"@"+c);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&email="+encodeURIComponent(b)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var d=JSON.parse(b);null!=d&&this.handleLicense(d,c)}}}catch(l){}}))}};
-App.prototype.handleLicense=function(a,b){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=a)if(c=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var e=new Date(Date.parse(c)),f=Math.round((e-Date.now())/864E5);if(90>f){var h="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);d.style.height="100%";d.style.margin="0px";d.style.display=
-"";0>f?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+h+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+App.prototype.handleLicense=function(a,b){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=a)if(c=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var e=new Date(Date.parse(c)),g=Math.round((e-Date.now())/864E5);if(90>g){var h="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);d.style.height="100%";d.style.margin="0px";d.style.display=
+"";0>g?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+h+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
h+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return c};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var b=this.getRecent();if(null==b)b=[];else for(var d=0;d<b.length;d++)b[d].id==a.id&&b.splice(d,1);null!=b&&(b.unshift(a),b=b.slice(0,5),localStorage.setItem(".recent",JSON.stringify(b)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(b){}return null}};
@@ -7756,10 +7756,10 @@ App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if((a.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,b=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=b&&(a=(null!=b.getTitle()?b.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],b,d=0;256>d;d++){b=d;for(var c=0;8>c;c++)b=b&1?3988292384^b>>>1:b>>>1;a[d]=b}return a};
App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};
-App.prototype.getThumbnail=function(a,b){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,f=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(f.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var h=document.createElement("canvas"),l=c.getGraphBounds(),m=a/l.width,m=Math.min(1,Math.min(3*a/(4*l.height),m)),g=Math.floor(l.x),k=Math.floor(l.y);h.setAttribute("width",Math.ceil(m*(l.width+4)));h.setAttribute("height",Math.ceil(m*(l.height+4)));var n=h.getContext("2d");
-n.scale(m,m);n.translate(-g,-k);var u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";n.save();n.fillStyle=u;n.fillRect(g,k,Math.ceil(l.width+4),Math.ceil(l.height+4));n.restore();var p=new mxJsCanvas(h),q=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
-b){};w.drawState(c.getView().getState(c.model.root),q);q.finish(mxUtils.bind(this,function(){w.drawState(c.getView().getState(c.model.root),p);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(h)}));d=!0}}catch(v){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
+App.prototype.getThumbnail=function(a,b){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
+function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var h=document.createElement("canvas"),l=c.getGraphBounds(),m=a/l.width,m=Math.min(1,Math.min(3*a/(4*l.height),m)),f=Math.floor(l.x),k=Math.floor(l.y);h.setAttribute("width",Math.ceil(m*(l.width+4)));h.setAttribute("height",Math.ceil(m*(l.height+4)));var n=h.getContext("2d");
+n.scale(m,m);n.translate(-f,-k);var u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";n.save();n.fillStyle=u;n.fillRect(f,k,Math.ceil(l.width+4),Math.ceil(l.height+4));n.restore();var p=new mxJsCanvas(h),q=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var v=new mxImageExport;v.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};v.drawText=function(a,
+b){};v.drawState(c.getView().getState(c.model.root),q);q.finish(mxUtils.bind(this,function(){v.drawState(c.getView().getState(c.model.root),p);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(h)}));d=!0}}catch(w){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(b,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",b);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+b+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),b=null!=c?c.getMode():null,b==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):b==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):b==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
@@ -7775,7 +7775,7 @@ mxResources.get("close"));a.innerHTML=mxResources.get("close");b.appendChild(a);
App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):
this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(g){}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(this.getDiagramId());else{var d=this.getDraft(),m=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;this.createFile(this.defaultFilename,
+this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(f){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(this.getDiagramId());else{var d=this.getDraft(),m=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;this.createFile(this.defaultFilename,
m,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var b=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=b&&0<b.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
"title"]))}),c=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,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c);this.showDialog(b.container,380,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),b=decodeURIComponent(b);if("http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8))try{null!=window.opener&&null!=window.opener[b]?c(window.opener[b]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(e){this.handleError(e,
@@ -7790,44 +7790,44 @@ App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=ga
gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children=
gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell");
App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var b=this.getPeerForMode(a);if(null!=b)b.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d=
-Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var c=this.dialog,e=c.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(c,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var f=
-document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&this.openFiles(f.files)}));f.click()}}};
+Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var c=this.dialog,e=c.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(c,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var g=
+document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&this.openFiles(g.files)}));g.click()}}};
App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var b=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=b&&b.pickLibrary(mxUtils.bind(this,function(a,c){if(null!=c)try{this.loadLibrary(c)}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var 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(h){this.handleError(h,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})}else{var c=document.createElement("input");
c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files)for(var a=0;a<c.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(c.files[a])}));c.click()}};
-App.prototype.saveLibrary=function(a,b,d,c,e,f,h){c=null!=c?c:this.mode;e=null!=e?e:!1;f=null!=f?f:!1;var l=this.createLibraryDataFromImages(b),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=h&&h();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,l,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+App.prototype.saveLibrary=function(a,b,d,c,e,g,h){c=null!=c?c:this.mode;e=null!=e?e:!1;g=null!=g?g:!1;var l=this.createLibraryDataFromImages(b),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=h&&h();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,l,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
l,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,
function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,l,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),m)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(l);var g=mxUtils.bind(this,
-function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(d,b);null!=h&&h()}),m)});if(a!=d.getTitle()){var k=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&k!=d.getHash()&&(mxSettings.removeCustomLibrary(k),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(k);g()}),m)}else g()}};
-App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var c=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,f=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var h=4>=a?2:6<a?4:3,c=new CreateDialog(this,
-c,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==f&&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))):f!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
+this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,l,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),m)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(l);var f=mxUtils.bind(this,
+function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(d,b);null!=h&&h()}),m)});if(a!=d.getTitle()){var k=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&k!=d.getHash()&&(mxSettings.removeCustomLibrary(k),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(k);f()}),m)}else f()}};
+App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var c=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,g=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var h=4>=a?2:6<a?4:3,c=new CreateDialog(this,
+c,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==g&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,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))):g!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,h);this.showDialog(c.container,460,a>h?390:270,!0,!0);c.init()}else this.save(b.getTitle(),d)}};
EditorUi.prototype.loadTemplate=function(a,b,d){var c=a;this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+c);this.loadUrl(c,mxUtils.bind(this,function(c){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(a){b(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&b(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(c=this.extractGraphModelFromPng(c)),b(c))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,b,d,c,e,f,h,l){c=l?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(h=null!=this.stateArg?this.stateArg.folderId:h,this.drive.insertFile(a,b,h,mxUtils.bind(this,
-function(a){m();this.fileCreated(a,d,f,e)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(c,mxUtils.bind(this,function(c){this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,c)})):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,h):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g):
-c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,h):c==App.MODE_BROWSER?(m(),c=mxUtils.bind(this,function(){var c=new StorageFile(this,b,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(c,d,f,e)}),g)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(m(),this.fileCreated(new LocalFile(this,
-b,a,null==c),d,f,e))}};
-App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var f=a.getData(),f=0<f.length?this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0):null,h=window.location.protocol+"//"+window.location.hostname+e,l=f,m=null;null!=f&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),
-l=this.decodeNodeIntoGraph(l,m));a.setData(this.createFileData(f,m,a,h));null!=m&&m.container.parentNode.removeChild(m.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}),
-k=mxUtils.bind(this,function(){d||null==f||!f.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=c&&c(),window.openWindow(e,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?k():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
-function(){k()}),mxUtils.bind(this,function(a){g();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,b,d){this.hideDialog();var c=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 c=localStorage.getItem(a);if(null!=c)this.fileLoaded(new StorageFile(this,c,a));else throw{message:mxResources.get("fileNotFound")};}catch(m){this.handleError(m,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!=d)this.spinner.stop(),this.fileLoaded(d);else if("R"==a.charAt(0))this.spinner.stop(),c=decodeURIComponent(a.substring(1)),"<"!=c.charAt(0)&&(c=this.editor.graph.decompress(c)),
-c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),c.getHash=function(){return a},this.fileLoaded(c);else if("U"==a.charAt(0)){var e=decodeURIComponent(a.substring(1));this.loadTemplate(e,mxUtils.bind(this,function(c){this.spinner.stop();if(null!=c&&0<c.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=e,h=e.lastIndexOf("."),l=f.lastIndexOf("/");h>l&&0<l&&(f=f.substring(l+1,h),h=e.substring(h),this.useCanvasForExport||
-".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(d=f+h)}c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):d,!0);c.getHash=function(){return a};this.fileLoaded(c)||"https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),c=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+e.substring(31,e.lastIndexOf("&")),b),!0):!1}),!c()&&this.spinner.spin(document.body,
-mxResources.get("loading"))&&this.addListener("clientLoaded",c))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else c=null,"G"==a.charAt(0)?c=this.drive:"D"==a.charAt(0)?c=this.dropbox:"W"==a.charAt(0)?c=this.oneDrive:"H"==a.charAt(0)?c=this.gitHub:"T"==a.charAt(0)&&(c=this.trello),null==c?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),
-mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),c.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),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()}))})))}),e=this.getCurrentFile(),f=mxUtils.bind(this,function(){null!=e&&e.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=e&&(window.location.hash=e.getHash())}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null==a||0==a.length?f():null!=e&&e.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,f):f()};
+App.prototype.createFile=function(a,b,d,c,e,g,h,l){c=l?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(h=null!=this.stateArg?this.stateArg.folderId:h,this.drive.insertFile(a,b,h,mxUtils.bind(this,
+function(a){m();this.fileCreated(a,d,g,e)}),f)):c==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(c,mxUtils.bind(this,function(c){this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,g,e)}),f,!1,c)})):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,g,e)}),f,!1,h):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,g,e)}),f):
+c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,g,e)}),f,!1,h):c==App.MODE_BROWSER?(m(),c=mxUtils.bind(this,function(){var c=new StorageFile(this,b,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(c,d,g,e)}),f)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(m(),this.fileCreated(new LocalFile(this,
+b,a,null==c),d,g,e))}};
+App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var g=a.getData(),g=0<g.length?this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,!0):null,h=window.location.protocol+"//"+window.location.hostname+e,l=g,m=null;null!=g&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),
+l=this.decodeNodeIntoGraph(l,m));a.setData(this.createFileData(g,m,a,h));null!=m&&m.container.parentNode.removeChild(m.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){f();var g=this.getCurrentFile();null==d&&null!=g&&(d=!g.isModified()&&null==g.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}),
+k=mxUtils.bind(this,function(){d||null==g||!g.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=c&&c(),window.openWindow(e,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?k():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
+function(){k()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}};
+App.prototype.loadFile=function(a,b,d,c){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!=c&&c();else throw{message:mxResources.get("fileNotFound")};}catch(f){this.handleError(f,
+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!=d)this.spinner.stop(),this.fileLoaded(d),null!=c&&c();else if("R"==a.charAt(0))this.spinner.stop(),e=decodeURIComponent(a.substring(1)),
+"<"!=e.charAt(0)&&(e=this.editor.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!=c&&c();else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1));this.loadTemplate(g,mxUtils.bind(this,function(d){this.spinner.stop();if(null!=d&&0<d.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=g,h=g.lastIndexOf("."),l=f.lastIndexOf("/");
+h>l&&0<l&&(f=f.substring(l+1,h),h=g.substring(h),this.useCanvasForExport||".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(e=f+h)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);d.getHash=function(){return a};this.fileLoaded(d)||"https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),d=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+
+g.substring(31,g.lastIndexOf("&")),b,c),!0):!1}),!d()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",d))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else e=null,"G"==a.charAt(0)?e=this.drive:"D"==a.charAt(0)?e=this.dropbox:"W"==a.charAt(0)?e=this.oneDrive:"H"==a.charAt(0)?e=this.gitHub:"T"==a.charAt(0)&&(e=this.trello),null==e?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),e.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=c&&c()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==
+a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),g=this.getCurrentFile(),h=mxUtils.bind(this,function(){null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=g&&(window.location.hash=g.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()});null==a||0==a.length?h():null!=g&&g.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,h):h()};
App.prototype.getLibraryStorageHint=function(a){var b=a.getTitle();a.constructor!=LocalLibrary&&(b+="\n"+a.getHash());a.constructor==DriveLibrary?b+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?b+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?b+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?b+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?b+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?b+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(b+=" ("+mxResources.get("device")+")");return b};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,c){var d=0,f=[],h=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=f[a]&&this.loadLibrary(f[a]);null!=c&&c()}});if(null!=b)for(var l=0;l<b.length;l++){var m=encodeURIComponent(decodeURIComponent(b[l]));mxUtils.bind(this,
-function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){d++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];f[c]=a;d--;h()}),g=mxUtils.bind(this,function(){a(b);d--;h()});this.pendingLibraries[b]=!0;var k=b.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
-b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):g()}))}catch(z){g()}}),0);else if("U"==k){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){k=l;this.isCorsEnabledForUrl(k)||(k="t="+(new Date).getTime(),k=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+k);try{mxUtils.get(k,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(z){g()}else g()}),function(){g()})}catch(v){g()}}}else{var m=null;"G"==k?null!=
-this.drive&&null!=this.drive.user&&(m=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(m=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(m=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==k&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(m=this.oneDrive);null!=m?m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(z){g()}}),function(a){g()}):(delete this.pendingLibraries[b],
-g())}}})(m,l)}h()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,c){var d=0,g=[],h=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=g[a]&&this.loadLibrary(g[a]);null!=c&&c()}});if(null!=b)for(var l=0;l<b.length;l++){var m=encodeURIComponent(decodeURIComponent(b[l]));mxUtils.bind(this,
+function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){d++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];g[c]=a;d--;h()}),f=mxUtils.bind(this,function(){a(b);d--;h()});this.pendingLibraries[b]=!0;var k=b.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
+b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):f()}))}catch(z){f()}}),0);else if("U"==k){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){k=l;this.isCorsEnabledForUrl(k)||(k="t="+(new Date).getTime(),k=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+k);try{mxUtils.get(k,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(z){f()}else f()}),function(){f()})}catch(w){f()}}}else{var m=null;"G"==k?null!=
+this.drive&&null!=this.drive.user&&(m=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(m=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(m=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==k&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(m=this.oneDrive);null!=m?m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(z){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
+f())}}})(m,l)}h()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
this.shareButton=null)}};
@@ -7835,17 +7835,17 @@ App.prototype.save=function(a,b){var d=this.getCurrentFile(),c=mxResources.get("
b&&b()}),e=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,c,e):d.saveAs(a,c,e)}};
App.prototype.pickFolder=function(a,b,d){d=null!=d?d:!0;var c=this.spinner.pause();d&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){c();if(a.action==google.picker.Action.PICKED){var d=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(d=a.docs[0].id);b(d)}})):d&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){c();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,b(a))})):d&&a==App.MODE_GITHUB&&
null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){c();b(a)})):d&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){c();b(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,b,d,c,e,f){e==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(b,c?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):e==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(b,a,f,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),d,c,!1):e==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(b,c?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):e==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(b,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,f,c):e==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(b,c?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):e==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(b,a)}),null==localStorage.getItem(b)?
+App.prototype.exportFile=function(a,b,d,c,e,g){e==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(b,c?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):e==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(b,a,g,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),d,c,!1):e==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(b,c?this.base64ToBlob(a,d):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(b,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,g,c):e==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(b,c?this.base64ToBlob(a,d):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&&(d=mxUtils.bind(this,function(){localStorage.setItem(b,a)}),null==localStorage.getItem(b)?
d():this.confirm(mxResources.get("replaceIt",[b]),d))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var b=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,b);this.fname.setAttribute("title",b+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var b=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),b,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
App.prototype.showAuthDialog=function(a,b,d,c){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,b,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(h){this.editor.setStatus(mxUtils.htmlEntities(h.message))}}))).container,300,b?180:140,!0,!0,mxUtils.bind(this,function(a){null!=c&&c();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,b,d,c,e,f){var h=b;/\.svg$/i.test(h)||(h=h.substring(0,b.lastIndexOf("."))+c);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if((/\.vsdx$/i.test(b)||/\.vsd$/i.test(b))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);l||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(m.responseText),
-a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,h,!0))}),f,b)});m.send()}else{var g=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,h,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,h,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,h,!0))}catch(n){null!=f&&f(n)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
-"data:image/png;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));g(c)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,g,f,d)}};
+App.prototype.convertFile=function(a,b,d,c,e,g){var h=b;/\.svg$/i.test(h)||(h=h.substring(0,b.lastIndexOf("."))+c);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if((/\.vsdx$/i.test(b)||/\.vsd$/i.test(b))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);l||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(m.responseText),
+a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,h,!0))}),g,b)});m.send()}else{var f=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,h,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,h,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,h,!0))}catch(n){null!=g&&g(n)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
+"data:image/png;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));f(c)}}else null!=g&&g({code:App.ERROR_UNKNOWN})}),function(){null!=g&&g({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=g&&g({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,f,g,d)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));
@@ -7879,88 +7879,88 @@ b()}else this.trello.logout()}),mxResources.get("trello"));c||(b=document.create
var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&
(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};var b=Menus.prototype.init;Menus.prototype.init=function(){b.apply(this,
-arguments);var a=this.editorUi,d=a.editor.graph,f=mxUtils.bind(d,d.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
-"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),g=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
-"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&
-a.exportSvg(b/100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,
-mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=
+arguments);var a=this.editorUi,d=a.editor.graph,g=mxUtils.bind(d,d.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),f=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&
+a.exportSvg(b/100,c,d,e,g,f,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var g=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,
+mxResources.get(c?"compressed":"allPages"),!0);f.style.marginBottom="16px";mxEvent.addListener(g,"change",function(){g.checked?f.setAttribute("disabled","disabled"):f.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!f.checked:null,null,!g.checked,c?null:!f.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,g,f){b=new EmbedDialog(a,a.createLink(b,c,d,e,g,f,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,g,f,h,k,l,m){a.createHtml(b,c,d,e,g,f,h,k,l,m,mxUtils.bind(this,function(b,c){var d=
a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
-mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);g.style.marginBottom="16px";a.pdfPageExport||
+mxEvent.addListener(e,"change",function(){e.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();
if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+
-"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(G){a.handleError(G)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+
+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var g=new RevisionDialog(a,d);a.showDialog(g.container,640,480,!0,!0);g.init()}catch(G){a.handleError(G)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,g){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
+1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){g(a)})},function(a){g(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+
"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var k=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=
-!a.isMathEnabled();d.model.execute(b)});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.isMathEnabled()});k.isEnabled=f}isLocalStorage&&(k=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&&
+!a.isMathEnabled();d.model.execute(b)});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.isMathEnabled()});k.isEnabled=g}isLocalStorage&&(k=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&&
a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=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,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var u="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
-a.actions.addAction("copyStyle",function(){var b=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<u.length;f++){var g=u[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
-320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
-function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
+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],g=e.indexOf("=");if(0<=g){var f=e.substring(0,g),e=e.substring(g+1);null==a.copiedStyle[f]&&"none"==e&&(a.copiedStyle[f]="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]),g=0;g<u.length;g++){var f=u[g],h=a.copiedStyle[f];e.style[f]!=h&&d.setCellStyles(f,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,g,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
+function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));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,g,f,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));k=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));k.setToggleAction(!0);k.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?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")});k=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())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=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())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=
-d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
+this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],g=null;""!=e&&(g=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(g,Editor.checkmarkImage));return g});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,
-null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
-null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);
+null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","25");g.style.marginLeft="8px";mxEvent.addListener(g,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(g.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
+null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(g);mxEvent.addGestureListeners(g,function(a){document.activeElement!=g&&g.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){g.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);
this.addMenuItems(b,["support","-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);
this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],
c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),
-mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);
-e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var k=e.restore;e.restore=function(){g--;k.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],
+mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),g=e.createElement("output");e.appendChild(g);e=new mxXmlCanvas2D(g);
+e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var f=0,h=e.save;e.save=function(){f++;h.apply(this,arguments)};var k=e.restore;e.restore=function(){f--;k.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);l.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",f)})),this.addMenuItems(b,["testXmlImageExport"],
c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),
this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,
arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",
function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",
function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",
-b,function(b,c,d,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");
-d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=
-/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));
-a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
-"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=
-d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",
-new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
+b,function(b,c,d,e,g,f,h,k,l,m){a.createHtml(b,c,d,e,g,f,h,k,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");
+d.writeln("</html>");d.close();if(!e){var g=a.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";g.appendChild(e);a.document.body.insertBefore(g,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=
+/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);g.parentNode.removeChild(g)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));
+a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,g,f,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,g,f,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,g,f,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,g,f,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",
+new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,g,f,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});k=a.actions.addAction("search",
function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});k.setToggleAction(!0);k.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_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,
this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function e(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
-c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
-(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");k(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var k=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=
-!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,h,k,Math.round(l*f),Math.round(m*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;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,
-e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):g&&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(){e(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){e(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=
+c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,f=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;f.apply(g,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
+(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");k(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var k=mxUtils.bind(this,function(b,c,e){var g=d.view,f=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,f.x/g.scale-g.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(f.y+f.height)/g.scale-g.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(g){var f=
+!0,l=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,function(g,l,m){g=f?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,h,k,Math.round(l*g),Math.round(m*g),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),f)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){f=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,
+e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=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(){g(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
+c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},c):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){e(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){e(!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){k(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));a.showCsvImport&&b.addItem(mxResources.get("csv")+"...",
-null,function(){a.showImportCsvDialog()},c)})).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&"min"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
+null,function(){a.showImportCsvDialog()},c)})).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&"min"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
c);"min"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",
mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):
-null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&f.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?
+null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&g.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?
b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,
function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,
function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));
a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||
-this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var w="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),v=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),
-c)},z=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
-d.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",
-80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<w.length;c++)"-"==w[c]?a.addSeparator(b):
-v(a,b,mxResources.get(w[c])+"...",w[c])})));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")+
+this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var v="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),w=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),
+c)},z=function(a,b,c,e){var g=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(g.x,g.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+d.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",
+80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=g;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<v.length;c++)"-"==v[c]?a.addSeparator(b):
+w(a,b,mxResources.get(v[c])+"...",v[c])})));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):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?
-b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):g&&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")+
+b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=
a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},
-c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):g&&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,
+c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,
null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));
null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},
+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):f&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},
c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(G){a.handleError(G,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),
a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",
new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&
@@ -7982,8 +7982,8 @@ EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mx
null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=!1,c=null,e=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):
(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=
!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,d=0;d<c.length;d++)if(c[d]instanceof SelectPage||c[d]instanceof RenamePage||c[d]instanceof MovePage||c[d]instanceof mxRootChange){e();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),e=a.getAttribute("pageHeight"),f=a.getAttribute("background"),h=a.getAttribute("backgroundImage"),h=null!=h&&0<h.length?JSON.parse(h):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=f&&0<f.length?f:this.defaultGraphBackground,backgroundImage:null!=h?new mxImage(h.src,h.width,h.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=e?new mxRectangle(0,0,parseFloat(c),parseFloat(e)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),e=a.getAttribute("pageHeight"),g=a.getAttribute("background"),h=a.getAttribute("backgroundImage"),h=null!=h&&0<h.length?JSON.parse(h):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
+a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=g&&0<g.length?g:this.defaultGraphBackground,backgroundImage:null!=h?new mxImage(h.src,h.width,h.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=e?new mxRectangle(0,0,parseFloat(c),parseFloat(e)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
@@ -7999,8 +7999,8 @@ EditorUi.prototype.duplicatePage=function(a,b){var d=this.editor.graph,c=null;d.
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-d)/this.pages.length)+1),e=null,f=0;f<this.pages.length;f++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),e=c):mxEvent.consume(b)}));mxEvent.addListener(d,
-"dragend",mxUtils.bind(this,function(a){e=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=e&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=e&&c!=e&&this.movePage(e,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(f,this.createTabForPage(this.pages[f],c,this.pages[f]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
+d)/this.pages.length)+1),e=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),e=c):mxEvent.consume(b)}));mxEvent.addListener(d,
+"dragend",mxUtils.bind(this,function(a){e=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=e&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=e&&c!=e&&this.movePage(e,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(g,this.createTabForPage(this.pages[g],c,this.pages[g]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var h=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");h.style.position="absolute";h.style.right=this.editor.chromeless?"29px":"55px";h.style.fontSize="13pt";this.tabContainer.appendChild(h);var l=this.createControlTab(4,
"&nbsp;&#10095;");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=m+"px";mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(h,
0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -8012,63 +8012,63 @@ function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,funct
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,b,d){d=this.createTab(d);var c=a.getName();d.setAttribute("title",c);mxUtils.write(d,c);d.style.maxWidth=b+"px";d.style.width=b+"px";this.addTabListeners(a,d);42<b&&(d.style.textOverflow="ellipsis");return d};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;e=a==this.currentPage;d.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(f)&&e||mxEvent.isPopupTrigger(f))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!c){var h=new mxPopupMenu(this.createPageMenu(a));h.div.className+=" geMenubarMenu";h.smartSeparators=!0;h.showDisabled=!0;h.autoExpand=!0;h.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(h,arguments);this.resetCurrentMenu();h.destroy()});var l=mxEvent.getClientX(f),m=mxEvent.getClientY(f);h.popup(l,m,null,f);this.setCurrentMenu(h,b)}mxEvent.consume(f)}}))};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;e=a==this.currentPage;d.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(g){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(g)&&e||mxEvent.isPopupTrigger(g))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!c){var h=new mxPopupMenu(this.createPageMenu(a));h.div.className+=" geMenubarMenu";h.smartSeparators=!0;h.showDisabled=!0;h.autoExpand=!0;h.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(h,arguments);this.resetCurrentMenu();h.destroy()});var l=mxEvent.getClientX(g),m=mxEvent.getClientY(g);h.popup(l,m,null,g);this.setCurrentMenu(h,b)}mxEvent.consume(g)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,c){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,c){c.setAttribute("page",d.page.getId());return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.page=a.ui.getPageById(d.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,c){c.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(c.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,c));return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(d.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",d.getAttribute("relatedPage"));
-b.setAttribute("name",d.getAttribute("name"));c.relatedPage=new DiagramPage(b);d=d.cloneNode(!0);b=d.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var f=b.getAttribute("id");null==a.lookup(f)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return d};a.afterDecode=function(a,d,c){c.index=c.previousIndex;return c};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",b=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,c,d,l,m){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],h=0;h<d.length;h++){var u=this.view.getState(d[h]),p=null!=u?u.style:this.getCellStyle(d[h]);"1"==mxUtils.getValue(p,"treeFolding","0")&&(this.traverse(d[h],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[h]&&f.push(a);return a==d[h]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[h],
-a))}for(h=0;h<f.length;h++)this.model.setVisible(f[h],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);
-return b}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function l(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function m(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var m=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=q.getOutgoingEdges(q.model.getTerminal(d[0],
-!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<n.length;t++){var v=q.model.getTerminal(n[t],!1);if(f==l(v)){var u=q.view.getState(v);v!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(m,u)&&(d=10+Math.max(d,(Math.min(m.x+m.width,u.x+u.width)-Math.max(m.x,u.x))/k),g=10+Math.max(g,(Math.min(m.y+m.height,u.y+u.height)-Math.max(m.y,u.y))/k))}}p?g=0:d=0;for(t=0;t<n.length;t++)if(v=q.model.getTerminal(n[t],
-!1),f==l(v)&&(u=q.view.getState(v),v!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY()))){var C=[];q.traverse(u.cell,!0,function(a,b){null!=b&&C.push(b);C.push(a);return!0});q.moveCells(C,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function g(a){q.model.beginUpdate();try{var b=l(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
-var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);q.moveCells(g,h,k);return q.addCells(d,e)}finally{q.model.endUpdate()}}function k(a){q.model.beginUpdate();try{var b=
-q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=q.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=q.view.getBounds(f),m=l(a),n=q.view.translate,p=q.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+b.setAttribute("name",d.getAttribute("name"));c.relatedPage=new DiagramPage(b);d=d.cloneNode(!0);b=d.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var g=b.getAttribute("id");null==a.lookup(g)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return d};a.afterDecode=function(a,d,c){c.index=c.previousIndex;return c};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",b=Graph.prototype.foldCells;
+Graph.prototype.foldCells=function(a,c,d,l,m){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),g=[],h=0;h<d.length;h++){var u=this.view.getState(d[h]),p=null!=u?u.style:this.getCellStyle(d[h]);"1"==mxUtils.getValue(p,"treeFolding","0")&&(this.traverse(d[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[h]&&g.push(a);return a==d[h]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[h],
+a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);
+return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function l(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function m(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var g=l(a),f=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==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==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=f.x,e[1].geometry.y-=f.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var m=mxRectangle.fromRectangle(h);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=q.getOutgoingEdges(q.model.getTerminal(d[0],
+!0));if(null!=n){for(var p=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,t=f=d=0;t<n.length;t++){var w=q.model.getTerminal(n[t],!1);if(g==l(w)){var u=q.view.getState(w);w!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(m,u)&&(d=10+Math.max(d,(Math.min(m.x+m.width,u.x+u.width)-Math.max(m.x,u.x))/k),f=10+Math.max(f,(Math.min(m.y+m.height,u.y+u.height)-Math.max(m.y,u.y))/k))}}p?f=0:d=0;for(t=0;t<n.length;t++)if(w=q.model.getTerminal(n[t],
+!1),g==l(w)&&(u=q.view.getState(w),w!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY()))){var B=[];q.traverse(u.cell,!0,function(a,b){null!=b&&B.push(b);B.push(a);return!0});q.moveCells(B,(b?1:-1)*d,(b?1:-1)*f)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function f(a){q.model.beginUpdate();try{var b=l(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
+var e=q.model.getParent(a),g=e.geometry,f=[];q.view.currentRoot!=e&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);q.traverse(a,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);q.moveCells(f,h,k);return q.addCells(d,e)}finally{q.model.endUpdate()}}function k(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,g=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var f=0;f<c.length;f++){var h=q.model.getTerminal(c[f],!1);null!=h&&g.push(h)}var k=q.view.getBounds(g),m=l(a),n=q.view.translate,p=q.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function n(a,
-b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=l(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?p.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}var p=this,q=p.editor.graph,w=q.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var v=p.menus.createPopupMenu;p.menus.createPopupMenu=function(a,c,d){v.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())&&
+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 g=q.view.getState(q.model.getTerminal(a[e],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=l(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?p.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}var p=this,q=p.editor.graph,v=q.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=p.menus.createPopupMenu;p.menus.createPopupMenu=function(a,c,d){w.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(q.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(q.getSelectionCell())&&
(a.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};p.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),
a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",
-function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+T");var z=q.removeCells;q.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.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 z.apply(this,arguments)};p.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
-a)}this.model.beginUpdate();try{var h=t.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=q.getIncomingEdges(h[e]),g=q.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,q.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var x=q.moveCells;q.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||q.model.isEdge(a[p])&&null==q.model.getTerminal(a[p],!0)){f=q.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=q.getIncomingEdges(a[0]);if(0<t.length){var v=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=v){var u=q.view.getState(l);null!=u&&(c=(u.getCenterX()-v.getCenterX())/q.view.scale,d=(u.getCenterY()-v.getCenterY())/q.view.scale)}}}}k=x.apply(this,arguments);
+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+T");var z=q.removeCells;q.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],g=0;g<a.length;g++){var f=a[g];v.isEdge(f)&&c(f)&&(e.push(f),f=v.getTerminal(f,!1));b(f)?(q.traverse(f,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),f=q.getIncomingEdges(a[g]),a=a.concat(f)):e.push(a[g])}a=e;return z.apply(this,arguments)};p.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var g=q.view.getState(d[e]);if(null!=g&&b(g.cell))for(var f=q.getIncomingEdges(g.cell),g=0;g<f.length;g++)mxUtils.remove(f[g],
+a)}this.model.beginUpdate();try{var h=t.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=q.getIncomingEdges(h[e]),f=q.getIncomingEdges(a[e]);if(0==k.length&&0<f.length){var l=this.cloneCells([f[0]])[0];this.addEdge(l,q.getDefaultParent(),this.model.getTerminal(f[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var x=q.moveCells;q.moveCells=function(a,c,d,e,g,f,h){var k=null;this.model.beginUpdate();try{var l=g,m=this.view.getState(g),n=null!=m?m.style:this.getCellStyle(g);
+if(null!=a&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||q.model.isEdge(a[p])&&null==q.model.getTerminal(a[p],!0)){g=q.model.getParent(a[p]);break}if(null!=l&&g!=l&&null!=this.view.getState(a[0])){var t=q.getIncomingEdges(a[0]);if(0<t.length){var w=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=w){var u=q.view.getState(l);null!=u&&(c=(u.getCenterX()-w.getCenterX())/q.view.scale,d=(u.getCenterY()-w.getCenterY())/q.view.scale)}}}}k=x.apply(this,arguments);
if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&&(t=q.getIncomingEdges(a[p]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,
-q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=p.sidebar){var H=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=H.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=q.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:p.actions.get("selectChildren"),
-84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},y=p.onKeyDown;p.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(q.getSelectionCell()):k(q.getSelectionCell()):13==a.which&&(c=m(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],
+q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=p.sidebar){var H=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(a,c,d,e){var g=q.model,f=null;g.beginUpdate();try{if(f=H.apply(this,arguments),b(a))for(var h=0;h<f.length;h++)if(g.isEdge(f[h])&&null==g.getTerminal(f[h],!0)){g.setTerminal(f[h],a,!0);var k=q.getCellGeometry(f[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return f}}var E={88:p.actions.get("selectChildren"),
+84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},y=p.onKeyDown;p.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(q.getSelectionCell()):k(q.getSelectionCell()):13==a.which&&(c=m(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],
!1)):q.setSelectionCell(c[c.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=E[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(I){console.log("error",I)}mxEvent.isConsumed(a)||y.apply(this,arguments)};var B=q.connectVertex;q.connectVertex=function(a,c,d,e,f,h){var n=q.getIncomingEdges(a);return b(a)&&0<n.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?k(a):e==f?g(a):m(a,c!=mxConstants.DIRECTION_NORTH&&
-c!=mxConstants.DIRECTION_WEST)):B.call(this,a,c,d,e,f,h)};q.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&q.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(I){console.log("error",I)}mxEvent.isConsumed(a)||y.apply(this,arguments)};var D=q.connectVertex;q.connectVertex=function(a,c,d,e,g,h){var n=q.getIncomingEdges(a);return b(a)&&0<n.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?k(a):e==g?f(a):m(a,c!=mxConstants.DIRECTION_NORTH&&
+c!=mxConstants.DIRECTION_WEST)):D.call(this,a,c,d,e,g,h)};q.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&q.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var A=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){A.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var 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);e.insertEdge(f,!1);var u=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");u.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);u.insertEdge(p,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");q.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);q.insertEdge(w,!1);a.insert(d);a.insert(f);a.insert(p);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(u);a.insert(q);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var u=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");u.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);u.insertEdge(p,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");q.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);q.insertEdge(v,!1);a.insert(d);a.insert(g);a.insert(p);a.insert(v);a.insert(b);a.insert(c);a.insert(e);a.insert(u);a.insert(q);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;
-c.insertEdge(e,!0);d.insertEdge(e,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");n.geometry.relative=!0;n.edge=!0;c.insertEdge(n,!0);f.insertEdge(n,!1);a.insert(e);a.insert(n);a.insert(c);a.insert(d);a.insert(f);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");n.geometry.relative=!0;n.edge=!0;c.insertEdge(n,!0);g.insertEdge(n,!1);a.insert(e);a.insert(n);a.insert(c);a.insert(d);a.insert(g);return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,
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(546,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),
a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new e(a,mxResources.get("shapes"),10,56,c-6,Math.min(600,
-b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
-d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");
-f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
-mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
-a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var d=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
-document.getElementsByTagName("head")[0].appendChild(c)}catch(p){}var e=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+b.container.clientHeight-30),function(b){function c(c,d){var g=a.menus.get(c),f=e.addMenu(d,mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));f.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;";f.className="geTitle";b.appendChild(f);return f}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
+d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var g=document.createElement("span");
+g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("newLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";g=document.createElement("span");g.style.cssText="position:relative;top:6px;";
+mxUtils.write(g,mxResources.get("openLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
+a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
+document.getElementsByTagName("head")[0].appendChild(c)}catch(p){}var e=function(a,b,c,d,e,g,f){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";f(a);this.window=new mxWindow(b,a,c,d,e,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
@@ -8076,48 +8076,49 @@ Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>')
HoverIcons.prototype.triangleLeft=Graph.createSvgImage(36,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);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.HIGHLIGHT_SIZE=5;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;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var f=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){f.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var h=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+25;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var g=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){g.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var h=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):h.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
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,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;g.apply(this,arguments);
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;f.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};var k=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
function(a){a=k.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var 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="0px";a.appendChild(d);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
e.style.position="relative";e.style.top="4px";d.appendChild(e)}return a};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);
null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.actions.tagsWindow&&(this.actions.tagsWindow.window.setVisible(!1),this.actions.tagsWindow.window.destroy(),this.actions.tagsWindow=null);null!=this.actions.findWindow&&(this.actions.findWindow.window.setVisible(!1),this.actions.findWindow.window.destroy(),this.actions.findWindow=null);n.apply(this,arguments)};EditorUi.prototype.chromelessWindowResize=function(){};var u=EditorUi.prototype.init;
-EditorUi.prototype.init=function(){function c(a,b,c,d){var e=g.menus.get(a),f=F.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",
-f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML="",mxUtils.setOpacity(f,d||40)):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function e(a,b,c,d,e,g){var f=document.createElement("a");f.setAttribute("href","javascript:void(0)");f.className="geMenuItem";
-f.style.display="inline-block";f.style.boxSizing="border-box";f.style.height="30px";f.style.padding="6px";f.style.position="relative";f.style.verticalAlign="top";f.style.top="0px";G.appendChild(f);null!=g?(f.style.backgroundImage="url("+g+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px"):mxUtils.write(f,a);mxEvent.addListener(f,"click",function(a){"disabled"!=f.getAttribute("disabled")&&b();mxEvent.consume(a)});
-null==c&&(f.style.marginRight="4px");null!=d&&f.setAttribute("title",d);mxUtils.setOpacity(f,null!=g?40:100);null!=e&&(a=function(){e.isEnabled()?(f.removeAttribute("disabled"),mxUtils.setOpacity(f,null!=g?40:100),f.style.cursor=""):(f.setAttribute("disabled","disabled"),mxUtils.setOpacity(f,null!=g?10:50),f.style.cursor="default")},e.addListener("stateChanged",a),a());return f}function f(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign=
-"top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));G.appendChild(b);return b}u.apply(this,arguments);var g=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);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);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=
-mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
-g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){a(g)}));var l=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
-g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));
-if(isLocalStorage){var k=g.menus.get("openFrom"),m=k.funct;k.funct=function(a,b){m.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-",
-"revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var n=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){n.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);g.menus.addMenuItems(a,["publishLink"],b)})));var y=g.menus.get("language");g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);
-null!=y&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+
-mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var B="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
-g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<B.length;c++)"-"==B[c]?a.addSeparator(b):l(a,b,mxResources.get(B[c])+"...",B[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
-"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var G=document.createElement("div");G.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 F=new Menubar(g,G);(k=900>d)||c("diagram");f([k?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,e(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),g.actions.get("image"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)]);var A=c("insert",!0,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([A,e(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)]);if(480<=d){var C=g.actions.get("undo"),k=g.actions.get("redo"),C=e("",C.funct,null,mxResources.get("undo")+" ("+C.shortcut+")",C,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),k=e("",k.funct,
-null,mxResources.get("redo")+" ("+k.shortcut+")",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([C,k]);560<=d&&f([e("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
-c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=d?e("",g.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=d?e("",g.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null])}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var L=g.descriptorChanged;g.descriptorChanged=function(){L.apply(this,arguments);var a=g.getCurrentFile();
-if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);G.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else G.removeAttribute("title")};g.setStatusText(g.editor.getStatus());G.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";G.appendChild(g.buttonContainer);g.menubarContainer=
-g.buttonContainer;null!=y&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=d&&(A=F.addMenu("",y.funct),A.setAttribute("title",mxResources.get("language")),A.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",A.style.backgroundSize="24px 24px",A.style.position="absolute",A.style.height="24px",A.style.width="24px",A.style.zIndex="1",A.style.top="11px",A.style.right="14px",mxUtils.setOpacity(A,30),G.appendChild(A));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
-k=g.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";var D=g.menus.get("viewZoom");if(null!=D){this.tabContainer.style.right="70px";A=F.addMenu("100%",D.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+EditorUi.prototype.init=function(){function c(a,b,c,d){var e=f.menus.get(a),g=F.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.top="6px";g.style.marginRight="6px";g.style.height="30px";g.style.paddingTop="6px";g.style.paddingBottom="6px";g.setAttribute("title",mxResources.get(a));f.menus.menuCreated(e,g,"geMenuItem");null!=c?(g.style.backgroundImage="url("+c+")",
+g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px",g.innerHTML="",mxUtils.setOpacity(g,d||40)):b||(g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.style.backgroundPosition="right 6px center",g.style.backgroundRepeat="no-repeat",g.style.paddingRight="22px");return g}function e(a,b,c,d,e,f){var g=document.createElement("a");g.setAttribute("href","javascript:void(0)");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";G.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,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b();mxEvent.consume(a)});
+null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.setOpacity(g,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),mxUtils.setOpacity(g,null!=f?40:100),g.style.cursor=""):(g.setAttribute("disabled","disabled"),mxUtils.setOpacity(g,null!=f?10:50),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function g(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign=
+"top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));G.appendChild(b);return b}u.apply(this,arguments);var f=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);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);f.actions.get("insertText").label=mxResources.get("text");f.actions.get("insertText").label=mxResources.get("text");f.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";f.actions.get("insertRectangle").label=mxResources.get("rectangle");f.actions.get("insertEllipse").label=mxResources.get("ellipse");f.actions.get("insertRhombus").label=mxResources.get("rhombus");f.actions.get("insertImage").label=
+mxResources.get("image")+"...";f.actions.get("insertLink").label=mxResources.get("link")+"...";f.actions.get("createShape").label=mxResources.get("shape")+"...";f.actions.get("outline").label=mxResources.get("outline")+"...";f.actions.get("layers").label=mxResources.get("layers")+"...";f.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
+f.importFiles(a.files,null,null,f.maxImageSize)});a.click()}));f.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();f.showImportCsvDialog()}));f.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(f,"Insert from Text");f.showDialog(a.container,620,420,!0,!1);a.init()}));f.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(f)}));f.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){a(f)}));var l=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(f,c,d);f.showDialog(a.container,620,420,!0,!1);a.init()}),b)};f.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){f.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?f.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(f.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
+f.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(f.menus.addMenuItems(a,["new"],b),f.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),f.menus.addSubmenu("save",a,b));f.menus.addSubmenu("exportAs",a,b);var c=f.getCurrentFile();null!=c&&c.constructor==DriveFile&&(f.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&f.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));f.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||
+f.menus.addMenuItems(a,["-","print","-"],b);f.menus.addSubmenu("help",a,b);"1"==urlParams.embed?f.menus.addMenuItems(a,["-","exit"],b):f.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var k=f.menus.get("openFrom"),m=k.funct;k.funct=function(a,b){m.apply(this,arguments);a.addSeparator(b);f.menus.addSubmenu("openRecent",a,b)}}f.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=f.getCurrentFile();null!=c&&c.constructor==DriveFile?f.menus.addMenuItems(a,["createRevision","makeCopy",
+"-","rename","moveToFolder"],b):f.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||f.menus.addMenuItems(a,["-","revisionHistory"],b);f.menus.addMenuItems(a,["-","autosave"],b)})));var n=f.menus.get("exportAs");f.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){n.funct(a,b);a.addSeparator(b);f.menus.addSubmenu("embed",a,b);f.menus.addMenuItems(a,["publishLink"],b)})));var y=f.menus.get("language");f.menus.put("preferences",
+new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&f.menus.addSubmenu("theme",a,b);null!=y&&f.menus.addSubmenu("language",a,b);a.addSeparator(b);f.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&f.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);f.isOfflineApp()||"1"==urlParams.embed||f.menus.addMenuItems(a,["-","plugins"],b)})));f.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,
+"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));f.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);f.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);f.menus.addSubmenu("insertLayout",a,b);f.menus.addSubmenu("insertAdvanced",
+a,b)})));var D="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");f.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<D.length;c++)"-"==D[c]?a.addSeparator(b):l(a,b,mxResources.get(D[c])+"...",D[c])})));f.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));f.menus.put("embed",
+new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml","embedIframe"],b)})));f.toolbar=f.createToolbar(f.createDiv("geToolbar"));f.defaultLibraryName=mxResources.get("untitledLibrary");var G=document.createElement("div");G.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 F=new Menubar(f,G);(k=900>d)||c("diagram");g([k?
+c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,e(mxResources.get("shapes"),f.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),f.actions.get("image"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),
+f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+")",null,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var A=c("insert",!0,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);g([A,e(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=d){var B=f.actions.get("undo"),k=f.actions.get("redo"),B=e("",B.funct,null,mxResources.get("undo")+" ("+B.shortcut+")",B,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),k=e("",k.funct,
+null,mxResources.get("redo")+" ("+k.shortcut+")",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");g([B,k]);560<=d&&g([e("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
+c=h.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&f.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=d?e("",f.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=d?e("",f.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}f.statusContainer=f.createStatusContainer();f.statusContainer.style.position="relative";f.statusContainer.style.maxWidth="";f.statusContainer.style.marginTop="7px";f.statusContainer.style.marginLeft="6px";f.statusContainer.style.color="gray";f.statusContainer.style.cursor="default";f.editor.addListener("statusChanged",mxUtils.bind(this,function(){f.setStatusText(f.editor.getStatus())}));var L=f.descriptorChanged;f.descriptorChanged=function(){L.apply(this,arguments);var a=f.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);G.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else G.removeAttribute("title")};f.setStatusText(f.editor.getStatus());G.appendChild(f.statusContainer);f.buttonContainer=document.createElement("div");f.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";G.appendChild(f.buttonContainer);f.menubarContainer=
+f.buttonContainer;null!=y&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=d&&(A=F.addMenu("",y.funct),A.setAttribute("title",mxResources.get("language")),A.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",A.style.backgroundSize="24px 24px",A.style.position="absolute",A.style.height="24px",A.style.width="24px",A.style.zIndex="1",A.style.top="11px",A.style.right="14px",mxUtils.setOpacity(A,30),G.appendChild(A));f.tabContainer=document.createElement("div");f.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;";
+k=f.diagramContainer.parentNode;B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";f.diagramContainer.style.top="47px";f.diagramContainer.style.bottom="30px";var C=f.menus.get("viewZoom");if(null!=C){this.tabContainer.style.right="70px";A=F.addMenu("100%",C.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
A.style.backgroundPosition="right 6px center";A.style.backgroundRepeat="no-repeat";A.style.paddingRight="10px";A.style.display="block";A.style.position="absolute";A.style.textDecoration="none";A.style.textDecoration="none";A.style.right="0px";A.style.bottom="0px";A.style.overflow="hidden";A.style.textAlign="center";A.style.color="#000";A.style.fontSize="12px";A.style.color="#707070";A.style.width="59px";A.style.borderTop="1px solid lightgray";A.style.borderLeft="1px solid lightgray";A.style.height=
-parseInt(g.tabContainer.style.height)-1+"px";A.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";C.appendChild(A);D=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,D);g.editor.addListener("resetGraphView",D);g.editor.addListener("pageSelected",D);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility)}}C.appendChild(g.tabContainer);
-C.appendChild(G);C.appendChild(g.diagramContainer);k.appendChild(C);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.outlineWindow.fit();null!=g.actions.layersWindow&&g.outlineWindow.fit();null!=g.actions.tagsWindow&&g.tagsWindow.window.fit();null!=g.actions.findWindow&&g.findWindow.window.fit()})}}};
+parseInt(f.tabContainer.style.height)-1+"px";A.style.lineHeight=parseInt(f.tabContainer.style.height)+1+"px";B.appendChild(A);C=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*f.editor.graph.view.scale)+"%"});f.editor.graph.view.addListener(mxEvent.EVENT_SCALE,C);f.editor.addListener("resetGraphView",C);f.editor.addListener("pageSelected",C);var I=f.setGraphEnabled;f.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility)}}B.appendChild(f.tabContainer);
+B.appendChild(G);B.appendChild(f.diagramContainer);k.appendChild(B);f.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=f.sidebarWindow&&f.sidebarWindow.window.fit();null!=f.formatWindow&&f.formatWindow.window.fit();null!=f.actions.outlineWindow&&f.outlineWindow.fit();null!=f.actions.layersWindow&&f.outlineWindow.fit();null!=f.actions.tagsWindow&&f.tagsWindow.window.fit();null!=f.actions.findWindow&&f.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index 25c27c58..beb1bbe6 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -3075,8 +3075,8 @@ b.container.clientHeight-30),function(b){function d(d,c){var f=a.menus.get(d),g=
c.className="geTitle";mxUtils.write(c,mxResources.get("moreShapes"));b.appendChild(c);mxEvent.addListener(c,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){c=document.createElement("div");c.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";c.className="geTitle";var f=document.createElement("span");
f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("newLibrary").funct);c=document.createElement("div");c.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;";c.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
mxUtils.write(f,mxResources.get("openLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("openLibrary").funct)}else c=d("newLibrary",mxResources.get("newLibrary")),c.style.left="0",c=d("openLibraryFrom",mxResources.get("openLibraryFrom")),c.style.borderLeft="1px solid lightgray",c.style.left="50%";else c.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
-a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var e=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
+a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
document.getElementsByTagName("head")[0].appendChild(c)}catch(n){}var h=function(a,b,d,c,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,d,c,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 d=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,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
@@ -3107,14 +3107,15 @@ null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.
mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
"...",function(){a(g)}));var p=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
-g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));
-if(isLocalStorage){var m=g.menus.get("openFrom"),q=m.funct;m.funct=function(a,b){q.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-",
-"revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var u=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){u.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);g.menus.addMenuItems(a,["publishLink"],b)})));var F=g.menus.get("language");g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);
-null!=F&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+
-mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
-g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):p(a,b,mxResources.get(x[c])+"...",x[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
-"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var A=document.createElement("div");A.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 E=new Menubar(g,A);(m=900>e)||c("diagram");f([m?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),g.actions.get("image"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile&&(g.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&g.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||
+g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var m=g.menus.get("openFrom"),q=m.funct;m.funct=function(a,b){q.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["createRevision","makeCopy",
+"-","rename","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-","revisionHistory"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var u=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){u.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);g.menus.addMenuItems(a,["publishLink"],b)})));var F=g.menus.get("language");g.menus.put("preferences",
+new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);null!=F&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,
+"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",
+a,b)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):p(a,b,mxResources.get(x[c])+"...",x[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",
+new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml","embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var A=document.createElement("div");A.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 E=new Menubar(g,A);(m=900>e)||c("diagram");f([m?
+c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),g.actions.get("image"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),
+g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)]);var y=c("insert",!0,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([y,d(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)]);if(480<=e){var z=g.actions.get("undo"),m=g.actions.get("redo"),z=d("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),m=d("",m.funct,
null,mxResources.get("redo")+" ("+m.shortcut+")",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([z,m]);560<=e&&f([d("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index 605a596d..6679185e 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -6761,275 +6761,275 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})();
-DrawioFile=function(a,d){mxEventSource.call(this);this.ui=a;this.data=d||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,d,e,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,d,e){};DrawioFile.prototype.saveFile=function(a,d,e,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
-DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,e){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,d,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){var e=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
+DrawioFile=function(a,e){mxEventSource.call(this);this.ui=a;this.data=e||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,e,d,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,e,d){};DrawioFile.prototype.saveFile=function(a,e,d,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
+DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,e,d){};DrawioFile.prototype.isMovable=function(){return!1};
+DrawioFile.prototype.move=function(a,e,d){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
+DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){var d=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,d,e,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<d?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),
-mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
-DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,d){if(null!=a&&null!=d){var e=a.lastIndexOf("."),b=0<e?a.substring(e):"",e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return a==d};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,d,e,b){DrawioFile.call(this,a,d);this.title=e;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,d,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};
-LocalFile.prototype.saveFile=function(a,d,e,b){this.title=a;this.updateFileData();d=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,g?"image/png":"text/xml",g);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(g?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(d)};LocalFile.prototype.rename=function(a,d,e){this.title=a;this.descriptorChanged();null!=d&&d()};
-LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,d,e){LocalFile.call(this,a,d,e)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,d,e){DrawioFile.call(this,a,d);this.title=e};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,d,e){this.saveAs(this.getTitle(),d,e)};StorageFile.prototype.saveAs=function(a,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,d,e)};
-StorageFile.prototype.saveFile=function(a,d,e,b){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!=e&&e()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(e){this.isRenamable()&&this.getTitle()!=a&&null!=e?this.ui.confirm(mxResources.get("replaceIt",
-[a]),g,b):g()}))}else null!=e&&e()};StorageFile.prototype.rename=function(a,d,e){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,d)}),e)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),k,e):k()})):d()};
-StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,d,e){StorageFile.call(this,a,d,e)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};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,d,e){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,d,e){StorageFile.call(this,a,d,e);a=e;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+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,d,e){return!1};UrlLibrary.prototype.saveAs=function(a,d,e){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,d,e){function b(b,t,q,l,v,u){function w(){mxEvent.addListener(g,"click",null!=u?u:function(){q!=App.MODE_GOOGLE||a.isDriveDomain()?q==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,c.checked);d()})):(a.setMode(q,c.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}var g=document.createElement("a");g.style.overflow="hidden";g.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";g.className="geBaseButton";g.style.boxSizing="border-box";g.style.fontSize="11px";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 10px 12px 10px";g.style.width="88px";g.style.height="100px";g.style.whiteSpace="nowrap";g.setAttribute("title",t);mxClient.IS_QUIRKS&&(g.style.cssFloat="left",g.style.zoom="1");var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";if(null!=b){var x=document.createElement("img");
-x.setAttribute("src",b);x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width="60px";x.style.height="60px";x.style.paddingBottom="6px";g.appendChild(x)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",mxClient.IS_IOS?(g.style.padding="0px 10px 20px 10px",g.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");g.appendChild(y);mxUtils.write(y,t);if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(y),mxUtils.write(y,v[b]);if(null!=l&&null==a[l]){x.style.visibility=
-"hidden";mxUtils.setOpacity(y,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(g);var m=window.setTimeout(function(){null==a[l]&&(k.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(m),mxUtils.setOpacity(y,100),x.style.visibility="",k.stop(),w(),"drive"==l&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else w();
-p.appendChild(g);++f>=e&&(mxUtils.br(p),f=0)}e=null!=e?e:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=a.addLanguageMenu(g,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
-"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";k.appendChild(m);mxUtils.write(k,mxResources.get("help"));g.appendChild(k)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";
-n.style.bottom="28px";n.style.color="gray";mxUtils.write(n,mxResources.get("decideLater"));a.isOfflineApp()?n.style.right="20px":(mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)"),n.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=-Math.round(n.clientWidth/2)+"px"};g.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var c=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
-!0);Editor.useLocalStorage=c});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";p.style.padding="12px 0px 12px 0px";var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;var f=0,h=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop=
+DrawioFile.prototype.autosave=function(a,e,d,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<e?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),
+mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=d&&d(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
+DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var d=a.lastIndexOf("."),b=0<d?a.substring(d):"",d=e.lastIndexOf(".");return b===(0<d?e.substring(d):"")}return a==e};
+DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,e,d,b){DrawioFile.call(this,a,e);this.title=d;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};
+LocalFile.prototype.saveFile=function(a,e,d,b){this.title=a;this.updateFileData();e=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,g?"image/png":"text/xml",g);else if(b.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(b)+"&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(b)}));this.setModified(!1);this.contentChanged();null!=d&&d()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(e)};LocalFile.prototype.rename=function(a,e,d){this.title=a;this.descriptorChanged();null!=e&&e()};
+LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,e,d){LocalFile.call(this,a,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,e,d){DrawioFile.call(this,a,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
+StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(a,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,e,d)};
+StorageFile.prototype.saveFile=function(a,e,d,b){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!=d&&d()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=a&&null!=d?this.ui.confirm(mxResources.get("replaceIt",
+[a]),g,b):g()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,e,d){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,e)}),d)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),k,d):k()})):e()};
+StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,e,d){StorageFile.call(this,a,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};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,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,e,d){StorageFile.call(this,a,e,d);a=d;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,e,d){return!1};UrlLibrary.prototype.saveAs=function(a,e,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,e,d){function b(b,p,t,l,v,u){function w(){mxEvent.addListener(g,"click",null!=u?u:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,c.checked);e()})):(a.setMode(t,c.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}var g=document.createElement("a");g.style.overflow="hidden";g.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";g.className="geBaseButton";g.style.boxSizing="border-box";g.style.fontSize="11px";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 10px 12px 10px";g.style.width="88px";g.style.height="100px";g.style.whiteSpace="nowrap";g.setAttribute("title",p);mxClient.IS_QUIRKS&&(g.style.cssFloat="left",g.style.zoom="1");var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";if(null!=b){var x=document.createElement("img");
+x.setAttribute("src",b);x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width="60px";x.style.height="60px";x.style.paddingBottom="6px";g.appendChild(x)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",mxClient.IS_IOS?(g.style.padding="0px 10px 20px 10px",g.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");g.appendChild(y);mxUtils.write(y,p);if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(y),mxUtils.write(y,v[b]);if(null!=l&&null==a[l]){x.style.visibility=
+"hidden";mxUtils.setOpacity(y,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(g);var n=window.setTimeout(function(){null==a[l]&&(k.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(n),mxUtils.setOpacity(y,100),x.style.visibility="",k.stop(),w(),"drive"==l&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else w();
+q.appendChild(g);++f>=d&&(mxUtils.br(q),f=0)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=a.addLanguageMenu(g,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
+"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("valign","bottom");n.setAttribute("src",Editor.helpImage);n.style.marginRight="2px";k.appendChild(n);mxUtils.write(k,mxResources.get("help"));g.appendChild(k)}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"};g.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var c=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
+!0);Editor.useLocalStorage=c});var q=document.createElement("div");mxClient.IS_QUIRKS&&(q.style.whiteSpace="nowrap",q.style.cssFloat="left");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";q.style.padding="12px 0px 12px 0px";var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;var f=0,h=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);"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||b(IMAGE_PATH+"/osa_drive-harddisk.png",
-mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);g.appendChild(p);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(c);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));k.appendChild(m);mxUtils.br(k);var u=a.getRecent();if(null!=u&&
-0<u.length){var t=document.createElement("select");t.style.marginTop="8px";t.style.width="140px";var q=document.createElement("option");q.setAttribute("value","");q.setAttribute("selected","selected");q.style.textAlign="center";mxUtils.write(q,mxResources.get("openRecent")+"...");t.appendChild(q);for(q=0;q<u.length;q++)(function(a){var c=a.mode;c==App.MODE_GOOGLE?c="googleDrive":c==App.MODE_ONEDRIVE&&(c="oneDrive");var f=document.createElement("option");f.setAttribute("value",a.id);mxUtils.write(f,
-a.title+" ("+mxResources.get(c)+")");t.appendChild(f)})(u[q]);k.appendChild(t);mxEvent.addListener(t,"change",function(c){""!=t.value&&a.loadFile(t.value)})}else k.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(u=document.createElement("div"),u.style.cursor="pointer",u.style.padding="18px 0px 6px 0px",u.style.fontSize="12px",u.style.color="gray",mxUtils.write(u,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(u,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(u),p.style.paddingBottom="4px");p.appendChild(k);mxEvent.addListener(m,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
+mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);g.appendChild(q);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(c);n=document.createElement("span");n.style.color="gray";n.style.fontSize="12px";mxUtils.write(n," "+mxResources.get("rememberThisSetting"));k.appendChild(n);mxUtils.br(k);var u=a.getRecent();if(null!=u&&
+0<u.length){var p=document.createElement("select");p.style.marginTop="8px";p.style.width="140px";var t=document.createElement("option");t.setAttribute("value","");t.setAttribute("selected","selected");t.style.textAlign="center";mxUtils.write(t,mxResources.get("openRecent")+"...");p.appendChild(t);for(t=0;t<u.length;t++)(function(a){var c=a.mode;c==App.MODE_GOOGLE?c="googleDrive":c==App.MODE_ONEDRIVE&&(c="oneDrive");var f=document.createElement("option");f.setAttribute("value",a.id);mxUtils.write(f,
+a.title+" ("+mxResources.get(c)+")");p.appendChild(f)})(u[t]);k.appendChild(p);mxEvent.addListener(p,"change",function(c){""!=p.value&&a.loadFile(p.value)})}else k.style.marginTop="20px",q.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(u=document.createElement("div"),u.style.cursor="pointer",u.style.padding="18px 0px 6px 0px",u.style.fontSize="12px",u.style.color="gray",mxUtils.write(u,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(u,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(u),q.style.paddingBottom="4px");q.appendChild(k);mxEvent.addListener(n,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(h.style.padding="8px",h.style.fontSize="9pt",h.style.marginTop="-14px",h.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(h))},5E3);this.container=
-g},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";a.addLanguageMenu(d,!0);var e=null,e=a.getServiceCount();if(!a.isOffline()&&1<e){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.fontSize="12px";e.style.textDecoration="none";e.style.cursor="pointer";e.style.bottom="22px";e.style.left="26px";e.style.color=
-"gray";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";e.appendChild(b);mxUtils.write(e,mxResources.get("help"));d.appendChild(e)}e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.paddingTop="2px";e.style.margin="0px";e.style.color="gray";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="40px";
+g},SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";a.addLanguageMenu(e,!0);var d=null,d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";d.style.left="26px";d.style.color=
+"gray";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";d.appendChild(b);mxUtils.write(d,mxResources.get("help"));e.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="40px";
b.style.height="40px";b.style.marginRight="12px";b.style.paddingBottom="4px";var g="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",g=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",g=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",g=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+"/github-logo.svg",g=mxResources.get("github")):a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+
-"/trello-logo.svg",g=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",g=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var m=document.createElement("button");m.className="geBigButton";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(k.style.padding="42px 0px 56px 0px",m.style.marginBottom="12px"):
-(e.appendChild(b),mxUtils.write(e,g),d.appendChild(e),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",m.style.marginBottom="8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(m);mxUtils.br(k);m=document.createElement("button");
-m.className="geBigButton";m.style.marginBottom="22px";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){a.actions.get("open").funct()});k.appendChild(m);e="undefined";a.mode==App.MODE_GOOGLE?e=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?e=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?e=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?e=mxResources.get("github"):
-a.mode==App.MODE_TRELLO?e=mxResources.get("trello"):a.mode==App.MODE_DEVICE?e=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(e=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(g=function(b){m.style.marginBottom="24px";var e=document.createElement("a");e.setAttribute("href","javascript:void(0)");e.style.display="block";e.style.marginTop="6px";mxUtils.write(e,mxResources.get("signOut"));m.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(e,"click",
-function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(e)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(m.style.marginBottom="24px",g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="6px",mxUtils.write(g,mxResources.get("changeUser")+" ("+b.displayName+")"),m.style.marginBottom="16px",k.style.paddingBottom="18px",mxEvent.addListener(g,"click",function(){a.hideDialog();a.drive.clearUserId();
+"/trello-logo.svg",g=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",g=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var n=document.createElement("button");n.className="geBigButton";n.style.overflow="hidden";n.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(k.style.padding="42px 0px 56px 0px",n.style.marginBottom="12px"):
+(d.appendChild(b),mxUtils.write(d,g),e.appendChild(d),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",n.style.marginBottom="8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(n.style.width="340px");mxUtils.write(n,mxResources.get("createNewDiagram"));mxEvent.addListener(n,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(n);mxUtils.br(k);n=document.createElement("button");
+n.className="geBigButton";n.style.marginBottom="22px";n.style.overflow="hidden";n.style.width="340px";mxClient.IS_QUIRKS&&(n.style.width="340px");mxUtils.write(n,mxResources.get("openExistingDiagram"));mxEvent.addListener(n,"click",function(){a.actions.get("open").funct()});k.appendChild(n);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):
+a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(g=function(b){n.style.marginBottom="24px";var d=document.createElement("a");d.setAttribute("href","javascript:void(0)");d.style.display="block";d.style.marginTop="6px";mxUtils.write(d,mxResources.get("signOut"));n.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(d,"click",
+function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(d)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(n.style.marginBottom="24px",g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="6px",mxUtils.write(g,mxResources.get("changeUser")+" ("+b.displayName+")"),n.style.marginBottom="16px",k.style.paddingBottom="18px",mxEvent.addListener(g,"click",function(){a.hideDialog();a.drive.clearUserId();
a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),k.appendChild(g)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?g(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?g(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
-a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&g(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&g(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="8px",mxUtils.write(g,mxResources.get("notUsingService",[e])),mxEvent.addListener(g,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
-k.appendChild(g));d.appendChild(k);this.container=d},ConfirmDialog=function(a,d,e,b,g,k,m,n,p){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";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,d);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var h=document.createElement("input");h.setAttribute("type","checkbox");
-k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(h.checked)});k.className="geBtn";null!=n&&(k.innerHTML=n+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(h.checked)});f.appendChild(g);null!=m?(g.innerHTML=m+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",
-g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);p?(f.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(h),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),c.appendChild(f),mxEvent.addListener(m,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=
-c},ErrorDialog=function(a,d,e,b,g,k,m,n,p,c,f){p=null!=p?p:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=d){var u=document.createElement("div");u.style.padding="0px";u.style.margin="0px";u.style.fontSize="18px";u.style.paddingBottom="16px";u.style.marginBottom="16px";u.style.borderBottom="1px solid #c0c0c0";u.style.color="gray";mxUtils.write(u,d);h.appendChild(u)}d=document.createElement("div");d.style.padding="6px";d.innerHTML=e;h.appendChild(d);e=document.createElement("div");
-e.style.marginTop="16px";e.style.textAlign="center";null!=k&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),d.className="geBtn",e.appendChild(d),e.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",e.appendChild(c));var t=mxUtils.button(b,function(){p&&a.hideDialog();null!=g&&g()});t.className="geBtn";e.appendChild(t);null!=m&&(b=mxUtils.button(m,function(){p&&a.hideDialog();null!=n&&n()}),b.className="geBtn gePrimaryBtn",
-e.appendChild(b));this.init=function(){t.focus()};h.appendChild(e);this.container=h},EmbedDialog=function(a,d,e,b,g){b=document.createElement("div");var k=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);mxUtils.write(b,mxResources.get(5E5>d.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);var m=document.createElement("div");m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,a.formatFileSize(d.length));b.appendChild(m);var n=document.createElement("textarea");
-n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");b.appendChild(n);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(n.value=d,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=d.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>d.length?"preview":"openInNewWindow"),
-function(){var c=5E5>d.length?n.value:d;if(null!=g)g(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==e||0<e)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),e||500)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+d+"</body></html>");b.close()}}),p.className="geBtn",m.appendChild(p));if(!k||7500<d.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",d,"text/plain")});c.className="geBtn";m.appendChild(c)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(c)}catch(u){a.handleError({message:u.message||
-mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);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";m.appendChild(f)}7168>d.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+
-encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(c)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",f.appendChild(c),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",m.appendChild(f))}c=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.appendChild(c);f=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?
-c.className="geBtn gePrimaryBtn":(m.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(m.appendChild(p),c.className="geBtn",p.className="geBtn gePrimaryBtn");b.appendChild(m);this.container=b};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,d){function e(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(H.checked&&""!=u.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=h.value&&(b+="&height="+h.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(x.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+
-(l.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+p;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":w.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?b+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
-encodeURIComponent(a)),""!=h.value&&(a=parseInt(h.value)+parseInt(f.value),b+="&height="+a),c.value=b):c.value=""}var b=document.createElement("div"),g=a.editor.graph,k=g.getGraphBounds(),m=g.view.scale,n=Math.floor(k.x/m-g.view.translate.x),p=Math.floor(k.y/m-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";b.appendChild(c);
-mxUtils.br(b);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,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=n;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var h=document.createElement("input");h.setAttribute("type",
-"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/m);b.appendChild(h);mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=d||"";
-b.appendChild(u);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";b.appendChild(t);mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("pan")+" ");var x=document.createElement("input");
+a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&g(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&g(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="8px",mxUtils.write(g,mxResources.get("notUsingService",[d])),mxEvent.addListener(g,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
+k.appendChild(g));e.appendChild(k);this.container=e},ConfirmDialog=function(a,e,d,b,g,k,n,m,q){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";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,e);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var h=document.createElement("input");h.setAttribute("type","checkbox");
+k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(h.checked)});k.className="geBtn";null!=m&&(k.innerHTML=m+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(h.checked)});f.appendChild(g);null!=n?(g.innerHTML=n+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",
+g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);q?(f.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(h),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),c.appendChild(f),mxEvent.addListener(n,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=
+c},ErrorDialog=function(a,e,d,b,g,k,n,m,q,c,f){q=null!=q?q:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=e){var u=document.createElement("div");u.style.padding="0px";u.style.margin="0px";u.style.fontSize="18px";u.style.paddingBottom="16px";u.style.marginBottom="16px";u.style.borderBottom="1px solid #c0c0c0";u.style.color="gray";mxUtils.write(u,e);h.appendChild(u)}e=document.createElement("div");e.style.padding="6px";e.innerHTML=d;h.appendChild(e);d=document.createElement("div");
+d.style.marginTop="16px";d.style.textAlign="center";null!=k&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),e.className="geBtn",d.appendChild(e),d.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=f&&f()}),c.className="geBtn",d.appendChild(c));var p=mxUtils.button(b,function(){q&&a.hideDialog();null!=g&&g()});p.className="geBtn";d.appendChild(p);null!=n&&(b=mxUtils.button(n,function(){q&&a.hideDialog();null!=m&&m()}),b.className="geBtn gePrimaryBtn",
+d.appendChild(b));this.init=function(){p.focus()};h.appendChild(d);this.container=h},EmbedDialog=function(a,e,d,b,g){b=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);mxUtils.write(b,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);var n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,a.formatFileSize(e.length));b.appendChild(n);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");b.appendChild(m);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(m.value=e,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=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};n=document.createElement("div");n.style.position="absolute";n.style.bottom="36px";n.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),
+function(){var c=5E5>e.length?m.value:e;if(null!=g)g(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>");b.close()}}),q.className="geBtn",n.appendChild(q));if(!k||7500<e.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",e,"text/plain")});c.className="geBtn";n.appendChild(c)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(c)}catch(u){a.handleError({message:u.message||
+mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);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";n.appendChild(f)}7168>e.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+
+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(c)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",f.appendChild(c),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",n.appendChild(f))}c=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});n.appendChild(c);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>e.length?mxClient.IS_SF||null!=document.documentMode?
+c.className="geBtn gePrimaryBtn":(n.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(n.appendChild(q),c.className="geBtn",q.className="geBtn gePrimaryBtn");b.appendChild(n);this.container=b};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,e){function d(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(H.checked&&""!=u.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=p.value&&"0"!=p.value&&(b+="&border="+p.value);""!=h.value&&(b+="&height="+h.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(x.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+
+(l.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+q;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":w.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?b+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
+encodeURIComponent(a)),""!=h.value&&(a=parseInt(h.value)+parseInt(f.value),b+="&height="+a),c.value=b):c.value=""}var b=document.createElement("div"),g=a.editor.graph,k=g.getGraphBounds(),n=g.view.scale,m=Math.floor(k.x/n-g.view.translate.x),q=Math.floor(k.y/n-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";b.appendChild(c);
+mxUtils.br(b);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,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;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var h=document.createElement("input");h.setAttribute("type",
+"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/n);b.appendChild(h);mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=e||"";
+b.appendChild(u);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","3");p.style.marginBottom="8px";p.style.marginLeft="4px";p.value="0";b.appendChild(p);mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";b.appendChild(t);mxUtils.write(b,mxResources.get("pan")+" ");var x=document.createElement("input");
x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,mxResources.get("zoom")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";w.setAttribute("title",window.location.href);b.appendChild(w);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
mxResources.get("asNew")+" ");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;l.style.marginLeft="16px";b.appendChild(l);mxUtils.write(b,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("fit")+" ");var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginLeft=
-"8px";b.appendChild(H);mxUtils.write(b,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(q,"change",e);mxEvent.addListener(x,"change",e);mxEvent.addListener(l,"change",e);mxEvent.addListener(v,"change",e);mxEvent.addListener(w,"change",e);mxEvent.addListener(y,"change",e);mxEvent.addListener(H,"change",e);mxEvent.addListener(h,"change",e);mxEvent.addListener(f,"change",e);mxEvent.addListener(t,"change",e);mxEvent.addListener(u,"change",e);e();
-mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";k.appendChild(m);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,d,e){var b=document.createElement("div");b.style.textAlign=
-"right";this.init=function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var k=new Graph(d);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";k.cellRenderer.installCellOverlayListeners=
-function(a,c,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(l){c.fireEvent(new mxEventObject("pointerdown","event",l,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(l){c.fireEvent(new mxEventObject("pointerdown","event",l,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
-!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=k.getDefaultParent(),p=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,l){k.connectionHandler.reset();k.clearSelection();var b=k.getCellGeometry(a),f;h(function(){f=k.insertVertex(n,null,"Entry",b.x,b.y,80,30,"rounded=1;");p(f);k.view.refresh(f);
-k.insertEdge(n,null,"",a,f,m)},function(){k.scrollCellToVisible(f)})});c.addListener("pointerdown",function(a,c){var b=c.getProperty("event"),l=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var f=mxUtils.convertPoint(k.container,mxEvent.getClientX(b),mxEvent.getClientY(b));k.connectionHandler.start(l,f.x,f.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(n,null,"Start",
-0,0,80,30,"ellipse"),p(c)}finally{k.getModel().endUpdate()}var f;"horizontalTree"==e?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==e?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==e?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==e?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==e&&(f=new mxCircleLayout(k));if(null!=f){var h=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(l){throw l;}finally{var h=new mxMorphing(k);h.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));h.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,c,b,l,f){u.apply(this,arguments);h()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);h()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){h()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);var q=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),b=a.editor.graph.view,f=b.getBounds(c);f.x-=b.translate.x;f.y-=b.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(c);null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(t)};this.container=b};
+"8px";b.appendChild(H);mxUtils.write(b,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(t,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(H,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);d();
+mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});n.className="geBtn gePrimaryBtn";k.appendChild(n);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,e,d){var b=document.createElement("div");b.style.textAlign=
+"right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);b.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";k.cellRenderer.installCellOverlayListeners=
+function(a,c,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){c.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){c.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
+!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,n);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=k.getDefaultParent(),q=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,b){k.connectionHandler.reset();k.clearSelection();var l=k.getCellGeometry(a),f;h(function(){f=k.insertVertex(m,null,"Entry",l.x,l.y,80,30,"rounded=1;");q(f);k.view.refresh(f);
+k.insertEdge(m,null,"",a,f,n)},function(){k.scrollCellToVisible(f)})});c.addListener("pointerdown",function(a,c){var b=c.getProperty("event"),f=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var l=mxUtils.convertPoint(k.container,mxEvent.getClientX(b),mxEvent.getClientY(b));k.connectionHandler.start(f,l.x,l.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(m,null,"Start",
+0,0,80,30,"ellipse"),q(c)}finally{k.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(k));if(null!=f){var h=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(l){throw l;}finally{var h=new mxMorphing(k);h.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));h.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,c,b,f,p){u.apply(this,arguments);h()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);h()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){h()})}var p=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&b.appendChild(p);var t=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
+var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),b=a.editor.graph.view,f=b.getBounds(c);f.x-=b.translate.x;f.y-=b.translate.y;a.editor.graph.scrollRectToVisible(f);a.editor.graph.setSelectionCells(c);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(p)};this.container=b};
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,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";e.appendChild(b);mxUtils.write(e,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(e);var b=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!=b?b.src:"";var k=!1,m=function(){k||""==g.value||a.isOffline()?(n.value="",p.value=""):a.loadImage(mxUtils.trim(g.value),function(a){n.value=a.width;p.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";n.value="";p.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=e.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=
-b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,b,f,h,t){g.value=a;m()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(g.value=decodeURIComponent(f),m())}c.stopPropagation();c.preventDefault()}),!1)}};e.appendChild(g);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("width")+":");var n=document.createElement("input");
-n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.width:"";e.appendChild(n);mxUtils.write(e,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=b?b.height:"";e.appendChild(p);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";n.value="";p.value="";k=!1});mxEvent.addListener(b,"mousedown",
-function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";e.appendChild(b);mxUtils.br(e);mxEvent.addListener(g,"change",m);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,m()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+var BackgroundImageDialog=function(a,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";d.appendChild(b);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var b=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!=b?b.src:"";var k=!1,n=function(){k||""==g.value||a.isOffline()?(m.value="",q.value=""):a.loadImage(mxUtils.trim(g.value),function(a){m.value=a.width;q.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";m.value="";q.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=d.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=
+b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,b,f,h,p){g.value=a;n()},function(){},
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(g.value=decodeURIComponent(f),n())}c.stopPropagation();c.preventDefault()}),!1)}};d.appendChild(g);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,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!=b?b.width:"";d.appendChild(m);mxUtils.write(d,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="16px";q.value=null!=b?b.height:"";d.appendChild(q);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";m.value="";q.value="";k=!1});mxEvent.addListener(b,"mousedown",
+function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(g,"change",n);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,n()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);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 c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
f.className="geBtn";b.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 c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=g.value?new mxImage(mxUtils.trim(g.value),n.value,p.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);e.appendChild(b);this.container=e},ParseDialog=function(a,d){function e(c,b){var f=c.split("\n");if("plantUmlPng"==b||"plantUmlSvg"==
-b||"plantUmlTxt"==b){var f="plantUmlTxt"==b?PLANT_URL+"/txt/":"plantUmlPng"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/",h=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},e=function(a,c,f){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|f>>6;c4=f&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=
-t(c4&63)},l=new XMLHttpRequest;l.open("GET",f+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+e(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+e(a.charCodeAt(k),0,0):r+e(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);"plantUmlTxt"!=b&&(l.responseType="blob");l.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==b){a.spinner.stop();h.getModel().beginUpdate();try{cell=h.insertVertex(null,
-null,"<pre>"+this.response+"</pre>",g.x,g.y,1,1,"text;html=1;overflow=fill;"),h.updateCellSize(cell,!0)}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())}else f=new FileReader,f.readAsDataURL(this.response),f.onload=function(f){var b=new Image;b.onload=function(){a.spinner.stop();var l=b.width,t=b.height;if(0==l&&0==t){var w=f.target.result,e=w.indexOf(","),w=decodeURIComponent(escape(atob(w.substring(e+1)))),w=mxUtils.parseXml(w).getElementsByTagName("svg");
-0<w.length&&(l=parseFloat(w[0].getAttribute("width")),t=parseFloat(w[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,c,g.x,g.y,l,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(f.target.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};b.src=f.target.result},f.onerror=function(c){a.handleError(c)};else a.spinner.stop(),a.handleError(f)};l.onerror=
-function(c){a.handleError(c)};l.send()}}else if("table"==b){for(var v=null,d=[],u=0,k=0;k<f.length;k++)if(l=mxUtils.trim(f[k]),"create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),v=new mxCell(l,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;"),
-v.vertex=!0,d.push(v),l=a.editor.graph.getPreferredSizeForCell(n),null!=l&&(v.geometry.width=l.width+10);else if(null!=v&&")"==l.charAt(0))u+=v.geometry.width+40,v=null;else if("("!=l&&null!=v&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var m=l.toLowerCase().indexOf("primary key"),l=l.replace(/primary key/i,""),n=new mxCell(l,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;l=sb.cloneCell(n,0<m?"PK":"");l.connectable=!1;l.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;";l.geometry.width=30;l.geometry.height=26;n.insert(l);l=a.editor.graph.getPreferredSizeForCell(n);null!=l&&v.geometry.width<l.width+10&&(v.geometry.width=Math.min(220,l.width+10));v.insert(n);v.geometry.height+=26}0<d.length&&(h=a.editor.graph,
-f=h.view,l=h.getGraphBounds(),h.setSelectionCells(h.importCells(d,Math.ceil(Math.max(0,l.x/f.scale-f.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(l.y+l.height)/f.scale-f.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==b){if(0<f.length){h=a.editor.graph;v=new mxCell(f[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-v.vertex=!0;l=h.getPreferredSizeForCell(v);null!=l&&v.geometry.width<l.width+10&&(v.geometry.width=l.width+10);n=[v];if(1<f.length)for(k=1;k<f.length;k++)"--"==f[k]?(l=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;"),l.vertex=!0,v.geometry.height+=l.geometry.height,v.insert(l),n.push(l)):0<f[k].length&&";"!=f[k].charAt(0)&&(u=new mxCell(f[k],
-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,l=h.getPreferredSizeForCell(u),null!=l&&u.geometry.width<l.width&&(u.geometry.width=l.width),v.geometry.width=Math.max(v.geometry.width,u.geometry.width),v.geometry.height+=u.geometry.height,v.insert(u),n.push(u));h.getModel().beginUpdate();try{v=h.importCells([v],g.x,g.y)[0],h.fireEvent(new mxEventObject("cellsInserted",
-"cells",[v].concat(v.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(v);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var n=function(a){var c=p[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,p[a]=c,d.push(c));return c},p={},d=[],k=0;k<f.length;k++)if(";"!=f[k].charAt(0)){var z=f[k].split("->");2<=z.length&&(u=n(z[0]),m=n(z[z.length-1]),z=new mxCell(2<z.length?z[1]:"",new mxGeometry),z.edge=!0,u.insertEdge(z,!0),m.insertEdge(z,!1),
-d.push(z))}if(0<d.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);h=new Graph(f);h.getModel().beginUpdate();try{d=h.importCells(d);for(k=0;k<d.length;k++)h.getModel().isVertex(d[k])&&(l=h.getPreferredSizeForCell(d[k]),d[k].geometry.width=Math.max(d[k].geometry.width,l.width),d[k].geometry.height=Math.max(d[k].geometry.height,l.height));v=new mxFastOrganicLayout(h);v.disableEdgeStyle=!1;v.forceConstant=120;v.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();
-n=[];a.editor.graph.getModel().beginUpdate();try{n=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(n[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());h.destroy();f.parentNode.removeChild(f)}}}function b(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
-"table"==n.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==n.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"==n.value||"plantUmlTxt"==n.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(),k=document.createElement("div");k.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height="354px";m.style.marginBottom="16px";
-var n=document.createElement("select"),p=document.createElement("option");p.setAttribute("value","list");p.setAttribute("selected","selected");mxUtils.write(p,mxResources.get("list"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value","table");mxUtils.write(p,mxResources.get("table"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value",
-"plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,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()&&(n.appendChild(p),n.appendChild(c),
-n.appendChild(f));var h=b();m.value=h;k.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){m.value=a.target.result};c.readAsText(a)}},!1));k.appendChild(n);mxEvent.addListener(n,"change",function(){var a=b();if(0==m.value.length||
-m.value==h)h=a,m.value=h});p=mxUtils.button(mxResources.get("close"),function(){m.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&k.appendChild(p);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();e(m.value,n.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(p);this.container=k},NewDialog=function(a,d,e,b,g,k,m,n,p,c,f,h,u,t,q){function x(){for(var a=
-!0;F<N.length&&(a||0!=mxUtils.mod(F,30));)a=N[F++],l(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function w(){if(P)e||a.hideDialog(),t(P,O,C.value);else if(b)e||a.hideDialog(),b(T,C.value);else{var c=C.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(f){a.createFile(c,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
-null,f)})}}function y(a,c,f,b,l){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");G.removeAttribute("disabled");T=c;V=f;R=a;P=b;O=l;R.style.backgroundColor=n;R.style.border=p}function l(a,c,f,b,l,h,t,e){var d=document.createElement("div");d.className="geTemplate";d.style.height=S+"px";d.style.width=Y+"px";null!=b&&0<b.length&&d.setAttribute("title",b);if(null!=h)d.style.backgroundImage="url("+h+")",d.style.backgroundSize="contain",d.style.backgroundPosition=
-"center center",d.style.backgroundRepeat="no-repeat",mxEvent.addListener(d,"click",function(c){y(d,null,null,a,t)}),mxEvent.addListener(d,"dblclick",function(a){w()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);d.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(d,"click",function(f){G.setAttribute("disabled","disabled");d.style.backgroundColor="transparent";
-d.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(d,a.getText(),c),v&&w())}))});mxEvent.addListener(d,"dblclick",function(a){v=!0})}else d.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(f)+"</td></tr></table>",l&&y(d),null!=e?mxEvent.addListener(d,"click",e):(mxEvent.addListener(d,"click",function(a){y(d)}),mxEvent.addListener(d,"dblclick",function(a){w()}));
-K.appendChild(d)}function v(){mxEvent.addListener(K,"scroll",function(a){K.scrollTop+K.clientHeight>=K.scrollHeight&&(x(),mxEvent.consume(a))});var a=null,f;for(f in J){var b=document.createElement("div"),l=mxResources.get(f),h=J[f];null==l&&(l=f.substring(0,1).toUpperCase()+f.substring(1));18<l.length&&(l=l.substring(0,18)+"&hellip;");b.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";b.setAttribute("title",l+" ("+
-h.length+")");mxUtils.write(b,b.getAttribute("title"));null!=c&&(b.style.padding=c);Q.appendChild(b);null==a&&(a=b,a.style.backgroundColor=m);(function(c,f){mxEvent.addListener(b,"click",function(){a!=f&&(a.style.backgroundColor="",a=f,a.style.backgroundColor=m,K.scrollTop=0,K.innerHTML="",F=0,N=J[c],D=null,x())})})(f,b)}x()}e=null!=e?e:!0;g=null!=g?g:!1;m=null!=m?m:"#ebf2f9";n=null!=n?n:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var H=document.createElement("div");
-H.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";e&&H.appendChild(E);var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="40px";A.style.height="40px";A.style.marginRight="10px";A.style.paddingBottom="4px";A.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";!d&&e&&E.appendChild(A);e&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");A=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?A=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?A=a.dropbox.extension:
-a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?A=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?A=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(A=a.trello.extension);var C=document.createElement("input");C.setAttribute("value",a.defaultFilename+A);C.style.marginRight="20px";C.style.marginLeft="10px";C.style.width=d?"220px":"430px";this.init=function(){e&&(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?C.select():document.execCommand("selectAll",
-!1,null))};e&&E.appendChild(C);var E=!1,F=0,G=mxUtils.button(mxResources.get("create"),function(){G.setAttribute("disabled","disabled");w();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(h||u){var z=[],D=null,M=function(a){G.setAttribute("disabled","disabled");for(var c=0;c<z.length;c++)z[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},E=!0,A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";H.appendChild(A);var B=mxUtils.button(mxResources.get("Templates",
-null,"Templates"),function(){Q.style.display="";K.style.left="160px";M(0);K.scrollTop=0;K.innerHTML="";F=0;D!=N&&(N=D,x(),D=null)});z.push(B);A.appendChild(B);var I=function(a){Q.style.display="none";K.style.left="30px";M(a?-1:1);null==D&&(D=N);K.scrollTop=0;K.innerHTML="";var c=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.spin(K);F=0;var f=function(a,f){c.stop();N=a;f?K.innerHTML=f:0==a.length?K.innerHTML=
-mxResources.get("noDiagrams",null,"No Diagrams Found"):(K.innerHTML="",x())};a?u(L.value,f):h(f)};h&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){I()}),A.appendChild(B),z.push(B));if(u){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxResources.get("search")+":";A.appendChild(B);var L=document.createElement("input");L.style.marginRight="10px";L.style.marginLeft="10px";L.style.width="220px";mxEvent.addListener(L,"keypress",function(a){13==a.keyCode&&
-I(!0)});A.appendChild(L);B=mxUtils.button(mxResources.get("search"),function(){I(!0)});B.className="geBtn";A.appendChild(B)}M(0)}var V=null,T=null,R=null,P=null,O=null,K=document.createElement("div");K.style.border="1px solid #d3d3d3";K.style.position="absolute";K.style.left="160px";K.style.right="34px";E=(e?72:40)+(E?30:0);K.style.top=E+"px";K.style.bottom="68px";K.style.margin="6px 0 0 -1px";K.style.padding="6px";K.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+
-E+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,J={},aa=1;J.basic=[{title:"blankDiagram",select:!0}];var N=J.basic;if(!d){H.appendChild(Q);H.appendChild(K);var X=!1;mxUtils.get(f,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var f=c.indexOf("/"),c=c.substring(0,f),f=J[c];null==f&&(aa++,f=[],J[c]=f);f.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),
-title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}v()}})}mxEvent.addListener(C,"keypress",function(a){13==a.keyCode&&w()});f=document.createElement("div");f.style.marginTop=d?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";E=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});E.className="geBtn";!a.editor.cancelFirst||g&&null==k||f.appendChild(E);d||a.isOffline()||
-!e||null!=b||g||(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));d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(C.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?
-window.location.href=c:window.openWindow(c))},mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),d.className="geBtn",f.appendChild(d));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(f){a.openFiles(c.files,!0)});c.click()}),q.className="geBtn",f.appendChild(q));f.appendChild(G);a.editor.cancelFirst||null!=
-b||g&&null==k||f.appendChild(E);H.appendChild(f);this.container=H},CreateDialog=function(a,d,e,b,g,k,m,n,p,c,f,h,u,t,q){function x(c,f,b,l){function t(){mxEvent.addListener(e,"click",function(){var c=b;if(m){var f=v.value,l=f.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>l){var c=null!=c?c:A.value,h="";c==App.MODE_GOOGLE?h=a.drive.extension:c==App.MODE_GITHUB?h=a.gitHub.extension:c==App.MODE_TRELLO?h=a.trello.extension:c==App.MODE_DROPBOX?h=a.dropbox.extension:c==App.MODE_ONEDRIVE?h=a.oneDrive.extension:
-c==App.MODE_DEVICE&&(h=".xml");0<=l&&(f=f.substring(0,l));v.value=f+h}}w(b)})}var e=document.createElement("a");e.style.overflow="hidden";var q=document.createElement("img");q.src=c;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 g=document.createElement("div");e.appendChild(g);mxUtils.write(g,f);if(null!=l&&null==a[l]){q.style.visibility="hidden";mxUtils.setOpacity(g,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(e);var y=window.setTimeout(function(){null==a[l]&&(u.stop(),e.style.display=
-"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(y),mxUtils.setOpacity(g,100),q.style.visibility="",u.stop(),t())}))}else t();H.appendChild(e);++E==h&&(mxUtils.br(H),E=0)}function w(c){var f=v.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),e(f,c)}m=null!=m?m:!0;n=null!=n?n:!0;h=null!=h?h:4;var y=document.createElement("div");null==b&&a.addLanguageMenu(y);var l=document.createElement("h2");mxUtils.write(l,g||mxResources.get("create"));l.style.marginTop=
-"0px";l.style.marginBottom="24px";y.appendChild(l);mxUtils.write(y,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",d);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};y.appendChild(v);null!=u&&null!=t&&"image/"==t.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==
-t&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(u),u=g.getElementsByTagName("svg")[0],t=parseInt(u.getAttribute("width")),q=parseInt(u.getAttribute("height")),u.setAttribute("viewBox","0 0 "+t+" "+q),u.setAttribute("width","120px"),u.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src","data:"+t+(q?";base64,":";utf8,")+u)),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%)"),y.appendChild(g),p&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){w("_blank")})));mxUtils.br(y);var H=document.createElement("div");H.style.textAlign="center";var E=0;H.style.marginTop="6px";y.appendChild(H);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),
+a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e(""!=g.value?new mxImage(mxUtils.trim(g.value),m.value,q.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},ParseDialog=function(a,e){function d(c,b){var f=c.split("\n");if("plantUmlPng"==b||"plantUmlSvg"==
+b||"plantUmlTxt"==b){var f="plantUmlTxt"==b?PLANT_URL+"/txt/":"plantUmlPng"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/",h=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var p=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?"_":"?"},d=function(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=
+p(c4&63)},l=new XMLHttpRequest;l.open("GET",f+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+d(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+d(a.charCodeAt(k),0,0):r+d(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);"plantUmlTxt"!=b&&(l.responseType="blob");l.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==b){a.spinner.stop();h.getModel().beginUpdate();try{cell=h.insertVertex(null,
+null,"<pre>"+this.response+"</pre>",g.x,g.y,1,1,"text;html=1;overflow=fill;"),h.updateCellSize(cell,!0)}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())}else f=new FileReader,f.readAsDataURL(this.response),f.onload=function(b){var f=new Image;f.onload=function(){a.spinner.stop();var l=f.width,p=f.height;if(0==l&&0==p){var w=b.target.result,d=w.indexOf(","),w=decodeURIComponent(escape(atob(w.substring(d+1)))),w=mxUtils.parseXml(w).getElementsByTagName("svg");
+0<w.length&&(l=parseFloat(w[0].getAttribute("width")),p=parseFloat(w[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,c,g.x,g.y,l,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(b.target.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};f.src=b.target.result},f.onerror=function(c){a.handleError(c)};else a.spinner.stop(),a.handleError(f)};l.onerror=
+function(c){a.handleError(c)};l.send()}}else if("table"==b){for(var v=null,e=[],u=0,k=0;k<f.length;k++)if(l=mxUtils.trim(f[k]),"create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),v=new mxCell(l,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;"),
+v.vertex=!0,e.push(v),l=a.editor.graph.getPreferredSizeForCell(m),null!=l&&(v.geometry.width=l.width+10);else if(null!=v&&")"==l.charAt(0))u+=v.geometry.width+40,v=null;else if("("!=l&&null!=v&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var n=l.toLowerCase().indexOf("primary key"),l=l.replace(/primary key/i,""),m=new mxCell(l,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+m.vertex=!0;l=sb.cloneCell(m,0<n?"PK":"");l.connectable=!1;l.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;";l.geometry.width=30;l.geometry.height=26;m.insert(l);l=a.editor.graph.getPreferredSizeForCell(m);null!=l&&v.geometry.width<l.width+10&&(v.geometry.width=Math.min(220,l.width+10));v.insert(m);v.geometry.height+=26}0<e.length&&(h=a.editor.graph,
+f=h.view,l=h.getGraphBounds(),h.setSelectionCells(h.importCells(e,Math.ceil(Math.max(0,l.x/f.scale-f.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(l.y+l.height)/f.scale-f.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==b){if(0<f.length){h=a.editor.graph;v=new mxCell(f[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+v.vertex=!0;l=h.getPreferredSizeForCell(v);null!=l&&v.geometry.width<l.width+10&&(v.geometry.width=l.width+10);m=[v];if(1<f.length)for(k=1;k<f.length;k++)"--"==f[k]?(l=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;"),l.vertex=!0,v.geometry.height+=l.geometry.height,v.insert(l),m.push(l)):0<f[k].length&&";"!=f[k].charAt(0)&&(u=new mxCell(f[k],
+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,l=h.getPreferredSizeForCell(u),null!=l&&u.geometry.width<l.width&&(u.geometry.width=l.width),v.geometry.width=Math.max(v.geometry.width,u.geometry.width),v.geometry.height+=u.geometry.height,v.insert(u),m.push(u));h.getModel().beginUpdate();try{v=h.importCells([v],g.x,g.y)[0],h.fireEvent(new mxEventObject("cellsInserted",
+"cells",[v].concat(v.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(v);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var m=function(a){var c=q[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,q[a]=c,e.push(c));return c},q={},e=[],k=0;k<f.length;k++)if(";"!=f[k].charAt(0)){var z=f[k].split("->");2<=z.length&&(u=m(z[0]),n=m(z[z.length-1]),z=new mxCell(2<z.length?z[1]:"",new mxGeometry),z.edge=!0,u.insertEdge(z,!0),n.insertEdge(z,!1),
+e.push(z))}if(0<e.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);h=new Graph(f);h.getModel().beginUpdate();try{e=h.importCells(e);for(k=0;k<e.length;k++)h.getModel().isVertex(e[k])&&(l=h.getPreferredSizeForCell(e[k]),e[k].geometry.width=Math.max(e[k].geometry.width,l.width),e[k].geometry.height=Math.max(e[k].geometry.height,l.height));v=new mxFastOrganicLayout(h);v.disableEdgeStyle=!1;v.forceConstant=120;v.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();
+m=[];a.editor.graph.getModel().beginUpdate();try{m=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());h.destroy();f.parentNode.removeChild(f)}}}function b(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
+"table"==m.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\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(),k=document.createElement("div");k.style.textAlign="right";var n=document.createElement("textarea");n.style.resize="none";n.style.width="100%";n.style.height="354px";n.style.marginBottom="16px";
+var m=document.createElement("select"),q=document.createElement("option");q.setAttribute("value","list");q.setAttribute("selected","selected");mxUtils.write(q,mxResources.get("list"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","table");mxUtils.write(q,mxResources.get("table"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","diagram");mxUtils.write(q,mxResources.get("diagram"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value",
+"plantUmlSvg");mxUtils.write(q,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,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()&&(m.appendChild(q),m.appendChild(c),
+m.appendChild(f));var h=b();n.value=h;k.appendChild(n);this.init=function(){n.focus()};Graph.fileSupport&&(n.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),n.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){n.value=a.target.result};c.readAsText(a)}},!1));k.appendChild(m);mxEvent.addListener(m,"change",function(){var a=b();if(0==n.value.length||
+n.value==h)h=a,n.value=h});q=mxUtils.button(mxResources.get("close"),function(){n.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});q.className="geBtn";a.editor.cancelFirst&&k.appendChild(q);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(n.value,m.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(q);this.container=k},NewDialog=function(a,e,d,b,g,k,n,m,q,c,f,h,u,p,t){function x(){for(var a=
+!0;F<N.length&&(a||0!=mxUtils.mod(F,30));)a=N[F++],l(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function w(){if(P)d||a.hideDialog(),p(P,O,C.value);else if(b)d||a.hideDialog(),b(T,C.value);else{var c=C.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(b){a.createFile(c,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},
+null,b)})}}function y(a,c,b,f,l){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");G.removeAttribute("disabled");T=c;V=b;R=a;P=f;O=l;R.style.backgroundColor=m;R.style.border=q}function l(a,c,b,f,l,h,p,d){var e=document.createElement("div");e.className="geTemplate";e.style.height=S+"px";e.style.width=Y+"px";null!=f&&0<f.length&&e.setAttribute("title",f);if(null!=h)e.style.backgroundImage="url("+h+")",e.style.backgroundSize="contain",e.style.backgroundPosition=
+"center center",e.style.backgroundRepeat="no-repeat",mxEvent.addListener(e,"click",function(c){y(e,null,null,a,p)}),mxEvent.addListener(e,"dblclick",function(a){w()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);e.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(e,"click",function(b){G.setAttribute("disabled","disabled");e.style.backgroundColor="transparent";
+e.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(e,a.getText(),c),v&&w())}))});mxEvent.addListener(e,"dblclick",function(a){v=!0})}else e.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(b)+"</td></tr></table>",l&&y(e),null!=d?mxEvent.addListener(e,"click",d):(mxEvent.addListener(e,"click",function(a){y(e)}),mxEvent.addListener(e,"dblclick",function(a){w()}));
+K.appendChild(e)}function v(){mxEvent.addListener(K,"scroll",function(a){K.scrollTop+K.clientHeight>=K.scrollHeight&&(x(),mxEvent.consume(a))});var a=null,b;for(b in J){var f=document.createElement("div"),l=mxResources.get(b),h=J[b];null==l&&(l=b.substring(0,1).toUpperCase()+b.substring(1));18<l.length&&(l=l.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",l+" ("+
+h.length+")");mxUtils.write(f,f.getAttribute("title"));null!=c&&(f.style.padding=c);Q.appendChild(f);null==a&&(a=f,a.style.backgroundColor=n);(function(c,b){mxEvent.addListener(f,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=n,K.scrollTop=0,K.innerHTML="",F=0,N=J[c],D=null,x())})})(b,f)}x()}d=null!=d?d:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";m=null!=m?m:"#e6eff8";q=null!=q?q:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var H=document.createElement("div");
+H.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";d&&H.appendChild(E);var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="40px";A.style.height="40px";A.style.marginRight="10px";A.style.paddingBottom="4px";A.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":
+a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&d&&E.appendChild(A);d&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");A=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?A=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?A=a.dropbox.extension:
+a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?A=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?A=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(A=a.trello.extension);var C=document.createElement("input");C.setAttribute("value",a.defaultFilename+A);C.style.marginRight="20px";C.style.marginLeft="10px";C.style.width=e?"220px":"430px";this.init=function(){d&&(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?C.select():document.execCommand("selectAll",
+!1,null))};d&&E.appendChild(C);var E=!1,F=0,G=mxUtils.button(mxResources.get("create"),function(){G.setAttribute("disabled","disabled");w();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(h||u){var z=[],D=null,M=function(a){G.setAttribute("disabled","disabled");for(var c=0;c<z.length;c++)z[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},E=!0,A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";H.appendChild(A);var B=mxUtils.button(mxResources.get("Templates",
+null,"Templates"),function(){Q.style.display="";K.style.left="160px";M(0);K.scrollTop=0;K.innerHTML="";F=0;D!=N&&(N=D,x(),D=null)});z.push(B);A.appendChild(B);var I=function(a){Q.style.display="none";K.style.left="30px";M(a?-1:1);null==D&&(D=N);K.scrollTop=0;K.innerHTML="";var c=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.spin(K);F=0;var b=function(a,b){c.stop();N=a;b?K.innerHTML=b:0==a.length?K.innerHTML=
+mxResources.get("noDiagrams",null,"No Diagrams Found"):(K.innerHTML="",x())};a?u(L.value,b):h(b)};h&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){I()}),A.appendChild(B),z.push(B));if(u){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxResources.get("search")+":";A.appendChild(B);var L=document.createElement("input");L.style.marginRight="10px";L.style.marginLeft="10px";L.style.width="220px";mxEvent.addListener(L,"keypress",function(a){13==a.keyCode&&
+I(!0)});A.appendChild(L);B=mxUtils.button(mxResources.get("search"),function(){I(!0)});B.className="geBtn";A.appendChild(B)}M(0)}var V=null,T=null,R=null,P=null,O=null,K=document.createElement("div");K.style.border="1px solid #d3d3d3";K.style.position="absolute";K.style.left="160px";K.style.right="34px";E=(d?72:40)+(E?30:0);K.style.top=E+"px";K.style.bottom="68px";K.style.margin="6px 0 0 -1px";K.style.padding="6px";K.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+
+E+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,J={},aa=1;J.basic=[{title:"blankDiagram",select:!0}];var N=J.basic;if(!e){H.appendChild(Q);H.appendChild(K);var X=!1;mxUtils.get(f,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var b=c.indexOf("/"),c=c.substring(0,b),b=J[c];null==b&&(aa++,b=[],J[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),
+title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}v()}})}mxEvent.addListener(C,"keypress",function(a){13==a.keyCode&&w()});f=document.createElement("div");f.style.marginTop=e?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";E=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});E.className="geBtn";!a.editor.cancelFirst||g&&null==k||f.appendChild(E);e||a.isOffline()||
+!d||null!=b||g||(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));e||"1"==urlParams.embed||g||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(C.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?
+window.location.href=c:window.openWindow(c))},mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",f.appendChild(e));Graph.fileSupport&&t&&(t=mxUtils.button(mxResources.get("import"),function(){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(b){a.openFiles(c.files,!0)});c.click()}),t.className="geBtn",f.appendChild(t));f.appendChild(G);a.editor.cancelFirst||null!=
+b||g&&null==k||f.appendChild(E);H.appendChild(f);this.container=H},CreateDialog=function(a,e,d,b,g,k,n,m,q,c,f,h,u,p,t){function x(c,b,f,l){function p(){mxEvent.addListener(d,"click",function(){var c=f;if(n){var b=v.value,l=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:A.value,h="";c==App.MODE_GOOGLE?h=a.drive.extension:c==App.MODE_GITHUB?h=a.gitHub.extension:c==App.MODE_TRELLO?h=a.trello.extension:c==App.MODE_DROPBOX?h=a.dropbox.extension:c==App.MODE_ONEDRIVE?h=a.oneDrive.extension:
+c==App.MODE_DEVICE&&(h=".xml");0<=l&&(b=b.substring(0,l));v.value=b+h}}w(f)})}var d=document.createElement("a");d.style.overflow="hidden";var t=document.createElement("img");t.src=c;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.className="geBaseButton";d.style.position="relative";d.style.margin="4px";d.style.padding="8px 8px 10px 8px";d.style.whiteSpace=
+"nowrap";d.appendChild(t);mxClient.IS_QUIRKS&&(d.style.cssFloat="left",d.style.zoom="1");d.style.color="gray";d.style.fontSize="11px";var u=document.createElement("div");d.appendChild(u);mxUtils.write(u,b);if(null!=l&&null==a[l]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var g=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});g.spin(d);var y=window.setTimeout(function(){null==a[l]&&(g.stop(),d.style.display=
+"none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(y),mxUtils.setOpacity(u,100),t.style.visibility="",g.stop(),p())}))}else p();H.appendChild(d);++E==h&&(mxUtils.br(H),E=0)}function w(c){var b=v.value;if(null==c||null!=b&&0<b.length)a.hideDialog(),d(b,c)}n=null!=n?n:!0;m=null!=m?m:!0;h=null!=h?h:4;var y=document.createElement("div");null==b&&a.addLanguageMenu(y);var l=document.createElement("h2");mxUtils.write(l,g||mxResources.get("create"));l.style.marginTop=
+"0px";l.style.marginBottom="24px";y.appendChild(l);mxUtils.write(y,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",e);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};y.appendChild(v);null!=u&&null!=p&&"image/"==p.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==
+p&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(u),u=g.getElementsByTagName("svg")[0],p=parseInt(u.getAttribute("width")),t=parseInt(u.getAttribute("height")),u.setAttribute("viewBox","0 0 "+p+" "+t),u.setAttribute("width","120px"),u.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src","data:"+p+(t?";base64,":";utf8,")+u)),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%)"),y.appendChild(g),q&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){w("_blank")})));mxUtils.br(y);var H=document.createElement("div");H.style.textAlign="center";var E=0;H.style.marginTop="6px";y.appendChild(H);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),
mxUtils.write(g,mxResources.get("googleDrive")),A.appendChild(g),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),A.appendChild(g),a.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
"function"===typeof window.DropboxClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),A.appendChild(g),a.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),A.appendChild(g),x(IMAGE_PATH+"/github-logo.svg",
mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),A.appendChild(g),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),
-A.appendChild(g),a.mode!=App.MODE_DEVICE&&n||g.setAttribute("selected","selected"),f&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),A.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");
-n.style.marginTop="26px";n.style.textAlign="center";null!=c&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),g.className="geBtn",n.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&n.appendChild(g);null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){w(null)}),u.className="geBtn",n.appendChild(u));p&&(p=
-mxUtils.button(mxResources.get("openInNewWindow"),function(){w("_blank")}),p.className="geBtn",n.appendChild(p));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){w(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",n.appendChild(k));a.editor.cancelFirst||n.appendChild(g);mxEvent.addListener(v,"keypress",function(c){13==c.keyCode?w(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(n);this.container=y},PopupDialog=
-function(a,d,e,b,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";k.appendChild(m);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=e&&e();a.openLink(d)});n.className=
-"geBtn gePrimaryBtn";n.style.width=m.style.width;k.appendChild(n);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,d,e,b,g,k){k=null!=k?k:!0;var m=a.editor.graph,n=document.createElement("div");mxUtils.write(n,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";mxClient.IS_VML||
-(d.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",e);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition=
-"100% 50%";p.style.paddingRight="14px";e=document.createElement("div");e.setAttribute("title",mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height="14px";e.style.cursor="pointer";e.style.display=mxClient.IS_VML?"inline":"inline-block";e.style.top=(mxClient.IS_VML?0:3)+"px";e.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){p.value="";p.focus()});d.appendChild(p);d.appendChild(e);n.appendChild(d);
-var c=function(c,f,h,w){var t="data:"==c.substring(0,5);!a.isOffline()||t&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(l){a.spinner.stop();a.hideDialog();var t=!1===w?1:null!=f&&null!=h?Math.max(f/l.width,h/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(c=a.convertDataUri(c));b(c,Math.round(Number(l.width)*t),Math.round(Number(l.height)*t))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),f=null==f?120:f,h=null==h?100:h,a.hideDialog(),b(c,f,h))},f=function(f,h){if(null!=f){var t=g?null:m.getModel().getGeometry(m.getSelectionCell());null!=t?c(f,t.width,t.height,h):c(f,null,null,h)}else a.hideDialog(),b(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=n.parentNode,b=null;mxEvent.addListener(c,"dragleave",
-function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,function(a,c,b,h,t,w,e,d){f(a,
-d)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var h=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&f(decodeURIComponent(h))}c.stopPropagation();c.preventDefault()}),!1)}};e=document.createElement("div");e.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";e.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),
-function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);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&&(p.value=a.url));p.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(c){a.importFiles(h.files,
-0,0,a.maxImageSize,function(a,c,b,h,l,t){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var u=mxUtils.button(mxResources.get("open"),function(){h.click()});u.className="geBtn";e.appendChild(u)}}document.createElement("canvas").getContext&&"data:image/"==p.value.substring(0,11)&&"data:image/svg"!=p.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a,p.value,function(a){p.value=
-a});a.showDialog(c.container,200,180,!0,!0);c.init()}),u.className="geBtn",e.appendChild(u));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(u=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
-u.className="geBtn",e.appendChild(u),null!=a.drive&&"1"==urlParams.photos&&(u=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),u.className="geBtn",e.appendChild(u)));mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&f(p.value)});u=mxUtils.button(mxResources.get("apply"),function(){f(p.value)});u.className="geBtn gePrimaryBtn";e.appendChild(u);a.editor.cancelFirst||e.appendChild(d);Graph.fileSupport&&(e.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
-"center 65%",n.style.backgroundRepeat="no-repeat",d=document.createElement("div"),d.style.position="absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),n.appendChild(d));n.appendChild(e);this.container=n},LinkDialog=function(a,d,e,b,g){function k(a,c,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
-c.style.width="26px";c.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(c);w.appendChild(f)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var p=document.createElement("input");
-p.setAttribute("placeholder",mxResources.get("dragUrlsHere"));p.setAttribute("type","text");p.style.marginTop="6px";p.style.width="400px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";
-c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){p.value="";p.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
-h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="380px";if(g&&null!=a.pages){null!=d&&a.editor.graph.isPageLink(d)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(p.setAttribute("value",d),f.setAttribute("checked","checked"),f.defaultChecked=!0);p.style.width="380px";n.appendChild(f);n.appendChild(p);n.appendChild(c);mxUtils.br(n);n.appendChild(h);g=!1;for(c=0;c<a.pages.length;c++){var t=
-document.createElement("option");mxUtils.write(t,a.pages[c].getName()||mxResources.get("pageWithNumber",[c+1]));t.setAttribute("value","data:page/id,"+a.pages[c].getId());d==t.getAttribute("value")&&(t.setAttribute("selected","selected"),g=!0);u.appendChild(t)}if(!g&&h.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");u.appendChild(q);mxEvent.addListener(u,
-"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}n.appendChild(u)}else p.setAttribute("value",d),n.appendChild(p),n.appendChild(c);m.appendChild(n);var x=mxUtils.button(e,function(){a.hideDialog();b(h.checked?"pageNotFound"!==u.value?u.value:d:p.value,LinkDialog.selectedDocs)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){h.checked?u.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){f.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});mxEvent.addListener(p,"focus",function(){h.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var c=m.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",
-mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,x.click());a.stopPropagation();a.preventDefault()}),!1)}};var w=document.createElement("div");
-w.style.marginTop="20px";w.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.style.verticalAlign="middle";e.className="geBtn";a.editor.cancelFirst&&w.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c=
-"https://"+c+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(c=DriveClient.prototype.newAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+a.docs[0].id);p.value=c;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",
-mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var c=gapi.auth.getToken().access_token,f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
-c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(f).addView(b).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&c.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.linkPicker=c.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){p.value=a[0].link;p.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,c){p.value=c.value[0].webUrl;
-p.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],f=a[1],b=a[2];a=a.slice(3,a.length).join("/");p.value="https://github.com/"+c+"/"+f+"/blob/"+b+"/"+a;p.focus()}})});mxEvent.addListener(p,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(h.checked?u.value:p.value,LinkDialog.selectedDocs))});w.appendChild(x);a.editor.cancelFirst||w.appendChild(e);m.appendChild(w);this.container=
-m},AboutDialog=function(a){var d=document.createElement("div");d.style.marginTop="6px";d.setAttribute("align","center");var e=document.createElement("img");e.style.border="0px";mxClient.IS_SVG?(e.setAttribute("width","164"),e.setAttribute("height","221"),e.style.width="164px",e.style.height="221px",e.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(e.setAttribute("width","176"),e.setAttribute("height","219"),e.style.width="170px",e.style.height="219px",e.setAttribute("src",IMAGE_PATH+
-"/logo-flat.png"));d.appendChild(e);mxUtils.br(d);e=document.createElement("small");e.innerHTML="v "+EditorUi.VERSION;e.style.color="#505050";d.appendChild(e);mxUtils.br(d);mxUtils.br(d);e=document.createElement("small");e.style.color="#505050";e.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';d.appendChild(e);mxEvent.addListener(d,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
-d},FeedbackDialog=function(a){var d=document.createElement("div"),e=document.createElement("div");mxUtils.write(e,mxResources.get("sendYourFeedbackToDrawIo"));e.style.fontSize="18px";e.style.marginBottom="18px";d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");d.appendChild(e);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),
-function(){var c=(m.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;c.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(b.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+p.value+c),
+A.appendChild(g),a.mode!=App.MODE_DEVICE&&m||g.setAttribute("selected","selected"),f&&x(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"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");
+m.style.marginTop="26px";m.style.textAlign="center";null!=c&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),g.className="geBtn",m.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&m.appendChild(g);null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){w(null)}),u.className="geBtn",m.appendChild(u));q&&(q=
+mxUtils.button(mxResources.get("openInNewWindow"),function(){w("_blank")}),q.className="geBtn",m.appendChild(q));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){w(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",m.appendChild(k));a.editor.cancelFirst||m.appendChild(g);mxEvent.addListener(v,"keypress",function(c){13==c.keyCode?w(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(m);this.container=y},PopupDialog=
+function(a,e,d,b,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});n.className="geBtn";n.style.marginBottom="8px";n.style.width="280px";k.appendChild(n);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=d&&d();a.openLink(e)});m.className=
+"geBtn gePrimaryBtn";m.style.width=n.style.width;k.appendChild(m);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,e,d,b,g,k){k=null!=k?k:!0;var n=a.editor.graph,m=document.createElement("div");mxUtils.write(m,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||
+(e.style.paddingRight="20px");var q=document.createElement("input");q.setAttribute("value",d);q.setAttribute("type","text");q.setAttribute("spellcheck","false");q.setAttribute("autocorrect","off");q.setAttribute("autocomplete","off");q.setAttribute("autocapitalize","off");q.style.marginTop="6px";q.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";q.style.backgroundRepeat="no-repeat";q.style.backgroundPosition=
+"100% 50%";q.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){q.value="";q.focus()});e.appendChild(q);e.appendChild(d);m.appendChild(e);
+var c=function(c,f,h,w){var p="data:"==c.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(l){a.spinner.stop();a.hideDialog();var p=!1===w?1:null!=f&&null!=h?Math.max(f/l.width,h/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(c=a.convertDataUri(c));b(c,Math.round(Number(l.width)*p),Math.round(Number(l.height)*p))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),f=null==f?120:f,h=null==h?100:h,a.hideDialog(),b(c,f,h))},f=function(f,h){if(null!=f){var p=g?null:n.getModel().getGeometry(n.getSelectionCell());null!=p?c(f,p.width,p.height,h):c(f,null,null,h)}else a.hideDialog(),b(null)};this.init=function(){q.focus();if(Graph.fileSupport){q.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=m.parentNode,b=null;mxEvent.addListener(c,"dragleave",
+function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,function(a,c,b,h,p,w,d,e){f(a,
+e)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var h=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&f(decodeURIComponent(h))}c.stopPropagation();c.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),
+function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(q.value=a.url));q.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(c){a.importFiles(h.files,
+0,0,a.maxImageSize,function(a,c,b,h,l,p){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var u=mxUtils.button(mxResources.get("open"),function(){h.click()});u.className="geBtn";d.appendChild(u)}}document.createElement("canvas").getContext&&"data:image/"==q.value.substring(0,11)&&"data:image/svg"!=q.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a,q.value,function(a){q.value=
+a});a.showDialog(c.container,200,180,!0,!0);c.init()}),u.className="geBtn",d.appendChild(u));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(u=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),
+u.className="geBtn",d.appendChild(u),null!=a.drive&&"1"==urlParams.photos&&(u=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),u.className="geBtn",d.appendChild(u)));mxEvent.addListener(q,"keypress",function(a){13==a.keyCode&&f(q.value)});u=mxUtils.button(mxResources.get("apply"),function(){f(q.value)});u.className="geBtn gePrimaryBtn";d.appendChild(u);a.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition=
+"center 65%",m.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),m.appendChild(e));m.appendChild(d);this.container=m},LinkDialog=function(a,e,d,b,g){function k(a,c,b){b=mxUtils.button("",b);b.className="geBtn";b.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
+c.style.width="26px";c.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(c);w.appendChild(b)}var n=document.createElement("div");mxUtils.write(n,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 q=document.createElement("input");
+q.setAttribute("placeholder",mxResources.get("dragUrlsHere"));q.setAttribute("type","text");q.style.marginTop="6px";q.style.width="400px";q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";q.style.backgroundRepeat="no-repeat";q.style.backgroundPosition="100% 50%";q.style.paddingRight="14px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";
+c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){q.value="";q.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
+h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="380px";if(g&&null!=a.pages){null!=e&&a.editor.graph.isPageLink(e)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(q.setAttribute("value",e),f.setAttribute("checked","checked"),f.defaultChecked=!0);q.style.width="380px";m.appendChild(f);m.appendChild(q);m.appendChild(c);mxUtils.br(m);m.appendChild(h);g=!1;for(c=0;c<a.pages.length;c++){var p=
+document.createElement("option");mxUtils.write(p,a.pages[c].getName()||mxResources.get("pageWithNumber",[c+1]));p.setAttribute("value","data:page/id,"+a.pages[c].getId());e==p.getAttribute("value")&&(p.setAttribute("selected","selected"),g=!0);u.appendChild(p)}if(!g&&h.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");u.appendChild(t);mxEvent.addListener(u,
+"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}m.appendChild(u)}else q.setAttribute("value",e),m.appendChild(q),m.appendChild(c);n.appendChild(m);var x=mxUtils.button(d,function(){a.hideDialog();b(h.checked?"pageNotFound"!==u.value?u.value:e:q.value,LinkDialog.selectedDocs)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){h.checked?u.focus():(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+q.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){f.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});mxEvent.addListener(q,"focus",function(){h.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var c=n.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",
+mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(q.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,x.click());a.stopPropagation();a.preventDefault()}),!1)}};var w=document.createElement("div");
+w.style.marginTop="20px";w.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&w.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c=
+"https://"+c+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(c=DriveClient.prototype.newAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+a.docs[0].id);q.value=c;q.focus()}else LinkDialog.selectedDocs=null;q.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",
+mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var c=gapi.auth.getToken().access_token,b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
+c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&c.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.linkPicker=c.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){q.value=a[0].link;q.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,c){q.value=c.value[0].webUrl;
+q.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],b=a[1],f=a[2];a=a.slice(3,a.length).join("/");q.value="https://github.com/"+c+"/"+b+"/blob/"+f+"/"+a;q.focus()}})});mxEvent.addListener(q,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(h.checked?u.value:q.value,LinkDialog.selectedDocs))});w.appendChild(x);a.editor.cancelFirst||w.appendChild(d);n.appendChild(w);this.container=
+n},AboutDialog=function(a){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+
+"/logo-flat.png"));e.appendChild(d);mxUtils.br(e);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";e.appendChild(d);mxUtils.br(e);mxUtils.br(e);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';e.appendChild(d);mxEvent.addListener(e,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
+e},FeedbackDialog=function(a){var e=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");e.appendChild(d);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),
+function(){var c=(n.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;c.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(b.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+q.value+c),
function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.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 k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(b,"change",
-function(){0<b.value.length&&0<k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});d.appendChild(b);this.init=function(){b.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;e=document.createElement("p");e.style.marginTop="14px";e.appendChild(m);
-var n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));e.appendChild(n);mxEvent.addListener(n,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("feedback"));d.appendChild(e);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("commentsNotes"));
-d.appendChild(p);e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(e.appendChild(n),e.appendChild(g)):(e.appendChild(g),e.appendChild(n));d.appendChild(e);this.container=d};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,d,e){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height=
-"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);b.appendChild(m);var n=new Graph(m);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var p=0,c=null,f=0,h=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=c&&null!=c[f]?c[f].getAttribute("name"):"pagenumber"==a?f+1:h.apply(this,arguments)};n.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var u=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),q=null,x=null,w=null,y=null,l=mxUtils.button("",function(){null!=w&&n.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));
-l.style.outline="none";l.style.border="none";l.style.margin="2px";l.setAttribute("disabled","disabled");mxUtils.setOpacity(l,20);var v=mxUtils.button("",function(){null!=w&&n.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var H=mxUtils.button("",function(){null!=w&&(n.maxFitScale=8,n.fit(8),n.center())});H.className=
-"geSprite geSprite-fit";H.setAttribute("title",mxResources.get("fit"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var E=mxUtils.button("",function(){null!=w&&(n.zoomActual(),n.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 C=mxUtils.button(mxResources.get("download"),function(){if(null!=w){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,f=mxUtils.getXml(w.documentElement);a.isLocalFileSave()?a.saveLocalFile(f,c,"text/xml"):
-(f="undefined"===typeof pako?"&xml="+encodeURIComponent(f):"&data="+encodeURIComponent(a.editor.graph.compress(f)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+f)).simulate(document,"_blank"))}});C.className="geBtn";C.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=w&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=e?e(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(c){a.spinner.stop();
+function(){0<b.value.length&&0<k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});e.appendChild(b);this.init=function(){b.focus()};var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(n);
+var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(m);mxEvent.addListener(m,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));e.appendChild(d);var q=document.createElement("textarea");q.style.resize="none";q.style.width="600px";q.style.height="140px";q.style.marginTop="6px";q.setAttribute("placeholder",mxResources.get("commentsNotes"));
+e.appendChild(q);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(g)):(d.appendChild(g),d.appendChild(m));e.appendChild(d);this.container=e};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,e,d){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.left="199px";n.style.width="470px";n.style.height=
+"376px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);b.appendChild(n);var m=new Graph(n);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var q=0,c=null,f=0,h=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=c&&null!=c[f]?c[f].getAttribute("name"):"pagenumber"==a?f+1:h.apply(this,arguments)};m.getLinkForCell=function(){return null};Editor.MathJaxRender&&
+m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,b){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var u=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),p=a.getCurrentFile(),t=null,x=null,w=null,y=null,l=mxUtils.button("",function(){null!=w&&m.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));
+l.style.outline="none";l.style.border="none";l.style.margin="2px";l.setAttribute("disabled","disabled");mxUtils.setOpacity(l,20);var v=mxUtils.button("",function(){null!=w&&m.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var H=mxUtils.button("",function(){null!=w&&(m.maxFitScale=8,m.fit(8),m.center())});H.className=
+"geSprite geSprite-fit";H.setAttribute("title",mxResources.get("fit"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var E=mxUtils.button("",function(){null!=w&&(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 C=mxUtils.button(mxResources.get("download"),function(){if(null!=w){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,b=mxUtils.getXml(w.documentElement);a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):
+(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(a.editor.graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});C.className="geBtn";C.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=w&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(c){a.spinner.stop();
a.replaceFileData(y);a.hideDialog()},function(c){a.spinner.stop();a.editor.setStatus("");a.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var z=null;mxEvent.addListener(G,"change",function(a){null!=
-z&&(z(a),mxEvent.consume(a))});var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=w&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(w.documentElement)),window.openWindow(a.getUrl()))});D.className="geBtn";D.setAttribute("disabled","disabled");null!=e&&(D.style.display="none");var M=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl())});M.className="geBtn gePrimaryBtn";M.setAttribute("disabled",
-"disabled");null!=e&&(M.style.display="none",F.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var B=document.createElement("div");B.className="geToolbarContainer";B.style.backgroundColor="transparent";B.style.padding="2px";B.style.border="none";B.style.left="199px";B.style.top="442px";var I=null;if(null!=d&&0<d.length){m.style.cursor="move";var L=document.createElement("table");L.style.border=
-"1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var R=d.length-1;0<=R;R--){var P=function(b){var h=new Date(b.modifiedDate),e=null;if(0<=h.getTime()){var g=function(b){u.stop();var d=mxUtils.parseXml(b),q=a.editor.extractGraphModel(d.documentElement,!0);if(null!=q){var g=function(c){null!=c&&(c=
-k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";m.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};G.style.display="none";G.innerHTML="";w=d;y=b;c=parseSelectFunction=null;f=0;if("mxfile"==q.nodeName){d=q.getElementsByTagName("diagram");c=[];for(b=0;b<d.length;b++)c.push(d[b]);
-f=Math.min(p,c.length-1);0<c.length&&g(c[f]);if(1<c.length)for(G.removeAttribute("disabled"),G.style.display="",b=0;b<c.length;b++)d=document.createElement("option"),mxUtils.write(d,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),d.setAttribute("value",b),b==f&&d.setAttribute("selected","selected"),G.appendChild(d);z=function(){f=p=parseInt(G.value);g(c[p])}}else k(q);A.innerHTML="";mxUtils.write(A,h.toLocaleDateString()+" "+h.toLocaleTimeString());A.setAttribute("title",e.getAttribute("title"));
-l.removeAttribute("disabled");v.removeAttribute("disabled");H.removeAttribute("disabled");E.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),C.removeAttribute("disabled"),M.removeAttribute("disabled"),D.removeAttribute("disabled"));mxUtils.setOpacity(l,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(E,60)}else G.style.display="none",G.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))},
-e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===T?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());e.appendChild(k);e.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+
-(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){x!=b&&(u.stop(),null!=q&&(q.style.backgroundColor=""),x=b,q=e,q.style.backgroundColor="#ebf2f9",y=w=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",m.style.backgroundColor="#ffffff",n.getModel().clear(),F.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),E.setAttribute("disabled",
-"disabled"),H.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(l,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(E,20),u.spin(m),b.getXml(function(a){x==b&&g(a)},function(a){u.stop();G.style.display="none";G.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){M.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(e)}return e}(d[R]);null!=P&&R==d.length-1&&(I=P)}L.appendChild(V);k.appendChild(L)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(m.style.display="none",B.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(m.style.display="none",B.style.display="none",mxUtils.write(k,
+z&&(z(a),mxEvent.consume(a))});var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=w&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(w.documentElement)),window.openWindow(a.getUrl()))});D.className="geBtn";D.setAttribute("disabled","disabled");null!=d&&(D.style.display="none");var M=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl())});M.className="geBtn gePrimaryBtn";M.setAttribute("disabled",
+"disabled");null!=d&&(M.style.display="none",F.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var B=document.createElement("div");B.className="geToolbarContainer";B.style.backgroundColor="transparent";B.style.padding="2px";B.style.border="none";B.style.left="199px";B.style.top="442px";var I=null;if(null!=e&&0<e.length){n.style.cursor="move";var L=document.createElement("table");L.style.border=
+"1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(q=mxUtils.indexOf(a.pages,a.currentPage));for(var R=e.length-1;0<=R;R--){var P=function(b){var h=new Date(b.modifiedDate),d=null;if(0<=h.getTime()){var g=function(b){u.stop();var e=mxUtils.parseXml(b),t=a.editor.extractGraphModel(e.documentElement,!0);if(null!=t){var g=function(c){null!=c&&(c=
+k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";n.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};G.style.display="none";G.innerHTML="";w=e;y=b;c=parseSelectFunction=null;f=0;if("mxfile"==t.nodeName){e=t.getElementsByTagName("diagram");c=[];for(b=0;b<e.length;b++)c.push(e[b]);
+f=Math.min(q,c.length-1);0<c.length&&g(c[f]);if(1<c.length)for(G.removeAttribute("disabled"),G.style.display="",b=0;b<c.length;b++)e=document.createElement("option"),mxUtils.write(e,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),e.setAttribute("value",b),b==f&&e.setAttribute("selected","selected"),G.appendChild(e);z=function(){f=q=parseInt(G.value);g(c[q])}}else k(t);A.innerHTML="";mxUtils.write(A,h.toLocaleDateString()+" "+h.toLocaleTimeString());A.setAttribute("title",d.getAttribute("title"));
+l.removeAttribute("disabled");v.removeAttribute("disabled");H.removeAttribute("disabled");E.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),C.removeAttribute("disabled"),M.removeAttribute("disabled"),D.removeAttribute("disabled"));mxUtils.setOpacity(l,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(E,60)}else G.style.display="none",G.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))},
+d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===T?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());d.appendChild(k);d.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+
+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){x!=b&&(u.stop(),null!=t&&(t.style.backgroundColor=""),x=b,t=d,t.style.backgroundColor="#ebf2f9",y=w=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",n.style.backgroundColor="#ffffff",m.getModel().clear(),F.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),E.setAttribute("disabled",
+"disabled"),H.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(l,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(E,20),u.spin(n),b.getXml(function(a){x==b&&g(a)},function(a){u.stop();G.style.display="none";G.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){M.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(d)}return d}(e[R]);null!=P&&R==e.length-1&&(I=P)}L.appendChild(V);k.appendChild(L)}else null==p||null==a.drive&&p.constructor==window.DriveFile||null==a.dropbox&&p.constructor==window.DropboxFile?(n.style.display="none",B.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(n.style.display="none",B.style.display="none",mxUtils.write(k,
mxResources.get("noRevisions")));this.init=function(){null!=I&&I.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";B.appendChild(G);B.appendChild(l);B.appendChild(v);B.appendChild(E);B.appendChild(H);a.editor.cancelFirst?(g.appendChild(k),g.appendChild(C),g.appendChild(D),g.appendChild(F),g.appendChild(M)):(g.appendChild(C),g.appendChild(D),g.appendChild(F),g.appendChild(M),g.appendChild(k));b.appendChild(g);b.appendChild(B);b.appendChild(A);this.container=
-b},DraftDialog=function(a,d,e,b,g,k,m,n){var p=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,d);p.appendChild(c);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);p.appendChild(f);var h=new Graph(f);
-h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;d=mxUtils.parseXml(e);var u=a.editor.extractGraphModel(d.documentElement,!0),t=0,q=null,x=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[t]?q[t].getAttribute("name"):"pagenumber"==a?t+1:x.apply(this,arguments)};h.getLinkForCell=function(){return null};d=mxUtils.button("",function(){h.zoomIn()});d.className=
-"geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);e=mxUtils.button("",function(){h.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);c=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});c.className="geSprite geSprite-fit";c.setAttribute("title",
-mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var w=mxUtils.button("",function(){h.zoomActual();h.center()});w.className="geSprite geSprite-actualsize";w.setAttribute("title",mxResources.get("actualSize"));w.style.outline="none";w.style.border="none";w.style.margin="2px";mxUtils.setOpacity(w,60);g=mxUtils.button(m||mxResources.get("discard"),g);g.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position=
-"relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function b(f){null!=f&&(f=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(f))).documentElement));return f}mxEvent.addListener(y,"change",function(a){t=parseInt(y.value);b(q[t]);mxEvent.consume(a)});if("mxfile"==u.nodeName){var w=u.getElementsByTagName("diagram");
-q=[];for(var e=0;e<w.length;e++)q.push(w[e]);0<q.length&&b(q[t]);if(1<q.length)for(y.style.display="",e=0;e<q.length;e++)w=document.createElement("option"),mxUtils.write(w,q[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),w.setAttribute("value",e),e==t&&w.setAttribute("selected","selected"),y.appendChild(w)}else c(u)};m.appendChild(y);m.appendChild(d);m.appendChild(e);m.appendChild(w);m.appendChild(c);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.className=
-"geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(k.appendChild(d),null!=n&&k.appendChild(n),k.appendChild(g),k.appendChild(b)):(k.appendChild(b),k.appendChild(g),null!=n&&k.appendChild(n),k.appendChild(d));p.appendChild(k);p.appendChild(m);this.container=p},FindWindow=function(a,d,e,b,g){function k(a,c,f){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var b=0;b<c.length;b++)if("label"!=c[b].nodeName){var l=
-mxUtils.trim(c[b].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&l.substring(0,f.length)===f||null!=a&&a.test(l))return!0}}return!1}function m(){var a=p.model.getDescendants(p.model.getRoot()),b=u.value.toLowerCase(),l=t.checked?new RegExp(b):null,h=null;c!=b&&(c=b,f=null);var e=null==f;if(0<b.length)for(var d=0;d<a.length;d++){var g=p.view.getState(a[d]);if(null!=g&&null!=g.cell.value&&(e||null==h)&&(p.model.isVertex(g.cell)||p.model.isEdge(g.cell))&&(p.isHtmlLabel(g.cell)?
-(q.innerHTML=p.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([q])):label=p.getLabel(g.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==l&&(label.substring(0,b.length)===b||k(l,g.cell,b))||null!=l&&(l.test(label)||k(l,g.cell,b))))if(e){h=g;break}else null==h&&(h=g);e=e||g==f}null!=h?(f=h,p.scrollCellToVisible(f.cell),p.isEnabled()?p.setSelectionCell(f.cell):p.highlightCell(f.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=h}
-var n=a.actions.get("find"),p=a.editor.graph,c=null,f=null,h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";h.appendChild(u);mxUtils.br(h);var t=document.createElement("input");
-t.setAttribute("type","checkbox");t.style.marginRight="4px";h.appendChild(t);mxUtils.write(h,mxResources.get("regularExpression"));var q=document.createElement("div");mxUtils.br(h);var x=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";c=f=null;u.focus()});x.setAttribute("title",mxResources.get("reset"));x.style.marginTop="6px";x.style.marginRight="4px";x.className="geBtn";h.appendChild(x);x=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
-m()?"":"#ffcfcf"}catch(w){a.handleError(w)}});x.setAttribute("title",mxResources.get("find")+" (Enter)");x.style.marginTop="6px";x.className="geBtn gePrimaryBtn";h.appendChild(x);mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(c!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=m()?"":"#ffcfcf"}catch(y){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"keydown",function(c){70==c.keyCode&&
-a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(n.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),h,d,e,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},
-TagsWindow=function(a,d,e,b,g){function k(a){a=null!=a?a:n.model.getDescendants(n.model.getRoot());for(var c=f.value.split(" "),b=[],h=0;h<a.length;h++)if(n.model.isVertex(a[h])||n.model.isEdge(a[h])){var t=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(p)||""):"",l=!0;if(0<t.length)for(var t=t.toLowerCase().split(" "),e=0;e<c.length&&l;e++)var d=mxUtils.trim(c[e]).toLowerCase(),l=l&&(0==d.length||0<=mxUtils.indexOf(t,d));else l=0==mxUtils.trim(f.value).length;
-l&&b.push(a[h])}return b}function m(a,c){n.model.beginUpdate();try{for(var f=0;f<a.length;f++)n.model.setVisible(a[f],c)}finally{n.model.endUpdate()}}var n=a.editor.graph,p="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type","text");f.style.marginTop="4px";f.style.width="260px";f.style.fontSize="12px";
-f.style.borderRadius="4px";f.style.padding="6px";c.appendChild(f);if(!a.isOffline()||mxClient.IS_CHROMEAPP){f.style.width="240px";var h=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");h.firstChild.style.marginBottom="6px";h.style.marginLeft="6px";c.appendChild(h)}mxEvent.addListener(f,"dblclick",function(){var c=new FilenameDialog(a,p,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(p=a)}),mxResources.get("enterPropertyName"));a.showDialog(c.container,
-300,80,!0,!0);c.init()});f.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(c);h=mxUtils.button(mxResources.get("hide"),function(){m(k(),!1)});h.setAttribute("title",mxResources.get("hide"));h.style.marginTop="8px";h.style.marginRight="4px";h.className="geBtn";c.appendChild(h);h=mxUtils.button(mxResources.get("show"),function(){var a=k();m(a,!0);n.isEnabled()&&n.setSelectionCells(a)});h.setAttribute("title",mxResources.get("show"));h.style.marginTop="8px";h.style.marginRight=
-"4px";h.className="geBtn";c.appendChild(h);var u=a.actions.get("tags"),h=mxUtils.button(mxResources.get("close"),function(){u.funct()});h.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");h.style.marginTop="8px";h.className="geBtn gePrimaryBtn";c.appendChild(h);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||u.funct()});this.window=new mxWindow(mxResources.get("tags"),c,d,e,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
-this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},AuthDialog=function(a,d,e,b){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
-mxResources.get("authorizationRequired"));var m="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";d==a.drive?(m=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(m=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(m=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(m=mxResources.get("github"),n.src=IMAGE_PATH+
-"/github-logo-white.svg"):d==a.trello&&(m=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var p=document.createElement("input");p.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){b(p.checked)});m.insertBefore(n,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";g.appendChild(k);g.appendChild(a);g.appendChild(m);e&&(e=document.createElement("p"),
-e.style.marginTop="20px",e.appendChild(p),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),e.appendChild(k),g.appendChild(e),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,d,e){e=null!=e?e:a.sidebar.entries;var b=document.createElement("div");if(d){d=document.createElement("div");d.className="geDialogTitle";mxUtils.write(d,mxResources.get("shapes"));
-d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.lineHeight="40px";d.style.height="40px";d.style.right="0px";mxClient.IS_QUIRKS&&(d.style.width="718px");var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
-"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(d.style.width)-202+"px",k.style.height=g.style.height,k.style.marginTop=g.style.marginTop);var m=null,n=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";for(var c=0;c<e.length;c++)(function(f){var b=p.cloneNode(!1);b.style.fontWeight="bold";b.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";b.style.padding="6px 0px 6px 20px";mxUtils.write(b,f.title);g.appendChild(b);for(var l=0;l<f.entries.length;l++)(function(f){var b=p.cloneNode(!1);b.style.cursor="pointer";b.style.padding="4px 0px 4px 20px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.checked=a.sidebar.isEntryVisible(f.id);h.defaultChecked=h.checked;b.appendChild(h);mxUtils.write(b," "+f.title);g.appendChild(b);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
-f.imageCallback?f.imageCallback(k):null!=f.image?k.innerHTML='<img border="0" src="'+f.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=m&&(m.style.backgroundColor=""),m=b,m.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(b,"click",e);mxEvent.addListener(b,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});n.push(function(){return h.checked?f.id:null});0==c&&0==l&&e()})(f.entries[l])})(e[c]);
-b.style.padding="30px";b.appendChild(d);b.appendChild(g);b.appendChild(k);e=document.createElement("div");e.className="geDialogFooter";e.style.position="absolute";e.style.paddingRight="16px";e.style.color="gray";e.style.left="0px";e.style.right="0px";e.style.bottom="0px";e.style.height="60px";e.style.lineHeight="52px";mxClient.IS_QUIRKS&&(e.style.width=d.style.width,e.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)d=
-document.createElement("span"),d.style.paddingRight="20px",d.appendChild(f),mxUtils.write(d," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(d,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(d.style.position="relative",d.style.top="-6px"),e.appendChild(d);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var h=mxUtils.button(mxResources.get("apply"),
-function(){a.hideDialog();for(var c=[],b=0;b<n.length;b++){var l=n[b].apply(this,arguments);null!=l&&c.push(l)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});h.className="geBtn gePrimaryBtn"}else{var u=document.createElement("table"),t=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var q=document.createElement("tr");u.style.width="100%";d=document.createElement("td");var h=document.createElement("td"),x=document.createElement("td"),w=mxUtils.bind(this,function(c,
-b,f){var l=document.createElement("input");l.type="checkbox";u.appendChild(l);l.checked=a.sidebar.isEntryVisible(f);var h=document.createElement("span");mxUtils.write(h,b);b=document.createElement("div");b.style.display="block";b.appendChild(l);b.appendChild(h);mxEvent.addListener(h,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return l.checked?f:null}});q.appendChild(d);q.appendChild(h);q.appendChild(x);t.appendChild(q);u.appendChild(t);for(var n=
-[],y=0,c=0;c<e.length;c++)for(t=0;t<e[c].entries.length;t++)y++;for(var l=[d,h,x],v=0,c=0;c<e.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];n.push(w(l[Math.floor(v/(y/3))],b.title,b.id));v++}})(e[c]);b.appendChild(u);e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,e.appendChild(f),d=document.createElement("span"),
-mxUtils.write(d," "+mxResources.get("rememberThisSetting")),e.appendChild(d),mxEvent.addListener(d,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";h=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<n.length;b++){var l=n[b].apply(this,arguments);null!=l&&c.push(l)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});h.className=
-"geBtn gePrimaryBtn";e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right"}a.editor.cancelFirst?(e.appendChild(d),e.appendChild(h)):(e.appendChild(h),e.appendChild(d));b.appendChild(e);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<g.length;c++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var e=document.createElement("span");e.className="geSprite geSprite-delete";
-e.style.position="relative";e.style.cursor="pointer";e.style.top="5px";e.style.marginRight="4px";e.style.display="inline-block";h.appendChild(e);mxUtils.write(h,g[c]);b.appendChild(h);mxUtils.br(b);mxEvent.addListener(e,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+g[c]+'"?',function(){g.splice(c,1);d()})}}(c))}}}var e=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();
-e.appendChild(b);d();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var e=b.split(";"),b=0;b<e.length;b++){var t=App.pluginRegistry[e[b]];null!=t&&(c+=t+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){e=a.split(";");for(a=0;a<e.length;a++){var c=e[a],b=App.pluginRegistry[c];null!=b&&(c=b);0<c.length&&0>mxUtils.indexOf(g,c)&&g.push(c)}d()}},mxResources.get("enterValue")+
-" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
-p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(m),c.appendChild(p),c.appendChild(k),c.appendChild(n)):(c.appendChild(p),c.appendChild(k),c.appendChild(n),c.appendChild(m));e.appendChild(c);this.container=e},CropImageDialog=function(a,d,e){var b=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),
-m=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");m.appendChild(n);k.appendChild(m);var m=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(p,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()};c.appendChild(f);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";c.appendChild(h);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("right")+
-":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";c.appendChild(u);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";c.appendChild(t);m.appendChild(p);m.appendChild(c);k.appendChild(m);m=document.createElement("tr");
-p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");m.appendChild(p);var q=document.createElement("input");q.setAttribute("type","checkbox");c.appendChild(q);m.appendChild(c);k.appendChild(m);g.appendChild(k);b.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=new Image,w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),d=x.width,
-w=x.height,g=parseInt(f.value),k=parseInt(h.value),d=Math.max(1,d-g-parseInt(u.value)),w=Math.max(1,w-k-parseInt(t.value));c.width=d;c.height=w;q.checked&&(b.fillStyle="#000000",b.arc(d/2,w/2,Math.min(d/2,w/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation="source-in");b.drawImage(x,g,k,d,w,0,0,d,w);e(c.toDataURL())});w.setAttribute("disabled","disabled");x.onload=function(){w.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+x.width+" "+mxResources.get("height")+
-": "+x.height)};x.src=d;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&w.click()});d=document.createElement("div");d.style.marginTop="20px";d.style.textAlign="right";a.editor.cancelFirst?(d.appendChild(g),d.appendChild(w)):(d.appendChild(w),d.appendChild(g));b.appendChild(d);this.container=b},EditGeometryDialog=function(a,d){var e=a.editor.graph,b=1==d.length?e.getCellGeometry(d[0]):null,g=document.createElement("div"),k=document.createElement("table"),m=document.createElement("tbody"),
-n=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=b?b.x:"";this.init=function(){f.focus();f.select()};c.appendChild(f);n.appendChild(p);n.appendChild(c);m.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+
-":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=b?b.y:"";c.appendChild(h);n.appendChild(p);n.appendChild(c);m.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b?b.width:"";c.appendChild(u);n.appendChild(p);n.appendChild(c);m.appendChild(n);
-n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.height:"";c.appendChild(t);n.appendChild(p);n.appendChild(c);m.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var q=document.createElement("input");
-q.setAttribute("type","text");q.style.width="100px";q.value=1==d.length?mxUtils.getValue(e.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(q);n.appendChild(p);n.appendChild(c);m.appendChild(n);k.appendChild(m);g.appendChild(k);var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e.getModel().beginUpdate();try{for(var c=0;c<d.length;c++){var b=e.getCellGeometry(d[c]);null!=b&&(b=b.clone(),e.isCellMovable(d[c])&&
-(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(h.value).length&&(b.y=Number(h.value))),e.isCellResizable(d[c])&&(0<mxUtils.trim(u.value).length&&(b.width=Number(u.value)),0<mxUtils.trim(t.value).length&&(b.height=Number(t.value))),e.getModel().setGeometry(d[c],b));0<mxUtils.trim(q.value).length&&e.setCellStyles(mxConstants.STYLE_ROTATION,Number(q.value),[d[c]])}}finally{e.getModel().endUpdate()}});mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&x.click()});k=document.createElement("div");
-k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(x)):(k.appendChild(x),k.appendChild(b));g.appendChild(k);this.container=g},LibraryDialog=function(a,d,e,b,g,k){function m(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var c=null;if(null!=a)for(var b=t.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function n(c,b,h,e,d,g,u,k,y){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&
-null!=u||null==x[c]){var D=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=z.title&&0<z.title.length?z.title:mxResources.get("untitled"));I.style.color=null==z.title||0==z.title.length?"#d0d0d0":""};t.style.backgroundImage="";q.style.display="none";var E=d,p=g;if(d>a.maxImageSize||g>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,d)),a.maxImageSize/Math.max(1,g));d*=A;g*=A}E>p?(p=Math.round(100*
-p/E),E=100):(E=Math.round(100*E/p),p=100);var B=document.createElement("div");B.setAttribute("draggable","true");B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.style.position="relative";B.style.cursor="move";mxUtils.setPrefixedStyle(B.style,"transition","transform .1s ease-in-out");if(null!=c){var M=document.createElement("img");M.setAttribute("src",v.convert(c));M.style.width=E+"px";M.style.height=p+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((100-p)/2)+"px";M.style.paddingLeft=
+b},DraftDialog=function(a,e,d,b,g,k,n,m){var q=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,e);q.appendChild(c);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);q.appendChild(f);var h=new Graph(f);
+h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;e=mxUtils.parseXml(d);var u=a.editor.extractGraphModel(e.documentElement,!0),p=0,t=null,x=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[p]?t[p].getAttribute("name"):"pagenumber"==a?p+1:x.apply(this,arguments)};h.getLinkForCell=function(){return null};e=mxUtils.button("",function(){h.zoomIn()});e.className=
+"geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){h.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);c=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});c.className="geSprite geSprite-fit";c.setAttribute("title",
+mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var w=mxUtils.button("",function(){h.zoomActual();h.center()});w.className="geSprite geSprite-actualsize";w.setAttribute("title",mxResources.get("actualSize"));w.style.outline="none";w.style.border="none";w.style.margin="2px";mxUtils.setOpacity(w,60);g=mxUtils.button(n||mxResources.get("discard"),g);g.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position=
+"relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function b(b){null!=b&&(b=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(y,"change",function(a){p=parseInt(y.value);b(t[p]);mxEvent.consume(a)});if("mxfile"==u.nodeName){var w=u.getElementsByTagName("diagram");
+t=[];for(var d=0;d<w.length;d++)t.push(w[d]);0<t.length&&b(t[p]);if(1<t.length)for(y.style.display="",d=0;d<t.length;d++)w=document.createElement("option"),mxUtils.write(w,t[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),w.setAttribute("value",d),d==p&&w.setAttribute("selected","selected"),y.appendChild(w)}else c(u)};n.appendChild(y);n.appendChild(e);n.appendChild(d);n.appendChild(w);n.appendChild(c);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.className=
+"geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(k.appendChild(e),null!=m&&k.appendChild(m),k.appendChild(g),k.appendChild(b)):(k.appendChild(b),k.appendChild(g),null!=m&&k.appendChild(m),k.appendChild(e));q.appendChild(k);q.appendChild(n);this.container=q},FindWindow=function(a,e,d,b,g){function k(a,c,b){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var f=0;f<c.length;f++)if("label"!=c[f].nodeName){var l=
+mxUtils.trim(c[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&l.substring(0,b.length)===b||null!=a&&a.test(l))return!0}}return!1}function n(){var a=q.model.getDescendants(q.model.getRoot()),b=u.value.toLowerCase(),l=p.checked?new RegExp(b):null,h=null;c!=b&&(c=b,f=null);var d=null==f;if(0<b.length)for(var e=0;e<a.length;e++){var g=q.view.getState(a[e]);if(null!=g&&null!=g.cell.value&&(d||null==h)&&(q.model.isVertex(g.cell)||q.model.isEdge(g.cell))&&(q.isHtmlLabel(g.cell)?
+(t.innerHTML=q.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([t])):label=q.getLabel(g.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==l&&(label.substring(0,b.length)===b||k(l,g.cell,b))||null!=l&&(l.test(label)||k(l,g.cell,b))))if(d){h=g;break}else null==h&&(h=g);d=d||g==f}null!=h?(f=h,q.scrollCellToVisible(f.cell),q.isEnabled()?q.setSelectionCell(f.cell):q.highlightCell(f.cell)):q.isEnabled()&&q.clearSelection();return 0==b.length||null!=h}
+var m=a.actions.get("find"),q=a.editor.graph,c=null,f=null,h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";h.appendChild(u);mxUtils.br(h);var p=document.createElement("input");
+p.setAttribute("type","checkbox");p.style.marginRight="4px";h.appendChild(p);mxUtils.write(h,mxResources.get("regularExpression"));var t=document.createElement("div");mxUtils.br(h);var x=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";c=f=null;u.focus()});x.setAttribute("title",mxResources.get("reset"));x.style.marginTop="6px";x.style.marginRight="4px";x.className="geBtn";h.appendChild(x);x=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=
+n()?"":"#ffcfcf"}catch(w){a.handleError(w)}});x.setAttribute("title",mxResources.get("find")+" (Enter)");x.style.marginTop="6px";x.className="geBtn gePrimaryBtn";h.appendChild(x);mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(c!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=n()?"":"#ffcfcf"}catch(y){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"keydown",function(c){70==c.keyCode&&
+a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),h,e,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)):q.container.focus()}))},
+TagsWindow=function(a,e,d,b,g){function k(a){a=null!=a?a:m.model.getDescendants(m.model.getRoot());for(var c=f.value.split(" "),b=[],h=0;h<a.length;h++)if(m.model.isVertex(a[h])||m.model.isEdge(a[h])){var p=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(q)||""):"",l=!0;if(0<p.length)for(var p=p.toLowerCase().split(" "),d=0;d<c.length&&l;d++)var e=mxUtils.trim(c[d]).toLowerCase(),l=l&&(0==e.length||0<=mxUtils.indexOf(p,e));else l=0==mxUtils.trim(f.value).length;
+l&&b.push(a[h])}return b}function n(a,c){m.model.beginUpdate();try{for(var b=0;b<a.length;b++)m.model.setVisible(a[b],c)}finally{m.model.endUpdate()}}var m=a.editor.graph,q="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type","text");f.style.marginTop="4px";f.style.width="260px";f.style.fontSize="12px";
+f.style.borderRadius="4px";f.style.padding="6px";c.appendChild(f);if(!a.isOffline()||mxClient.IS_CHROMEAPP){f.style.width="240px";var h=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");h.firstChild.style.marginBottom="6px";h.style.marginLeft="6px";c.appendChild(h)}mxEvent.addListener(f,"dblclick",function(){var c=new FilenameDialog(a,q,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(q=a)}),mxResources.get("enterPropertyName"));a.showDialog(c.container,
+300,80,!0,!0);c.init()});f.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(c);h=mxUtils.button(mxResources.get("hide"),function(){n(k(),!1)});h.setAttribute("title",mxResources.get("hide"));h.style.marginTop="8px";h.style.marginRight="4px";h.className="geBtn";c.appendChild(h);h=mxUtils.button(mxResources.get("show"),function(){var a=k();n(a,!0);m.isEnabled()&&m.setSelectionCells(a)});h.setAttribute("title",mxResources.get("show"));h.style.marginTop="8px";h.style.marginRight=
+"4px";h.className="geBtn";c.appendChild(h);var u=a.actions.get("tags"),h=mxUtils.button(mxResources.get("close"),function(){u.funct()});h.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");h.style.marginTop="8px";h.className="geBtn gePrimaryBtn";c.appendChild(h);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||u.funct()});this.window=new mxWindow(mxResources.get("tags"),c,e,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
+this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},AuthDialog=function(a,e,d,b){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
+mxResources.get("authorizationRequired"));var n="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";e==a.drive?(n=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?(n=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(n=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(n=mxResources.get("github"),m.src=IMAGE_PATH+
+"/github-logo-white.svg"):e==a.trello&&(n=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[n]));var q=document.createElement("input");q.setAttribute("type","checkbox");n=mxUtils.button(mxResources.get("authorize"),function(){b(q.checked)});n.insertBefore(m,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";g.appendChild(k);g.appendChild(a);g.appendChild(n);d&&(d=document.createElement("p"),
+d.style.marginTop="20px",d.appendChild(q),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),g.appendChild(d),q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,e,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div");if(e){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 g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
+"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(e.style.width)-202+"px",k.style.height=g.style.height,k.style.marginTop=g.style.marginTop);var n=null,m=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";for(var c=0;c<d.length;c++)(function(b){var f=q.cloneNode(!1);f.style.fontWeight="bold";f.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";f.style.padding="6px 0px 6px 20px";mxUtils.write(f,b.title);g.appendChild(f);for(var l=0;l<b.entries.length;l++)(function(b){var f=q.cloneNode(!1);f.style.cursor="pointer";f.style.padding="4px 0px 4px 20px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.checked=a.sidebar.isEntryVisible(b.id);h.defaultChecked=h.checked;f.appendChild(h);mxUtils.write(f," "+b.title);g.appendChild(f);var p=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
+b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML='<img border="0" src="'+b.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=n&&(n.style.backgroundColor=""),n=f,n.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(f,"click",p);mxEvent.addListener(f,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});m.push(function(){return h.checked?b.id:null});0==c&&0==l&&p()})(b.entries[l])})(d[c]);
+b.style.padding="30px";b.appendChild(e);b.appendChild(g);b.appendChild(k);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=
+document.createElement("span"),e.style.paddingRight="20px",e.appendChild(f),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var h=mxUtils.button(mxResources.get("apply"),
+function(){a.hideDialog();for(var c=[],b=0;b<m.length;b++){var l=m[b].apply(this,arguments);null!=l&&c.push(l)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});h.className="geBtn gePrimaryBtn"}else{var u=document.createElement("table"),p=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var t=document.createElement("tr");u.style.width="100%";e=document.createElement("td");var h=document.createElement("td"),x=document.createElement("td"),w=mxUtils.bind(this,function(c,
+b,f){var l=document.createElement("input");l.type="checkbox";u.appendChild(l);l.checked=a.sidebar.isEntryVisible(f);var h=document.createElement("span");mxUtils.write(h,b);b=document.createElement("div");b.style.display="block";b.appendChild(l);b.appendChild(h);mxEvent.addListener(h,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return l.checked?f:null}});t.appendChild(e);t.appendChild(h);t.appendChild(x);p.appendChild(t);u.appendChild(p);for(var m=
+[],y=0,c=0;c<d.length;c++)for(p=0;p<d[c].entries.length;p++)y++;for(var l=[e,h,x],v=0,c=0;c<d.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];m.push(w(l[Math.floor(v/(y/3))],b.title,b.id));v++}})(d[c]);b.appendChild(u);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,d.appendChild(f),e=document.createElement("span"),
+mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";h=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<m.length;b++){var l=m[b].apply(this,arguments);null!=l&&c.push(l)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});h.className=
+"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(h)):(d.appendChild(h),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function e(){if(0==g.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<g.length;c++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var d=document.createElement("span");d.className="geSprite geSprite-delete";
+d.style.position="relative";d.style.cursor="pointer";d.style.top="5px";d.style.marginRight="4px";d.style.display="inline-block";h.appendChild(d);mxUtils.write(h,g[c]);b.appendChild(h);mxUtils.br(b);mxEvent.addListener(d,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+g[c]+'"?',function(){g.splice(c,1);e()})}}(c))}}}var d=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();
+d.appendChild(b);e();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var d=b.split(";"),b=0;b<d.length;b++){var p=App.pluginRegistry[d[b]];null!=p&&(c+=p+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){d=a.split(";");for(a=0;a<d.length;a++){var c=d[a],b=App.pluginRegistry[c];null!=b&&(c=b);0<c.length&&0>mxUtils.indexOf(g,c)&&g.push(c)}e()}},mxResources.get("enterValue")+
+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.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 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");var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(n),c.appendChild(q),c.appendChild(k),c.appendChild(m)):(c.appendChild(q),c.appendChild(k),c.appendChild(m),c.appendChild(n));d.appendChild(c);this.container=d},CropImageDialog=function(a,e,d){var b=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),
+n=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+"...");n.appendChild(m);k.appendChild(n);var n=document.createElement("tr"),q=document.createElement("td"),c=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(q,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()};c.appendChild(f);n.appendChild(q);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";c.appendChild(h);n.appendChild(q);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("right")+
+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";c.appendChild(u);n.appendChild(q);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("bottom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";c.appendChild(p);n.appendChild(q);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");
+q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("circle")+":");n.appendChild(q);var t=document.createElement("input");t.setAttribute("type","checkbox");c.appendChild(t);n.appendChild(c);k.appendChild(n);g.appendChild(k);b.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=new Image,w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),e=x.width,
+w=x.height,g=parseInt(f.value),k=parseInt(h.value),e=Math.max(1,e-g-parseInt(u.value)),w=Math.max(1,w-k-parseInt(p.value));c.width=e;c.height=w;t.checked&&(b.fillStyle="#000000",b.arc(e/2,w/2,Math.min(e/2,w/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation="source-in");b.drawImage(x,g,k,e,w,0,0,e,w);d(c.toDataURL())});w.setAttribute("disabled","disabled");x.onload=function(){w.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+x.width+" "+mxResources.get("height")+
+": "+x.height)};x.src=e;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&w.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(g),e.appendChild(w)):(e.appendChild(w),e.appendChild(g));b.appendChild(e);this.container=b},EditGeometryDialog=function(a,e){var d=a.editor.graph,b=1==e.length?d.getCellGeometry(e[0]):null,g=document.createElement("div"),k=document.createElement("table"),n=document.createElement("tbody"),
+m=document.createElement("tr"),q=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(q,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=b?b.x:"";this.init=function(){f.focus();f.select()};c.appendChild(f);m.appendChild(q);m.appendChild(c);n.appendChild(m);m=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("top")+
+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=b?b.y:"";c.appendChild(h);m.appendChild(q);m.appendChild(c);n.appendChild(m);m=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b?b.width:"";c.appendChild(u);m.appendChild(q);m.appendChild(c);n.appendChild(m);
+m=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.height:"";c.appendChild(p);m.appendChild(q);m.appendChild(c);n.appendChild(m);m=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("rotation")+":");var t=document.createElement("input");
+t.setAttribute("type","text");t.style.width="100px";t.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(t);m.appendChild(q);m.appendChild(c);n.appendChild(m);k.appendChild(n);g.appendChild(k);var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var b=d.getCellGeometry(e[c]);null!=b&&(b=b.clone(),d.isCellMovable(e[c])&&
+(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(h.value).length&&(b.y=Number(h.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(u.value).length&&(b.width=Number(u.value)),0<mxUtils.trim(p.value).length&&(b.height=Number(p.value))),d.getModel().setGeometry(e[c],b));0<mxUtils.trim(t.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[e[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&x.click()});k=document.createElement("div");
+k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(x)):(k.appendChild(x),k.appendChild(b));g.appendChild(k);this.container=g},LibraryDialog=function(a,e,d,b,g,k){function n(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=p;)a=a.parentNode;var c=null;if(null!=a)for(var b=p.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function m(c,b,h,d,e,g,u,k,y){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&
+null!=u||null==x[c]){var D=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=z.title&&0<z.title.length?z.title:mxResources.get("untitled"));I.style.color=null==z.title||0==z.title.length?"#d0d0d0":""};p.style.backgroundImage="";t.style.display="none";var E=e,q=g;if(e>a.maxImageSize||g>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,g));e*=A;g*=A}E>q?(q=Math.round(100*
+q/E),E=100):(E=Math.round(100*E/q),q=100);var B=document.createElement("div");B.setAttribute("draggable","true");B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.style.position="relative";B.style.cursor="move";mxUtils.setPrefixedStyle(B.style,"transition","transform .1s ease-in-out");if(null!=c){var M=document.createElement("img");M.setAttribute("src",v.convert(c));M.style.width=E+"px";M.style.height=q+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((100-q)/2)+"px";M.style.paddingLeft=
Math.floor((100-E)/2)+"px";B.appendChild(M)}else if(null!=u){var C=a.stringToCells(a.editor.graph.decompress(u.xml));0<C.length&&(a.sidebar.createThumb(C,100,100,B,null,!0,!1),B.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",B.firstChild.style.cursor="")}var L=document.createElement("img");L.setAttribute("src",Editor.closeImage);L.setAttribute("border","0");L.setAttribute("title",mxResources.get("delete"));L.setAttribute("align","top");L.style.paddingTop="4px";L.style.position=
-"absolute";L.style.marginLeft="-12px";L.style.zIndex="1";L.style.cursor="pointer";mxEvent.addListener(L,"dragstart",function(a){mxEvent.consume(a)});(function(a,c,b){mxEvent.addListener(L,"click",function(l){x[c]=null;for(var h=0;h<f.length;h++)if(null!=f[h].data&&f[h].data==c||null!=f[h].xml&&null!=b&&f[h].xml==b.xml){f.splice(h,1);break}B.parentNode.removeChild(a);0==f.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(l)});mxEvent.addListener(L,
-"dblclick",function(a){mxEvent.consume(a)})})(B,c,u);B.appendChild(L);B.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var z=null;null!=c?(z={data:c,w:d,h:g,title:y},null!=k&&(z.aspect=k),x[c]=M,f.push(z)):null!=u&&(u.aspect="fixed",f.push(u),z=u);mxEvent.addListener(I,"keydown",
+"absolute";L.style.marginLeft="-12px";L.style.zIndex="1";L.style.cursor="pointer";mxEvent.addListener(L,"dragstart",function(a){mxEvent.consume(a)});(function(a,c,b){mxEvent.addListener(L,"click",function(l){x[c]=null;for(var h=0;h<f.length;h++)if(null!=f[h].data&&f[h].data==c||null!=f[h].xml&&null!=b&&f[h].xml==b.xml){f.splice(h,1);break}B.parentNode.removeChild(a);0==f.length&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(l)});mxEvent.addListener(L,
+"dblclick",function(a){mxEvent.consume(a)})})(B,c,u);B.appendChild(L);B.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var z=null;null!=c?(z={data:c,w:e,h:g,title:y},null!=k&&(z.aspect=k),x[c]=M,f.push(z)):null!=u&&(u.aspect="fixed",f.push(u),z=u);mxEvent.addListener(I,"keydown",
function(a){13==a.keyCode&&null!=l&&(l(),l=null,mxEvent.consume(a))});D();B.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});C=function(c){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,z.title||"",mxResources.get("ok"),function(a){null!=a&&(z.title=a,D())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();
mxEvent.consume(c)}else if("true"!=I.getAttribute("contentEditable")){null!=l&&(l(),l=null);if(null==z.title||0==z.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",!1,null);l=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";z.title=I.innerHTML;D()};mxEvent.consume(c)}};mxEvent.addListener(I,"click",C);mxEvent.addListener(B,"dblclick",
-C);t.appendChild(B);mxEvent.addListener(B,"dragstart",function(a){null==c&&null!=u&&(L.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=u.xml&&a.dataTransfer.setData("Text",u.xml);w=m(a);mxClient.IS_GC&&(B.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(B.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(B,30);L.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(B,"dragend",function(a){"hidden"==L.style.visibility&&(L.style.visibility=
-"",I.style.visibility="");w=null;mxUtils.setOpacity(B,100);mxUtils.setPrefixedStyle(B.style,"transform",null)})}else H||(H=!0,a.handleError({message:mxResources.get("fileExists")}));else{d=!1;try{if(a.spinner.stop(),E=mxUtils.parseXml(c),"mxlibrary"==E.documentElement.nodeName){p=JSON.parse(mxUtils.getTextContent(E.documentElement));if(null!=p&&0<p.length)for(var F=0;F<p.length;F++)null!=p[F].xml?n(null,null,0,0,0,0,p[F]):n(p[F].data,null,0,0,p[F].w,p[F].h,null,"fixed",p[F].title);d=!0}else if("mxfile"==
-E.documentElement.nodeName){for(var G=E.documentElement.getElementsByTagName("diagram"),F=0;F<G.length;F++){var p=mxUtils.getTextContent(G[F]),C=a.stringToCells(a.editor.graph.decompress(p)),X=a.editor.graph.getBoundingBoxFromGeometry(C);n(null,null,0,0,0,0,{xml:p,w:X.width,h:X.height})}d=!0}}catch(Z){}d||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function p(a){a.dataTransfer.dropEffect=null!=w?"move":"copy";a.stopPropagation();a.preventDefault()}
-function c(c){c.stopPropagation();c.preventDefault();H=!1;y=m(c);if(null!=w)null!=y&&y<t.children.length?(f.splice(y>w?y-1:y,0,f.splice(w,1)[0]),t.insertBefore(t.children[w],t.children[y])):(f.push(f.splice(w,1)[0]),t.appendChild(t.children[w]));else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,E(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||
-/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){n(b,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];e=document.createElement("div");e.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";e.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",
-d);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==g||g.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};h.appendChild(u);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";
-t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));e.appendChild(q);var x={},w=null,y=null,l=null;
-d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=l&&(l(),l=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",d);mxEvent.addListener(t,"pointerdown",d);mxEvent.addListener(t,"touchstart",d);var v=new mxUrlConverter,H=!1;if(null!=b)for(d=0;d<b.length;d++)h=b[d],n(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(t,"dragleave",function(a){q.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==t||c==q){a.stopPropagation();a.preventDefault();
-break}c=c.parentNode}});var E=function(c){return function(b,f,l,h,e,d,w,g,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(b){a.spinner.stop();n(b,f,l,h,e,d,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,q.name)?a.parseFile(q,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=
-b.status&&(n(b.responseText,f,l,h,e,d,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(n(b,f,l,h,e,d,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",p);mxEvent.addListener(t,"drop",c);mxEvent.addListener(q,"dragover",p);mxEvent.addListener(q,"drop",c);e.appendChild(t);b=document.createElement("div");b.style.textAlign="right";
-b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);h=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(f),b=u.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,
-"_blank")});h.setAttribute("id","btnDownload");h.className="geBtn";b.appendChild(h);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(c){H=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,b,f,l,h,e,d,t,w){E(c)(a,b,f,l,h,e,d,t,w);A.value=""});t.scrollTop=t.scrollHeight}),h=mxUtils.button(mxResources.get("import"),function(){null!=l&&(l(),l=null);A.click()}),h.setAttribute("id",
-"btnAddImage"),h.className="geBtn",b.appendChild(h));h=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=l&&(l(),l=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){H=!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))}n(a,null,0,0,c,b);t.scrollTop=t.scrollHeight}})});h.setAttribute("id","btnAddImageUrl");h.className="geBtn";b.appendChild(h);this.saveBtnClickHandler=function(c,b,f,l){a.saveLibrary(c,
-b,f,l)};h=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=l&&(l(),l=null);this.saveBtnClickHandler(u.value,f,g,k)}));h.setAttribute("id","btnSave");h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(d);e.appendChild(b);this.container=e},EditShapeDialog=function(a,d,e,b,g){b=null!=b?b:300;g=null!=g?g:120;var k,m,n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";k=document.createElement("tr");m=
-document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,e);k.appendChild(m);p.appendChild(k);k=document.createElement("tr");m=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=g+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};m.appendChild(c);k.appendChild(m);m=document.createElement("td");e=document.createElement("div");e.style.position=
-"relative";e.style.border="1px solid gray";e.style.top="6px";e.style.width="200px";e.style.height=g+4+"px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);m.appendChild(e);var f=new Graph(e);f.setEnabled(!1);var h=a.editor.graph.cloneCells([d])[0];f.addCells([h]);e=f.view.getState(h);var u="";null!=e.shape&&null!=e.shape.stencil&&(u=mxUtils.getPrettyXml(e.shape.stencil.desc));mxUtils.write(c,u||"");e=f.getGraphBounds();g=Math.min(160/e.width,(g-40)/e.height);f.view.scaleAndTranslate(g,
-20/g-e.x,20/g-e.y);k.appendChild(m);p.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&m.appendChild(g);a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-e.className="geBtn",m.appendChild(e));var t=function(b,f,h){var e=c.value,l=mxUtils.parseXml(e),e=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(h&&a.hideDialog(),l=!b.model.contains(f),!h||l||e!=u){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(l){var d=a.editor.graph.getInsertPoint();f.geometry.x=d.x;
-f.geometry.y=d.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(H){throw H;}finally{b.getModel().endUpdate()}l&&b.setSelectionCell(f)}};e=mxUtils.button(mxResources.get("preview"),function(){t(f,h,!1)});e.className="geBtn";m.appendChild(e);e=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,d,!0)});e.className="geBtn gePrimaryBtn";m.appendChild(e);a.editor.cancelFirst||m.appendChild(g);k.appendChild(m);p.appendChild(k);n.appendChild(p);this.container=
-n},CustomDialog=function(a,d,e,b,g,k,m,n){var p=document.createElement("div");p.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";null!=m&&d.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});m.className="geBtn";n&&(m.style.display="none");a.editor.cancelFirst&&d.appendChild(m);a.isOffline()||null==k||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),n.className="geBtn",d.appendChild(n));
-g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e()});d.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(m);p.appendChild(d);this.cancelBtn=m;this.okButton=g;this.container=p};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+C);p.appendChild(B);mxEvent.addListener(B,"dragstart",function(a){null==c&&null!=u&&(L.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=u.xml&&a.dataTransfer.setData("Text",u.xml);w=n(a);mxClient.IS_GC&&(B.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(B.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(B,30);L.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(B,"dragend",function(a){"hidden"==L.style.visibility&&(L.style.visibility=
+"",I.style.visibility="");w=null;mxUtils.setOpacity(B,100);mxUtils.setPrefixedStyle(B.style,"transform",null)})}else H||(H=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),E=mxUtils.parseXml(c),"mxlibrary"==E.documentElement.nodeName){q=JSON.parse(mxUtils.getTextContent(E.documentElement));if(null!=q&&0<q.length)for(var F=0;F<q.length;F++)null!=q[F].xml?m(null,null,0,0,0,0,q[F]):m(q[F].data,null,0,0,q[F].w,q[F].h,null,"fixed",q[F].title);e=!0}else if("mxfile"==
+E.documentElement.nodeName){for(var G=E.documentElement.getElementsByTagName("diagram"),F=0;F<G.length;F++){var q=mxUtils.getTextContent(G[F]),C=a.stringToCells(a.editor.graph.decompress(q)),X=a.editor.graph.getBoundingBoxFromGeometry(C);m(null,null,0,0,0,0,{xml:q,w:X.width,h:X.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function q(a){a.dataTransfer.dropEffect=null!=w?"move":"copy";a.stopPropagation();a.preventDefault()}
+function c(c){c.stopPropagation();c.preventDefault();H=!1;y=n(c);if(null!=w)null!=y&&y<p.children.length?(f.splice(y>w?y-1:y,0,f.splice(w,1)[0]),p.insertBefore(p.children[w],p.children[y])):(f.push(f.splice(w,1)[0]),p.appendChild(p.children[w]));else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,E(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||
+/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){m(b,null,0,0,a.width,a.height);p.scrollTop=p.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];d=document.createElement("div");d.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";d.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",
+e);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==g||g.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};h.appendChild(u);var p=document.createElement("div");p.style.borderWidth="1px 0px 1px 0px";p.style.borderColor="#d3d3d3";p.style.borderStyle="solid";p.style.marginTop="6px";
+p.style.overflow="auto";p.style.height="340px";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var t=document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,mxResources.get("dragImagesHere"));d.appendChild(t);var x={},w=null,y=null,l=null;
+e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=l&&(l(),l=null,mxEvent.consume(a))};mxEvent.addListener(p,"mousedown",e);mxEvent.addListener(p,"pointerdown",e);mxEvent.addListener(p,"touchstart",e);var v=new mxUrlConverter,H=!1;if(null!=b)for(e=0;e<b.length;e++)h=b[e],m(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(p,"dragleave",function(a){t.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==p||c==t){a.stopPropagation();a.preventDefault();
+break}c=c.parentNode}});var E=function(c){return function(b,f,l,h,d,e,w,g,u){null!=u&&(/(\.vsdx)($|\?)/i.test(u.name)||/(\.vssx)($|\?)/i.test(u.name))?a.importVisio(u,mxUtils.bind(this,function(b){a.spinner.stop();m(b,f,l,h,d,e,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," "))})):null!=u&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,u.name)?a.parseFile(u,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=
+b.status&&(m(b.responseText,f,l,h,d,e,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight))})):(m(b,f,l,h,d,e,w,"fixed",mxEvent.isAltDown(c)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight)}};mxEvent.addListener(p,"dragover",q);mxEvent.addListener(p,"drop",c);mxEvent.addListener(t,"dragover",q);mxEvent.addListener(t,"drop",c);d.appendChild(p);b=document.createElement("div");b.style.textAlign="right";
+b.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);h=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(f),b=u.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,
+"_blank")});h.setAttribute("id","btnDownload");h.className="geBtn";b.appendChild(h);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(c){H=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,b,f,l,h,d,p,e,w){E(c)(a,b,f,l,h,d,p,e,w);A.value=""});p.scrollTop=p.scrollHeight}),h=mxUtils.button(mxResources.get("import"),function(){null!=l&&(l(),l=null);A.click()}),h.setAttribute("id",
+"btnAddImage"),h.className="geBtn",b.appendChild(h));h=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=l&&(l(),l=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){H=!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,c,b);p.scrollTop=p.scrollHeight}})});h.setAttribute("id","btnAddImageUrl");h.className="geBtn";b.appendChild(h);this.saveBtnClickHandler=function(c,b,f,l){a.saveLibrary(c,
+b,f,l)};h=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=l&&(l(),l=null);this.saveBtnClickHandler(u.value,f,g,k)}));h.setAttribute("id","btnSave");h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(e);d.appendChild(b);this.container=d},EditShapeDialog=function(a,e,d,b,g){b=null!=b?b:300;g=null!=g?g:120;var k,n,m=document.createElement("table"),q=document.createElement("tbody");m.style.cellPadding="4px";k=document.createElement("tr");n=
+document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,d);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=g+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};n.appendChild(c);k.appendChild(n);n=document.createElement("td");d=document.createElement("div");d.style.position=
+"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);n.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var h=a.editor.graph.cloneCells([e])[0];f.addCells([h]);d=f.view.getState(h);var u="";null!=d.shape&&null!=d.shape.stencil&&(u=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(c,u||"");d=f.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);f.view.scaleAndTranslate(g,
+20/g-d.x,20/g-d.y);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&n.appendChild(g);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+d.className="geBtn",n.appendChild(d));var p=function(b,f,h){var d=c.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(h&&a.hideDialog(),l=!b.model.contains(f),!h||l||d!=u){d=a.editor.graph.compress(d);b.getModel().beginUpdate();try{if(l){var p=a.editor.graph.getInsertPoint();f.geometry.x=p.x;
+f.geometry.y=p.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[f])}catch(H){throw H;}finally{b.getModel().endUpdate()}l&&b.setSelectionCell(f)}};d=mxUtils.button(mxResources.get("preview"),function(){p(f,h,!1)});d.className="geBtn";n.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){p(a.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";n.appendChild(d);a.editor.cancelFirst||n.appendChild(g);k.appendChild(n);q.appendChild(k);m.appendChild(q);this.container=
+m},CustomDialog=function(a,e,d,b,g,k,n,m){var q=document.createElement("div");q.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=n&&e.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";m&&(n.style.display="none");a.editor.cancelFirst&&e.appendChild(n);a.isOffline()||null==k||(m=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),m.className="geBtn",e.appendChild(m));
+g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});e.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(n);q.appendChild(e);this.cancelBtn=n;this.okButton=g;this.container=q};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
@@ -7042,36 +7042,36 @@ a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyl
"text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};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&&(h=new mxCodec(f.ownerDocument),h.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 h=new mxCodec(f.ownerDocument);h.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?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);
+mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;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 e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=e.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(v){}return!1};Editor.prototype.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 h=0;h<b.length;h++)if("mxgraph"==b[h].getAttribute("class")){f.push(b[h]);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=this.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=this.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};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?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
+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=this.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};var d=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?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};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"],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){this.graph.mathEnabled&&"hidden"!=this.graph.container.style.visibility&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var h=document.createElement("script");h.type="text/javascript";h.src=a;f[0].parentNode.appendChild(h)}};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,h){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==h&&c.push(h);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-n.apply(this,arguments):this.clear()};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);var c=this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&("1"==urlParams.embed||null!=c&&c.isEditable())){var b=this.editorUi,f=b.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return f.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;f.model.execute(c)},{install:function(a){this.listener=
+var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.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()};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=q.apply(this,arguments);var c=this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&("1"==urlParams.embed||null!=c&&c.isEditable())){var b=this.editorUi,f=b.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return f.shadowVisible},function(a){var c=new ChangePageSetup(b);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;f.model.execute(c)},{install:function(a){this.listener=
function(){a(f.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var f=b.getCurrentFile();null!=f&&f.isAutosaveOptional()&&
(f=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(f))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,
{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var h=StyleFormatPanel.prototype.addStyleOps;
StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
-c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};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 h=f.getModel().getStyle(b[c]),l=0;l<e.length;l++)h=mxUtils.removeStylename(h,
-e[l]);null!=a?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,a.fill),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,a.stroke),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,"#000000"),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],h)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=
+c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};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 h=f.getModel().getStyle(b[c]),l=0;l<d.length;l++)h=mxUtils.removeStylename(h,
+d[l]);null!=a?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,a.fill),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,a.stroke),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,"#000000"),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],h)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=
"30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");h.appendChild(c)}h.innerHTML=
-"";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(h),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(h);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var d=document.createElement("div");d.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var t=document.createElement("div");t.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(d),a.appendChild(t));mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(d);b(t);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+"";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(h),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(h);var d="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");
+null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var p=document.createElement("div");p.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(p),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(p);b(e);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,h=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=h&&null!=h.shape&&null!=h.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var u=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}u.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
-c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return f.apply(this,arguments)}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
+c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return f.apply(this,arguments)}};var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,c,f,!1);h.highlight(a);window.setTimeout(function(){null!=h.shape&&(mxUtils.setPrefixedStyle(h.shape.node.style,"transition","all 1200ms ease-in-out"),h.shape.node.style.opacity=0);window.setTimeout(function(){h.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;
var f=a.ownerDocument,h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");h.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");h.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");h.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");h.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):
@@ -7084,86 +7084,86 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/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.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.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 q=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,h,e,d,t,g,u){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);
-null!=l&&mxStencilRegistry.getStencil(l)}return q.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){m.value=Math.max(1,Math.min(t,Math.max(parseInt(m.value),parseInt(k.value))));k.value=Math.max(1,Math.min(t,Math.min(parseInt(m.value),parseInt(k.value))))}function f(c){function b(c,b,h){var l=c.getGraphBounds(),e=0,d=0,t=Z.get(),q=1/c.pageScale,g=y.checked;if(g)var q=parseInt(N.value),u=parseInt(X.value),q=Math.min(t.height*u/(l.height/c.view.scale),t.width*q/(l.width/
-c.view.scale));else q=parseInt(p.value)/(100*c.pageScale),isNaN(q)&&(f=1/c.pageScale,p.value="100 %");t=mxRectangle.fromRectangle(t);t.width=Math.ceil(t.width*f);t.height=Math.ceil(t.height*f);q*=f;!g&&c.pageVisible?(l=c.getPageLayout(),e-=l.x*t.width,d-=l.y*t.height):g=!0;if(null==b){b=PrintDialog.createPrintPreview(c,q,t,0,e,d,g);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var w=b.writeHead;b.writeHead=function(c){w.apply(this,arguments);null!=a.editor.fontCss&&
-(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage=function(a,c,b,f,h,l){var e=v.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,h,!0)}else{t=c.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";b.backgroundColor=t;b.autoOrigin=g;b.appendGraph(c,q,e,d,h,!0)}return b}var f=parseInt(U.value)/100;isNaN(f)&&(f=1,U.value=
-"100 %");var f=.75*f,l=k.value,d=m.value,e=!u.checked,t=null;e&&(e=l==g&&d==g);if(!e&&null!=a.pages&&a.pages.length){var q=0,e=a.pages.length-1;u.checked||(q=parseInt(l)-1,e=parseInt(d)-1);for(var w=q;w<=e;w++){var v=a.pages[w],l=v==a.currentPage?h:null;if(null==l){var l=a.createTemporaryGraph(h.getStylesheet()),d=!0,q=!1,x=null,n=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(d=v.viewState.pageVisible,q=v.viewState.mathEnabled,x=v.viewState.background,
-n=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(q="0"!=v.mapping.diagramMap.get("mathEnabled"),x=v.mapping.diagramMap.get("background"),n=v.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null);l.background=x;l.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;l.pageVisible=d;l.mathEnabled=q;var D=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?w+1:D.apply(this,arguments)};document.body.appendChild(l.container);
-a.updatePageRoot(v);l.model.setRoot(v.root)}t=b(l,t,w!=e);l!=h&&l.container.parentNode.removeChild(l.container)}}else t=b(h);t.mathEnabled&&(e=t.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),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("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("});"),c&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&c&&PrintDialog.printPreview(t)}
-var h=a.editor.graph,e=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,c||mxResources.get("print"));e.appendChild(d);var t=1,g=1,q=document.createElement("div");q.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");q.appendChild(u);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));q.appendChild(d);mxUtils.br(q);var w=u.cloneNode(!0);u.setAttribute("checked","checked");w.setAttribute("value","range");q.appendChild(w);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");q.appendChild(d);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
-"number");k.setAttribute("min","1");k.style.width="50px";q.appendChild(k);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));q.appendChild(d);var m=k.cloneNode(!0);q.appendChild(m);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(m,"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(t=a.pages.length,null!=a.currentPage))for(d=0;d<a.pages.length;d++)if(a.currentPage==a.pages[d]){g=d+
-1;k.value=g;m.value=g;break}k.setAttribute("max",t);m.setAttribute("max",t);1<t&&e.appendChild(q);var x=document.createElement("div");x.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");x.appendChild(n);d=document.createElement("span");mxUtils.write(d,mxResources.get("adjustTo"));x.appendChild(d);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
-p.setAttribute("value","100 %");p.style.width="50px";x.appendChild(p);mxEvent.addListener(p,"focus",function(){n.checked=!0});e.appendChild(x);var q=q.cloneNode(!1),y=n.cloneNode(!0);y.setAttribute("value","fit");n.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(y);q.appendChild(d);x=document.createElement("table");x.style.display="inline-block";var R=document.createElement("tbody"),
-P=document.createElement("tr"),O=P.cloneNode(!0),K=document.createElement("td"),Q=K.cloneNode(!0),S=K.cloneNode(!0),Y=K.cloneNode(!0),J=K.cloneNode(!0),aa=K.cloneNode(!0);K.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(K,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";Q.appendChild(N);d=document.createElement("span");mxUtils.write(d,
-mxResources.get("fitToSheetsAcross"));S.appendChild(d);mxUtils.write(Y,mxResources.get("fitToBy"));var X=N.cloneNode(!0);J.appendChild(X);mxEvent.addListener(N,"focus",function(){y.checked=!0});mxEvent.addListener(X,"focus",function(){y.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));aa.appendChild(d);P.appendChild(K);P.appendChild(Q);P.appendChild(S);O.appendChild(Y);O.appendChild(J);O.appendChild(aa);R.appendChild(P);R.appendChild(O);x.appendChild(R);
-q.appendChild(x);e.appendChild(q);q=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom="12px";mxUtils.write(d,mxResources.get("paperSize"));q.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(d,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));q.appendChild(d);
-var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";q.appendChild(U);e.appendChild(q);d=document.createElement("div");d.style.cssText="text-align:right;margin:62px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&d.appendChild(q);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-x.className="geBtn",d.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),x.className="geBtn",d.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";d.appendChild(x);a.editor.cancelFirst||d.appendChild(q);e.appendChild(d);this.container=e};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+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,h,d,p,e,g,u){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(){n.value=Math.max(1,Math.min(e,Math.max(parseInt(n.value),parseInt(k.value))));k.value=Math.max(1,Math.min(e,Math.min(parseInt(n.value),parseInt(k.value))))}function f(c){function b(c,b,h){var l=c.getGraphBounds(),p=0,d=0,e=Z.get(),u=1/c.pageScale,g=y.checked;if(g)var u=parseInt(N.value),t=parseInt(X.value),u=Math.min(e.height*t/(l.height/c.view.scale),e.width*u/(l.width/
+c.view.scale));else u=parseInt(q.value)/(100*c.pageScale),isNaN(u)&&(f=1/c.pageScale,q.value="100 %");e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*f);e.height=Math.ceil(e.height*f);u*=f;!g&&c.pageVisible?(l=c.getPageLayout(),p-=l.x*e.width,d-=l.y*e.height):g=!0;if(null==b){b=PrintDialog.createPrintPreview(c,u,e,0,p,d,g);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var w=b.writeHead;b.writeHead=function(c){w.apply(this,arguments);null!=a.editor.fontCss&&
+(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage=function(a,c,b,f,h,l){var p=v.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:p.className="geDisableMathJax";return p}}b.open(null,null,h,!0)}else{e=c.background;if(null==e||""==e||e==mxConstants.NONE)e="#ffffff";b.backgroundColor=e;b.autoOrigin=g;b.appendGraph(c,u,p,d,h,!0)}return b}var f=parseInt(U.value)/100;isNaN(f)&&(f=1,U.value=
+"100 %");var f=.75*f,l=k.value,p=n.value,d=!t.checked,e=null;d&&(d=l==g&&p==g);if(!d&&null!=a.pages&&a.pages.length){var u=0,d=a.pages.length-1;t.checked||(u=parseInt(l)-1,d=parseInt(p)-1);for(var w=u;w<=d;w++){var v=a.pages[w],l=v==a.currentPage?h:null;if(null==l){var l=a.createTemporaryGraph(h.getStylesheet()),p=!0,u=!1,x=null,m=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(p=v.viewState.pageVisible,u=v.viewState.mathEnabled,x=v.viewState.background,
+m=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(u="0"!=v.mapping.diagramMap.get("mathEnabled"),x=v.mapping.diagramMap.get("background"),m=v.mapping.diagramMap.get("backgroundImage"),m=null!=m&&0<m.length?JSON.parse(m):null);l.background=x;l.backgroundImage=null!=m?new mxImage(m.src,m.width,m.height):null;l.pageVisible=p;l.mathEnabled=u;var D=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?w+1:D.apply(this,arguments)};document.body.appendChild(l.container);
+a.updatePageRoot(v);l.model.setRoot(v.root)}e=b(l,e,w!=d);l!=h&&l.container.parentNode.removeChild(l.container)}}else e=b(h);e.mathEnabled&&(d=e.wnd.document,d.writeln('<script type="text/x-mathjax-config">'),d.writeln("MathJax.Hub.Config({"),d.writeln('messageStyle: "none",'),d.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),d.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),d.writeln("TeX: {"),d.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+d.writeln("},"),d.writeln("tex2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("},"),d.writeln("asciimath2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("}"),d.writeln("});"),c&&(d.writeln("MathJax.Hub.Queue(function () {"),d.writeln("window.print();"),d.writeln("});")),d.writeln("\x3c/script>"),d.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));e.closeDocument();!e.mathEnabled&&c&&PrintDialog.printPreview(e)}
+var h=a.editor.graph,d=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,c||mxResources.get("print"));d.appendChild(p);var e=1,g=1,u=document.createElement("div");u.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");u.appendChild(t);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));u.appendChild(p);mxUtils.br(u);var w=t.cloneNode(!0);t.setAttribute("checked","checked");w.setAttribute("value","range");u.appendChild(w);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");u.appendChild(p);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
+"number");k.setAttribute("min","1");k.style.width="50px";u.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));u.appendChild(p);var n=k.cloneNode(!0);u.appendChild(n);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(n,"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(n,"change",b);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;k.value=g;n.value=g;break}k.setAttribute("max",e);n.setAttribute("max",e);1<e&&d.appendChild(u);var x=document.createElement("div");x.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");x.appendChild(m);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));x.appendChild(p);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";
+q.setAttribute("value","100 %");q.style.width="50px";x.appendChild(q);mxEvent.addListener(q,"focus",function(){m.checked=!0});d.appendChild(x);var u=u.cloneNode(!1),y=m.cloneNode(!0);y.setAttribute("value","fit");m.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(y);u.appendChild(p);x=document.createElement("table");x.style.display="inline-block";var R=document.createElement("tbody"),
+P=document.createElement("tr"),O=P.cloneNode(!0),K=document.createElement("td"),Q=K.cloneNode(!0),S=K.cloneNode(!0),Y=K.cloneNode(!0),J=K.cloneNode(!0),aa=K.cloneNode(!0);K.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(K,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";Q.appendChild(N);p=document.createElement("span");mxUtils.write(p,
+mxResources.get("fitToSheetsAcross"));S.appendChild(p);mxUtils.write(Y,mxResources.get("fitToBy"));var X=N.cloneNode(!0);J.appendChild(X);mxEvent.addListener(N,"focus",function(){y.checked=!0});mxEvent.addListener(X,"focus",function(){y.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));aa.appendChild(p);P.appendChild(K);P.appendChild(Q);P.appendChild(S);O.appendChild(Y);O.appendChild(J);O.appendChild(aa);R.appendChild(P);R.appendChild(O);x.appendChild(R);
+u.appendChild(x);d.appendChild(u);u=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));u.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);u.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));u.appendChild(p);
+var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";u.appendChild(U);d.appendChild(u);p=document.createElement("div");p.style.cssText="text-align:right;margin:62px 0 0 0;";u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&p.appendChild(u);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+x.className="geBtn",p.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),x.className="geBtn",p.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";p.appendChild(x);a.editor.cancelFirst||p.appendChild(u);d.appendChild(p);this.container=d};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.1";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.2";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
-!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),h=new Image;h.onload=function(){try{b.getContext("2d").drawImage(h,0,0);var a=
-b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};h.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,h){localStorage.setItem(a,b);h()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),h=new Image;h.onload=function(){try{b.getContext("2d").drawImage(h,0,0);var a=
+b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};h.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,h){localStorage.setItem(a,b);h()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=
a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,h){h=null!=h?h:24;var c=new Spinner({lines:12,length:h,width:Math.round(h/3),radius:Math.round(h/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(h,e){var d=!1;this.active||(f.call(this,h),this.active=!0,null!=e&&(d=document.createElement("div"),d.style.position="absolute",d.style.whiteSpace="nowrap",d.style.background="#4B4243",d.style.color="white",d.style.fontFamily="Helvetica, Arial",d.style.fontSize=
-"9pt",d.style.padding="6px",d.style.paddingLeft="10px",d.style.paddingRight="10px",d.style.zIndex=2E9,d.style.left=Math.max(0,a)+"px",d.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(d.style,"boxShadow","2px 2px 3px 0px #ddd"),d.innerHTML=e+"...",h.appendChild(d),c.status=d,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(d.style.left=
-Math.round(Math.max(0,a-d.offsetWidth/2))+"px",d.style.top=Math.round(Math.max(0,b+70-d.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(h,e)}));this.stop();return a}),d=!0);return d};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,h){function c(a,
+function(a,b,h){h=null!=h?h:24;var c=new Spinner({lines:12,length:h,width:Math.round(h/3),radius:Math.round(h/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(h,d){var p=!1;this.active||(f.call(this,h),this.active=!0,null!=d&&(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"),p.innerHTML=d+"...",h.appendChild(p),c.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(h,d)}));this.stop();return a}),p=!0);return p};var d=c.stop;c.stop=function(){d.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,h){function c(a,
c){var b=d;d+=c;return a.substring(b,d)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var d=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);do{h=f(a);var e=c(a,4);if(null!=b&&b(d-8,e,h))break;value=c(a,h);c(a,4);if("IEND"==e)break}while(h)}};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(u){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var h=c.indexOf("&lt;mxfile ");if(0<=h){var d=c.lastIndexOf("&lt;/mxfile&gt;");d>h&&(b=c.substring(h,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,
-null!=this.pages),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))}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,h,d,e,g,k,w,m,l){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var c,f=null;null==h||h.getMode()==App.MODE_DEVICE||h.getMode()==App.MODE_BROWSER?c="_blank":f=c=d;if(null==a)return"";var t=a;if("mxfile"!=t.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),t=b.compress(q);if(b.decompress(t)!=q)return q;q=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,t);t=a.ownerDocument.createElement("mxfile");t.appendChild(q)}l?(t=t.cloneNode(!0),t.removeAttribute("userAgent"),
-t.removeAttribute("version"),t.removeAttribute("editor"),t.removeAttribute("type")):(t.setAttribute("userAgent",navigator.userAgent),t.setAttribute("version",EditorUi.VERSION),t.setAttribute("editor","www.draw.io"),a=null!=h?h.getMode():this.mode,null!=a&&t.setAttribute("type",a));a=mxUtils.getXml(t);if(!g&&!e&&(k||null!=h&&/(\.html)$/i.test(h.getTitle())))a=this.getHtml2(mxUtils.getXml(t),b,null!=h?h.getTitle():null,c,f);else if(g||!e&&null!=h&&/(\.svg)$/i.test(h.getTitle()))null==h||h.getMode()!=
-App.MODE_DEVICE&&h.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,w,m,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=
-this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,h,d,e,g,k,w,m){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=g?g:!1);m=null!=m?m:this.getCurrentFile();
-g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var 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(k,g,m,window.location.href,a,b,h,d,e,w);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);
-return a};EditorUi.prototype.getHtml=function(a,b,h,d,e,g){g=null!=g?g:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),t=b.view.scale;g=Math.floor(c.x/t-b.view.translate.x);t=Math.floor(c.y/t-b.view.translate.y);c=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",t)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==e?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</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!=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;">'+d+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+f+'">\x3c/script>':
-'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,h,e,d){null!=d&&(d=d.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
-this.currentPage));return(null==d?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=d?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==d?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=d?'<meta http-equiv="refresh" content="0;URL=\''+d+"'\"/>\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==d?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+d+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?
+!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(u){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var h=c.indexOf("&lt;mxfile ");if(0<=h){var d=c.lastIndexOf("&lt;/mxfile&gt;");d>h&&(b=c.substring(h,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var p=mxUtils.parseXml(c),e=this.editor.extractGraphModel(p.documentElement,
+null!=this.pages),b=null!=e?mxUtils.getXml(e):""}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))}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 p=d.length-1;0<=p;p--){var e=this.updatePageRoot(new DiagramPage(d[p]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[p+1]));c.model.execute(new ChangePage(this,e,0==p?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])),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(p=0;p<b.length;p++)c.model.execute(new ChangePage(this,b[p],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(a,b,h,d,p,e,g,w,k,l){b=null!=b?b:this.editor.graph;p=null!=p?p:!1;k=null!=k?k:!0;var c,f=null;null==h||h.getMode()==App.MODE_DEVICE||h.getMode()==App.MODE_BROWSER?c="_blank":f=c=d;if(null==a)return"";var u=a;if("mxfile"!=u.nodeName.toLowerCase()){var t=b.zapGremlins(mxUtils.getXml(a)),u=b.compress(t);if(b.decompress(u)!=t)return t;t=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(t,u);u=a.ownerDocument.createElement("mxfile");u.appendChild(t)}l?(u=u.cloneNode(!0),u.removeAttribute("userAgent"),
+u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.setAttribute("userAgent",navigator.userAgent),u.setAttribute("version",EditorUi.VERSION),u.setAttribute("editor","www.draw.io"),a=null!=h?h.getMode():this.mode,null!=a&&u.setAttribute("type",a));a=mxUtils.getXml(u);if(!e&&!p&&(g||null!=h&&/(\.html)$/i.test(h.getTitle())))a=this.getHtml2(mxUtils.getXml(u),b,null!=h?h.getTitle():null,c,f);else if(e||!p&&null!=h&&/(\.svg)$/i.test(h.getTitle()))null==h||h.getMode()!=
+App.MODE_DEVICE&&h.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,w,k,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=
+this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,h,d,p,e,g,w,k){p=null!=p?p:!0;g=null!=g?g:this.getXmlFileData(p,null!=e?e:!1);k=null!=k?k:this.getCurrentFile();
+e=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){e=this.createTemporaryGraph(e.getStylesheet());var c=e.getGlobalVariable,f=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(f.root)}a=this.createFileData(g,e,k,window.location.href,a,b,h,d,p,w);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);
+return a};EditorUi.prototype.getHtml=function(a,b,h,d,p,e){e=null!=e?e:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=e?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;e=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==p&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",e);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=p&&(p=p.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==p?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+f+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,h,d,p){null!=p&&(p=p.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==p?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,h,d,e,g){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var t='<?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(f,a,t,"text/xml")}else if("html"==
-a)t=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,t,"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 h=this.createDownloadRequest(c,a,d,b);this.editor.graph.pageVisible=f;return h}catch(z){this.handleError(z)}}));else{var l=null,q=
-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(l)}))});if("svg"==a){var u=this.editor.graph.background;u==mxConstants.NONE&&(u=null);var k=this.editor.graph.getSvg(u,null,null,null,null,d);h&&this.editor.graph.addSvgShadow(k);this.convertImages(k,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();q('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a))})))}else f=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();q(a)}),d)}}catch(A){this.handleError(A)}};EditorUi.prototype.createDownloadRequest=function(a,b,h,d){var c=this.editor.graph.getGraphBounds();h=this.getFileData(!0,null,null,null,h,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||h.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var e=
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,h,d,p,e){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,p));this.saveData(f,a,g,"text/xml")}else if("html"==
+a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=e&&(this.editor.graph.pageVisible=e);var h=this.createDownloadRequest(c,a,d,b);this.editor.graph.pageVisible=f;return h}catch(z){this.handleError(z)}}));else{var l=null,u=
+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(l)}))});if("svg"==a){var t=this.editor.graph.background;t==mxConstants.NONE&&(t=null);var k=this.editor.graph.getSvg(t,null,null,null,null,d);h&&this.editor.graph.addSvgShadow(k);this.convertImages(k,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 f=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(A){this.handleError(A)}};EditorUi.prototype.createDownloadRequest=function(a,b,h,d){var c=this.editor.graph.getGraphBounds();h=this.getFileData(!0,null,null,null,h,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||h.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var e=
0;e<this.pages.length;e++)if(this.pages[e]==this.currentPage){f="&from="+e;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+c+"&xml="+encodeURIComponent(h)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});
if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||
this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),
-title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){null!=window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):
-"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(q){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=
-null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,h,d,e,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?
+title:a.getTitle(),mode:a.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(p){}}catch(p){null!=window.console&&console.log("error in fileLoaded:",a,p);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=p&&null!=p.message?":err:"+encodeURIComponent(p.message):
+"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(t){}this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=
+null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,h,d,p,e,g){};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=
+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,h){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,d=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign=
"center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f);else for(var h=0;h<b.length;h++){var l=b[h],d=l.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(e+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,l.w,l.h,"",l.title||"",!1,!1,!0))}else null!=l.xml&&(d=this.stringToCells(this.editor.graph.decompress(l.xml)),
0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,l.w,l.h,l.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var e=0;e<b.length;e++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",
a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[e]);h=null!=h&&0<h.length?h:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),h,!0,mxUtils.bind(this,function(a){d(b,a)}));this.repositionLibrary(c);var k=g.parentNode.previousSibling;h=k.getAttribute("title");null!=h&&0<h.length&&".scratchpad"!=
a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+h);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");k.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("valign","absmiddle");v.setAttribute("border","0");
-v.style.margin="0 3px";var m=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,p=null,C=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!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=v.cloneNode(!1),p.setAttribute("src",Editor.spinImage),p.setAttribute("title",mxResources.get("saving")),p.style.cursor="default",p.style.marginRight="2px",p.style.marginTop="-2px",l.insertBefore(p,l.firstChild),k.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=p&&null!=
-p.parentNode&&(p.parentNode.removeChild(p),k.style.paddingRight=18*l.childNodes.length+"px")})):null==m&&(m=v.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),l.insertBefore(m,l.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||(k.style.paddingRight=18*l.childNodes.length+"px",m.parentNode.removeChild(m),
-m=null)});mxEvent.consume(c)})),k.style.paddingRight=18*l.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,h,l){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var d=0;d<a.length;d++){var e=n.getCellGeometry(a[d]);null!=e&&e.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,l||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=l&&(a.title=l);b.push(a);
-F(h);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),z=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),c=n.view.getBounds(b),f=n.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=n.view.translate.x;c.y-=n.view.translate.y;G(b,c)}mxEvent.consume(a)});
-g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility=
-"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,z(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility=
-"visible",g.style.border="3px solid transparent",g.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";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.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,h,l,e,t,q,k,u,v){if(null!=c&&"image/"==h.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),
-c=[new mxCell("",new mxGeometry(0,0,t,q),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,t,q),a,mxEvent.isAltDown(a)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var w=!1,m=mxUtils.bind(this,function(c,h){if(null!=c&&"text/xml"==h){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var e=JSON.parse(mxUtils.getTextContent(l.documentElement));d(e,g);b=b.concat(e);F(a);this.spinner.stop();
-w=!0}catch(U){}else if("mxfile"==l.documentElement.nodeName)try{for(var t=l.documentElement.getElementsByTagName("diagram"),l=0;l<t.length;l++){var e=mxUtils.getTextContent(t[l]),q=this.stringToCells(this.editor.graph.decompress(e)),k=this.editor.graph.getBoundingBoxFromGeometry(q);G(q,new mxRectangle(0,0,k.width,k.height),a)}w=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}w||(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!=k&&(/(\.vsdx)($|\?)/i.test(k)||/(\.vssx)($|\?)/i.test(k)||/(\.vsd)($|\?)/i.test(k))?this.importVisio(v,function(a){m(a,"text/xml")},null,k):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&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,h)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",IMAGE_PATH+"/edit.gif");v.setAttribute("title",mxResources.get("edit"));l.insertBefore(v,l.firstChild);mxEvent.addListener(v,
+v.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(v),mxEvent.addListener(v,"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 m=this.editor.graph,q=null,C=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!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=v.cloneNode(!1),q.setAttribute("src",Editor.spinImage),q.setAttribute("title",mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",l.insertBefore(q,l.firstChild),k.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=q&&null!=
+q.parentNode&&(q.parentNode.removeChild(q),k.style.paddingRight=18*l.childNodes.length+"px")})):null==n&&(n=v.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),l.insertBefore(n,l.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()||(k.style.paddingRight=18*l.childNodes.length+"px",n.parentNode.removeChild(n),
+n=null)});mxEvent.consume(c)})),k.style.paddingRight=18*l.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,h,l){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var d=0;d<a.length;d++){var e=m.getCellGeometry(a[d]);null!=e&&e.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,l||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=l&&(a.title=l);b.push(a);
+F(h);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),z=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),f=m.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=m.view.translate.x;c.y-=m.view.translate.y;G(b,c)}mxEvent.consume(a)});
+g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,z(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility=
+"visible",g.style.border="3px solid transparent",g.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";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.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,h,l,e,p,u,t,k,v){if(null!=c&&"image/"==h.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),
+c=[new mxCell("",new mxGeometry(0,0,p,u),c)],c[0].vertex=!0,G(c,new mxRectangle(0,0,p,u),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 w=!1,n=mxUtils.bind(this,function(c,h){if(null!=c&&"text/xml"==h){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var e=JSON.parse(mxUtils.getTextContent(l.documentElement));d(e,g);b=b.concat(e);F(a);this.spinner.stop();
+w=!0}catch(U){}else if("mxfile"==l.documentElement.nodeName)try{for(var p=l.documentElement.getElementsByTagName("diagram"),l=0;l<p.length;l++){var e=mxUtils.getTextContent(p[l]),u=this.stringToCells(this.editor.graph.decompress(e)),t=this.editor.graph.getBoundingBoxFromGeometry(u);G(u,new mxRectangle(0,0,t.width,t.height),a)}w=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}w||(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!=t&&(/(\.vsdx)($|\?)/i.test(t)||/(\.vssx)($|\?)/i.test(t)||/(\.vsd)($|\?)/i.test(t))?this.importVisio(v,function(a){n(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?n(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):n(c,h)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",IMAGE_PATH+"/edit.gif");v.setAttribute("title",mxResources.get("edit"));l.insertBefore(v,l.firstChild);mxEvent.addListener(v,
"click",C);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&C(a)});h=v.cloneNode(!1);h.setAttribute("src",Editor.plusImage);h.setAttribute("title",mxResources.get("add"));l.insertBefore(h,l.firstChild);mxEvent.addListener(h,"click",z);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(h=document.createElement("span"),h.setAttribute("title",mxResources.get("help")),h.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(h,
"?"),mxEvent.addGestureListeners(h,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),l.insertBefore(h,l.firstChild))}k.appendChild(l);k.style.paddingRight=18*l.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=
function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
@@ -7176,118 +7176,118 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,h){var c=null!=this.spinner&&null!=
this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok"),e=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(d=mxResources.get("cancel"),e=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));
else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=
-mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,d,h,e)}else null!=h&&h()};EditorUi.prototype.showError=function(a,b,h,d,e,g,k,w,m,l,v){a=new ErrorDialog(this,a,b,h,d,e,g,k,null,w,m);this.showDialog(a.container,l||340,v||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
+mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,d,h,e)}else null!=h&&h()};EditorUi.prototype.showError=function(a,b,h,d,e,g,k,w,n,l,v){a=new ErrorDialog(this,a,b,h,d,e,g,k,null,w,n);this.showDialog(a.container,l||340,v||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,
b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,h,d,e){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=h&&h()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,h){var c=a.toDataURL("image/"+h);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+h))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
return c};EditorUi.prototype.saveCanvas=function(a,b,h){var c="jpeg"==h?"jpg":h,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,h);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+h,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
EditorUi.prototype.doSaveLocalFile=function(a,b,h,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,h):new Blob([a],{type:h}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)h=window.open("about:blank","_blank"),null==h?mxUtils.popup(a,!0):(h.document.write(a),h.document.close(),h.document.execCommand("SaveAs",!0,b),h.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height=
-"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(d?this.base64ToBlob(a,h):new Blob([a],{type:h}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},
+"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var p=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(p?parseInt(p[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(d?this.base64ToBlob(a,h):new Blob([a],{type:h}));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(y){}}else this.createEchoRequest(a,b,h,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,h,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=h?"&mime="+h:"")+(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),f=c.length,d=Math.ceil(f/1024),e=Array(d),
-g=0;g<d;++g){for(var k=1024*g,m=Math.min(k+1024,f),l=Array(m-k),v=0;k<m;++v,++k)l[v]=c[k].charCodeAt(0);e[g]=new Uint8Array(l)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,h,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,c){try{if("_blank"==c)if(null==h||"image/"!=h.substring(0,6)||"image/svg"==h.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");
+g=0;g<d;++g){for(var k=1024*g,n=Math.min(k+1024,f),l=Array(n-k),v=0;k<n;++v,++k)l[v]=c[k].charCodeAt(0);e[g]=new Uint8Array(l)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,h,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,c){try{if("_blank"==c)if(null==h||"image/"!=h.substring(0,6)||"image/svg"==h.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,h,d);else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,h,d):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(a,b,h,d,c,f)}catch(H){this.handleError(H)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<e,4<e?3:4,a,h,d);this.showDialog(b.container,
420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,h){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(h?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(h?";base64,"+a:
-";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);
+";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);
else{this.exportDialog=document.createElement("div");var f=b.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=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var h=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});h.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){h.stop();
this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+
-1),"image/png",!0);c.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",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,h,d,e){this.isLocalFileSave()?this.saveLocalFile(h,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
+1),"image/png",!0);c.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",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,h,d,e){this.isLocalFileSave()?this.saveLocalFile(h,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
c){return this.createEchoRequest(h,a,d,e,b,c)}),h,e,d)};EditorUi.prototype.saveRequest=function(a,b,h,d,e,g,k){k=null!=k?k:!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=h("_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(h){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,c,h)}catch(E){this.handleError(E)}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,h)}catch(E){this.handleError(E)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<c,4<c?3:4,d,g,e);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,h,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,h){b(null)};EditorUi.prototype.exportSvg=function(a,b,h,d,e,g,k,m,n){if(this.spinner.spin(document.body,
-mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();h=null!=h?h: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,k,m,null,h);d&&this.editor.graph.addSvgShadow(f);var t=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,h,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 c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(c)}))});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.addCheckbox=function(a,b,h,d,e,g){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");h&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);d&&c.setAttribute("disabled",
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<c,4<c?3:4,d,g,e);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,h,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,h){b(null)};EditorUi.prototype.exportSvg=function(a,b,h,d,e,g,k,w,n){if(this.spinner.spin(document.body,
+mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();h=null!=h?h: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,k,w,null,h);d&&this.editor.graph.addSvgShadow(f);var p=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,h,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 c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,u,this.thumbImageCache)):u(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,h,d,e,g){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");h&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);d&&c.setAttribute("disabled",
"disabled");g&&(a.appendChild(c),h=document.createElement("span"),mxUtils.write(h,b),a.appendChild(h),e||mxUtils.br(a),mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(a))})));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var f=this.getCurrentFile(),d="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&
(d=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("makeCopy"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");e.appendChild(f);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==
e.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=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":d: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 f=document.createElement("select");f.style.width="100px";f.style.marginLeft=
"8px";f.style.marginRight="10px";f.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));f.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value",
"frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(d));a.appendChild(f);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 f.value},focus:function(){f.focus()}}};EditorUi.prototype.createLink=function(a,b,h,d,e,g,k,m){var c=this.getCurrentFile(),f=[];d&&(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!=e&&0<e.length&&f.push("edit="+encodeURIComponent(e)),g&&
-f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(h&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?h="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?h="#R"+encodeURIComponent(h?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(h="#"+c.getHash(),a=!1));
-a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+h};EditorUi.prototype.createHtml=function(a,b,h,d,e,g,k,m,n,l,v){this.getBasenames();var c={};""!=e&&e!=mxConstants.NONE&&(c.highlight=e);"auto"!==d&&(c.target=d);n||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;
-h=parseInt(h);isNaN(h)||100==h||(c.zoom=h/100);h=[];k&&(h.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(h.push("zoom"),c.resize=!0);m&&h.push("layers");0<h.length&&(n&&h.push("lightbox"),c.toolbar=h.join(" "));null!=l&&0<l.length&&(c.edit=l);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=h?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+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 f.value},focus:function(){f.focus()}}};EditorUi.prototype.createLink=function(a,b,h,d,e,g,k,n){var c=this.getCurrentFile(),f=[];d&&(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!=e&&0<e.length&&f.push("edit="+encodeURIComponent(e)),g&&
+f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(h&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?h="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),n||null==c||c.constructor!=window.DriveFile?h="#R"+encodeURIComponent(h?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(h="#"+c.getHash(),a=!1));
+a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+h};EditorUi.prototype.createHtml=function(a,b,h,d,e,g,k,n,m,l,v){this.getBasenames();var c={};""!=e&&e!=mxConstants.NONE&&(c.highlight=e);"auto"!==d&&(c.target=d);m||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;
+h=parseInt(h);isNaN(h)||100==h||(c.zoom=h/100);h=[];k&&(h.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(h.push("zoom"),c.resize=!0);n&&h.push("layers");0<h.length&&(m&&h.push("lightbox"),c.toolbar=h.join(" "));null!=l&&0<l.length&&(c.edit=l);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=h?"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":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,h,d){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 e=document.createElement("div");e.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value",
"copy");e.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));e.appendChild(k);mxUtils.br(e);e.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));e.appendChild(k);var l=this.getCurrentFile();null==h&&null!=l&&l.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")),
-e.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==h&&g.setAttribute("disabled","disabled");c.appendChild(e);var v=this.addLinkSection(c),m=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");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%";c.appendChild(u);var n=this.addCheckbox(c,mxResources.get("fit"),!0),e=null!=this.pages&&1<this.pages.length,p=p=this.addCheckbox(c,mxResources.get("allPages"),e,!e),F=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),z=this.addEditButton(c,G),D=z.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&G.checked?
-z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(g.checked?h:null,m.checked,u.value,v.getTarget(),v.getColor(),n.checked,p.checked,F.checked,G.checked,z.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,e,d,g,k){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 h=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var t=document.createElement("div");t.style.whiteSpace="normal";mxUtils.write(t,mxResources.get("linkAccountRequired"));l.appendChild(t);t=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));t.style.marginTop="12px";t.className="geBtn";l.appendChild(t);c.appendChild(l);t=document.createElement("a");t.style.paddingLeft="12px";t.style.color="gray";t.style.fontSize="11px";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("check"));
-l.appendChild(t);mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,m=null;if(null!=e||null!=d)a+=30,mxUtils.write(c,mxResources.get("width")+":"),q=document.createElement("input"),
-q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",c.appendChild(q),mxUtils.write(c,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",c.appendChild(m),mxUtils.br(c);var u=this.addLinkSection(c,k);e=null!=this.pages&&1<this.pages.length;var n=null;
-if(null==h||h.constructor!=window.DriveFile||b)n=this.addCheckbox(c,mxResources.get("allPages"),e,!e);var p=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,p),z=G.getEditInput(),D=this.addCheckbox(c,mxResources.get("layers"),!0);D.style.marginLeft=z.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(D.removeAttribute("disabled"),z.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),z.setAttribute("disabled",
-"disabled"));z.checked&&p.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){g(u.getTarget(),u.getColor(),null==n?!0:n.checked,p.checked,G.getLink(),D.checked,null!=q?q.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():
-document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,e,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0);null!=g&&(g.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(!h.checked,null!=g?g.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,e,d,g,k,m,w){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,h="jpeg"==w?196:300,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-c.appendChild(t);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 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";c.appendChild(u);mxUtils.br(c);var n=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=w),p=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.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");k&&(c.appendChild(x),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),
-h+=26,mxEvent.addListener(p,"change",function(){p.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var z=this.addCheckbox(c,mxResources.get("shadow"),f.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&&(c.appendChild(D),mxUtils.write(c,
-mxResources.get("embedImages")),mxUtils.br(c),h+=26);var M=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=w),B=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(c,B?mxResources.get("allPages"):"",B,!B,null,"jpeg"!=w);I.style.marginLeft="24px";I.style.marginBottom="16px";B||(I.style.visibility="hidden");mxEvent.addListener(M,"change",function(){M.checked&&B?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});m&&B||I.setAttribute("disabled",
-"disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;g(q.value,n.checked,!p.checked,z.checked,M.checked,D.checked,u.value,x.checked,!I.checked)}),null,e,d);this.showDialog(a.container,340,h,!0,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,e,d,g){var c=document.createElement("div");
-c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var t=this.addCheckbox(c,mxResources.get("fit"),!0),l=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&d,!d),k=this.addCheckbox(c,e),m=this.addCheckbox(c,mxResources.get("lightbox"),!0),u=this.addEditButton(c,m),n=u.getEditInput(),p=1<f.model.getChildCount(f.model.getRoot()),
-F=this.addCheckbox(c,mxResources.get("layers"),p,!p);F.style.marginLeft=n.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(p&&F.removeAttribute("disabled"),n.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"));n.checked&&m.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
-function(){a(t.checked,l.checked,k.checked,m.checked,u.getLink(),F.checked)}),null,mxResources.get("embed"),g);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,e,d,g,k,m,n){function c(b){var c=" ",h="";d&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var l="";e&&(l=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+b+'"'+l+(""!=h?' style="'+h+'"':"")+c+"/>")}var f=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");c(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
-null,!0,e?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";e&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+h+"&xml="+encodeURIComponent(b));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&299>=t.getStatus()?c("data:image/png;base64,"+t.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,e,d,g,k,m){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var t=f[h].getAttribute("href");null!=t&&"#"==t.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}d&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(e){var q=" ",u="";d&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");a&&(u+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=u?' style="'+u+'"':"")+q+"/>")}))}else u="",d&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),u+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=u&&c.setAttribute("style",u),m(mxUtils.getXml(c))};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,d,e){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 f=a.getElementsByTagName("diagram");if(0<
-f.length){var c=f[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=c&&(f=b.decompress(mxUtils.getTextContent(c)),null!=f&&0<f.length&&(a=mxUtils.parseXml(f).documentElement))}f=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=f}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,
-f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
-c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(l){null!=b&&b(l)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,d,e,g,k,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,k);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=g)this.convertImages(b,mxUtils.bind(this,function(a){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,g,k,m,n,p){p=null!=p?p:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,d,n):null,p)}catch(H){"Invalid image"==H.message?this.downloadFile(p):this.handleError(H)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,k,m)}catch(v){this.spinner.stop(),this.handleError(v)}}};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,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],h=1;h<c.length;h++){var l=
-c[h].indexOf(")");f.push('url("');f.push(e[b(c[h].substring(0,l))]);f.push('"'+c[h].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var k=1;k<c.length;k++){var m=c[k].indexOf(")"),n=null,l=c[k].indexOf("format(",m);0<l&&(n=b(c[k].substring(l+7,c[k].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))b=
-"application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.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){e[a]=b;d--;g()}),mxUtils.bind(this,
-function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[k].substring(0,m)),n)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,g,k,m,n,p,l,v,H,E,A){k=null!=k?k:!0;H=null!=H?H:this.editor.graph;E=null!=E?E:0;var c=p?null:H.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==p&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(H.getSvg(c,null,null,A,null,null!=m?m:!0),mxUtils.bind(this,function(f){var d=new Image;d.onload=mxUtils.bind(this,
-function(){try{var e=document.createElement("canvas"),h=parseInt(f.getAttribute("width")),l=parseInt(f.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=k?Math.min(1,Math.min(3*b/(4*l),b/h)):b/h);h=Math.ceil(n*h)+2*E;l=Math.ceil(n*l)+2*E;e.setAttribute("width",h);e.setAttribute("height",l);var t=e.getContext("2d");null!=c&&(t.beginPath(),t.rect(0,0,h,l),t.fillStyle=c,t.fill());t.scale(n,n);t.drawImage(d,E/n,E/n);a(e)}catch(L){null!=g&&g(L)}});d.onerror=function(a){null!=g&&g(a)};try{l&&this.editor.graph.addSvgShadow(f);
+e.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==h&&g.setAttribute("disabled","disabled");c.appendChild(e);var u=this.addLinkSection(c),n=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight=
+"12px";m.value="100%";c.appendChild(m);var q=this.addCheckbox(c,mxResources.get("fit"),!0),e=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(c,mxResources.get("allPages"),e,!e),F=this.addCheckbox(c,mxResources.get("layers"),!0),G=this.addCheckbox(c,mxResources.get("lightbox"),!0),z=this.addEditButton(c,G),D=z.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&G.checked?
+z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(g.checked?h:null,n.checked,m.value,u.getTarget(),u.getColor(),q.checked,C.checked,F.checked,G.checked,z.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,h,d,e,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 p=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=p&&p.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));l.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(p.getId())}));k.style.marginTop="12px";k.className="geBtn";l.appendChild(k);c.appendChild(l);k=document.createElement("a");k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));
+l.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var u=null,t=null;if(null!=h||null!=d)a+=30,mxUtils.write(c,mxResources.get("width")+":"),u=document.createElement("input"),
+u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",c.appendChild(u),mxUtils.write(c,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",c.appendChild(t),mxUtils.br(c);var n=this.addLinkSection(c,g);h=null!=this.pages&&1<this.pages.length;var m=null;
+if(null==p||p.constructor!=window.DriveFile||b)m=this.addCheckbox(c,mxResources.get("allPages"),h,!h);var q=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,q),z=G.getEditInput(),D=this.addCheckbox(c,mxResources.get("layers"),!0);D.style.marginLeft=z.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(D.removeAttribute("disabled"),z.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),z.setAttribute("disabled",
+"disabled"));z.checked&&q.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){e(n.getTarget(),n.getColor(),null==m?!0:m.checked,q.checked,G.getLink(),D.checked,null!=u?u.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():
+document.execCommand("selectAll",!1,null)):n.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,h,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var e=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=g&&(g.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){h(!e.checked,null!=g?g.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,h,d,e,g,k,n){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,p="jpeg"==n?196:300,u=document.createElement("h3");mxUtils.write(u,a);u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+c.appendChild(u);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||
+"0";c.appendChild(m);mxUtils.br(c);var w=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=n),q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.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&&(c.appendChild(x),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),
+p+=26,mxEvent.addListener(q,"change",function(){q.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var z=this.addCheckbox(c,mxResources.get("shadow"),f.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&&(c.appendChild(D),mxUtils.write(c,
+mxResources.get("embedImages")),mxUtils.br(c),p+=26);var M=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=n),B=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(c,B?mxResources.get("allPages"):"",B,!B,null,"jpeg"!=n);I.style.marginLeft="24px";I.style.marginBottom="16px";B||(I.style.visibility="hidden");mxEvent.addListener(M,"change",function(){M.checked&&B?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});k&&B||I.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=m.value;this.lastExportZoom=t.value;e(t.value,w.checked,!q.checked,z.checked,M.checked,D.checked,m.value,x.checked,!I.checked)}),null,h,d);this.showDialog(a.container,340,p,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,h,d,e){var c=document.createElement("div");
+c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var p=this.addCheckbox(c,mxResources.get("fit"),!0),l=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&d,!d),k=this.addCheckbox(c,h),u=this.addCheckbox(c,mxResources.get("lightbox"),!0),n=this.addEditButton(c,u),m=n.getEditInput(),q=1<f.model.getChildCount(f.model.getRoot()),
+F=this.addCheckbox(c,mxResources.get("layers"),q,!q);F.style.marginLeft=m.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(q&&F.removeAttribute("disabled"),m.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"));m.checked&&u.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
+function(){a(p.checked,l.checked,k.checked,u.checked,n.getLink(),F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,h,d,e,g,k,n){function c(b){var c=" ",l="";d&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var p="";h&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+b+'"'+p+(""!=l?' style="'+l+'"':"")+c+"/>")}var f=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");c(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
+null,!0,h?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";h&&(p="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var u=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));u.send(mxUtils.bind(this,function(){200<=u.getStatus()&&299>=u.getStatus()?c("data:image/png;base64,"+u.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,g,k,n){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var p=f[h].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var u=" ",t="";e&&(u="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){n('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+u+"/>")}))}else t="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=t&&c.setAttribute("style",t),n(mxUtils.getXml(c))};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,h,d){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 f=a.getElementsByTagName("diagram");if(0<
+f.length){var c=f[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=c&&(f=b.decompress(mxUtils.getTextContent(c)),null!=f&&0<f.length&&(a=mxUtils.parseXml(f).documentElement))}f=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=f}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,
+f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),h=c.getGlobalVariable,e=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?e.getName():"pagenumber"==a?1:h.apply(this,arguments)};document.body.appendChild(c.container);
+c.model.setRoot(e.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var h=d.toDataURL("image/png"),h=this.writeGraphModelToPng(h,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(h.substring(h.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(l){null!=b&&b(l)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,d,e,g,k,n){n=b.background;n==mxConstants.NONE&&(n=null);b=b.getSvg(n,null,null,null,null,k);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=g)this.convertImages(b,mxUtils.bind(this,function(a){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,g,k,n,m,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,d,m):null,q)}catch(H){"Invalid image"==H.message?this.downloadFile(q):this.handleError(H)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,k,n)}catch(v){this.spinner.stop(),this.handleError(v)}}};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,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],h=1;h<c.length;h++){var l=
+c[h].indexOf(")");f.push('url("');f.push(e[b(c[h].substring(0,l))]);f.push('"'+c[h].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var k=1;k<c.length;k++){var n=c[k].indexOf(")"),m=null,l=c[k].indexOf("format(",n);0<l&&(m=b(c[k].substring(l+7,c[k].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))b=
+"application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;g()}),mxUtils.bind(this,
+function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[k].substring(0,n)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,g,k,n,m,q,l,v,H,E,A){k=null!=k?k:!0;H=null!=H?H:this.editor.graph;E=null!=E?E:0;var c=q?null:H.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(H.getSvg(c,null,null,A,null,null!=n?n:!0),mxUtils.bind(this,function(f){var d=new Image;d.onload=mxUtils.bind(this,
+function(){try{var e=document.createElement("canvas"),h=parseInt(f.getAttribute("width")),l=parseInt(f.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=k?Math.min(1,Math.min(3*b/(4*l),b/h)):b/h);h=Math.ceil(m*h)+2*E;l=Math.ceil(m*l)+2*E;e.setAttribute("width",h);e.setAttribute("height",l);var p=e.getContext("2d");null!=c&&(p.beginPath(),p.rect(0,0,h,l),p.fillStyle=c,p.fill());p.scale(m,m);p.drawImage(d,E/m,E/m);a(e)}catch(L){null!=g&&g(L)}});d.onerror=function(a){null!=g&&g(a)};try{l&&this.editor.graph.addSvgShadow(f);
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;f.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(H,f,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(f))}))});this.loadFonts(e)}catch(D){null!=g&&g(D)}}),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.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,h){for(var g=a.getElementsByTagName(d),l=0;l<g.length;l++)mxUtils.bind(this,function(d){var l=e.convert(d.getAttribute(h));if(null!=l&&"data:"!=l.substring(0,5)){var g=f[l];null==g?(c++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,d.setAttribute(h,e));c--;0==c&&b(a)})):d.setAttribute(h,g)}else null!=l&&d.setAttribute(h,l)})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,g,k){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||
/(\.gif)($|\?)/i.test(a);g=null!=g?g:!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("")}k=null!=k?k:"data:image/png;base64,";f=k+this.base64Encode(f)}b(f)}}else null!=
d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){g&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(y){null!=d&&d(y)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,
23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,f=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),
-d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);try{b(a.toDataURL())}catch(x){b(f.svgBrokenImage.src)}};c.onerror=function(){b(f.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,g){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),k=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var l=k.getElementsByTagName("diagram");
-if(1==l.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){var t=this.updatePageRoot(new DiagramPage(l[a])),m=this.pages.length;null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,t,t,m))}}finally{f.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(c=f.importGraphModel(k,b,d,e))}}catch(E){throw g||this.handleError(E,mxResources.get("invalidOrMissingFile")),
+d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);try{b(a.toDataURL())}catch(x){b(f.svgBrokenImage.src)}};c.onerror=function(){b(f.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,g){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),p=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var l=p.getElementsByTagName("diagram");
+if(1==l.length)p=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){var k=this.updatePageRoot(new DiagramPage(l[a])),n=this.pages.length;null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[n+1]));f.model.execute(new ChangePage(this,k,k,n))}}finally{f.model.endUpdate()}}}null!=p&&"mxGraphModel"===p.nodeName&&(c=f.importGraphModel(p,b,d,e))}}catch(E){throw g||this.handleError(E,mxResources.get("invalidOrMissingFile")),
E;}return c};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(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a);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)}catch(w){d(w)}else d({})});f.send(c)}else try{this.doImportVisio(a,b,d)}catch(w){d(w)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||
this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,d,e,g){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,g)}catch(x){this.handleError(x)}finally{null!=g&&g()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",
c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,g){g=JSON.parse(a);a=[];if(null!=g.state){g=JSON.parse(g.state);for(var c in g.Pages)a.push(g.Pages[c]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(g);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};
-EditorUi.prototype.insertTextAt=function(a,b,d,e,g,k,m){k=null!=k?k:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=
+EditorUi.prototype.insertTextAt=function(a,b,d,e,g,k,n){k=null!=k?k:!0;n=null!=n?n:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=
this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,d,k,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(f,b,d,k,!0),0<h.length)return h}catch(v){}this.loadImage(a,mxUtils.bind(this,
-function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),h=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,
+function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),n,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),h=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,
null,"",c.snap(b),c.snap(d),h,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));
if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,k);else{c=this.editor.graph;g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[g])),g.value=a,c.updateCellSize(g),/\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(g.value)&&
c.setLinkForCell(g,g.value),g.geometry.width+=c.gridSize,g.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,d,e,g,k,m,n,p,l,v){l=null!=l?l:!0;var c=!1,f=null,h=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,l);null!=n&&n(b)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,l),p=
-!0)),p||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),l&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,l);null!=n&&n(a)})):null!=
-p&&null!=m&&(/(\.vsdx)($|\?)/i.test(m)||/(\.vssx)($|\?)/i.test(m)||/(\.vsd)($|\?)/i.test(m))?(c=!0,this.importVisio(p,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=p?p:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=n&&n(null))}),m)):/(\.vsd)($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,l));c||null==n||n(f);
+function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,d,e,g,k,n,m,q,l,v){l=null!=l?l:!0;var c=!1,f=null,h=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,n)):b=this.importXml(a,d,e,l);null!=m&&m(b)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,l),q=
+!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),l&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,l);null!=m&&m(a)})):null!=
+q&&null!=n&&(/(\.vsdx)($|\?)/i.test(n)||/(\.vssx)($|\?)/i.test(n)||/(\.vsd)($|\?)/i.test(n))?(c=!0,this.importVisio(q,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,n)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=m&&m(null))}),n)):/(\.vsd)($|\?)/i.test(n)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,l));c||null==m||m(f);
return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}g=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};
-EditorUi.prototype.importFiles=function(a,b,d,e,g,k,m,n,p,l,v,H){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;l=null!=l?l:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var t=v||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>t){h=!0;break}var u=mxUtils.bind(this,function(){var h=this.editor.graph,t=h.gridSize;g=null!=g?g:mxUtils.bind(this,function(a,b,f,d,e,h,l,g,k){return null!=a&&"<mxlibrary"==a.substring(0,
-10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,f,d,e,h,l,g,k,c,H)});k=null!=k?k:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,p=q,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--p){this.spinner.stop();if(null!=n)n(u);else{var c=[];h.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var d=u[f]();null!=d&&(c=c.concat(d))}}finally{h.getModel().endUpdate()}}k(c)}}),
-x=0;x<q;x++)mxUtils.bind(this,function(c){var k=a[c],q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,n=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(n+1)))),u=mxUtils.parseXml(p),p=u.getElementsByTagName("svg");if(0<p.length){var p=p[0],D=H?null:p.getAttribute("content");null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));
-null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null==D||"<mxfile "!==D.substring(0,8)&&"<mxGraphModel "!==D.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(q.substring(0,n+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var l=a[0],m=parseFloat(l.getAttribute("width")),v=parseFloat(l.getAttribute("height")),p=l.getAttribute("viewBox");if(null==p||0==p.length)l.setAttribute("viewBox","0 0 "+m+" "+v);else if(isNaN(m)||isNaN(v)){var w=p.split(" ");3<w.length&&(m=parseFloat(w[2]),
-v=parseFloat(w[3]))}q=this.createSvgDataUri(mxUtils.getXml(l));var D=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,v)),B=g(q,k.type,b+c*t,d+c*t,Math.max(1,Math.round(m*D)),Math.max(1,Math.round(v*D)),k.name,f);if(isNaN(m)||isNaN(v)){var x=new Image;x.onload=mxUtils.bind(this,function(){m=Math.max(1,x.width);v=Math.max(1,x.height);B[0].geometry.width=m;B[0].geometry.height=v;l.setAttribute("viewBox","0 0 "+m+" "+v);q=this.createSvgDataUri(mxUtils.getXml(l));var a=q.indexOf(";");0<a&&(q=q.substring(0,
-a)+q.substring(q.indexOf(",",a+1)));h.setCellStyles("image",q,[B[0]])});x.src=this.createSvgDataUri(mxUtils.getXml(l))}return B}}}catch(ka){}return null})):w(c,mxUtils.bind(this,function(){return g(D,"text/xml",b+c*t,d+c*t,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var B=H?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var x=new Image;x.src=a.target.result;w(c,mxUtils.bind(this,function(){return g(B,"text/xml",b+c*t,d+c*t,x.width,x.height,k.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?
-(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,m,q){w(c,mxUtils.bind(this,function(){if(null!=h&&h.length<l){var n=f&&this.isResampleImage(a.target.result,v)?Math.min(1,
-Math.min(e/m,e/q)):1;return g(h,k.type,b+c*t,d+c*t,Math.round(m*n),Math.round(q*n),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else g(a.target.result,k.type,b+c*t,d+c*t,240,160,k.name,function(a){w(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)||/(\.vsd)($|\?)/i.test(k.name)?g(null,k.type,b+c*t,d+c*t,240,160,
-k.name,function(a){w(c,function(){return a})},k):"image"==k.type.substring(0,5)?q.readAsDataURL(k):q.readAsText(k)})(x)});h?this.confirmImageResize(function(a){f=a;u()},p):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(f,d){if(f||b)mxSettings.setResizeImages(f?d:null),mxSettings.save();c();a(d)};null==f||
+EditorUi.prototype.importFiles=function(a,b,d,e,g,k,n,m,q,l,v,H){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;l=null!=l?l:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=v||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>p){h=!0;break}var t=mxUtils.bind(this,function(){var h=this.editor.graph,p=h.gridSize;g=null!=g?g:mxUtils.bind(this,function(a,b,f,d,e,h,l,g,k){return null!=a&&"<mxlibrary"==a.substring(0,
+10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,f,d,e,h,l,g,k,c,H)});k=null!=k?k:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var u=a.length,t=u,q=[],w=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--t){this.spinner.stop();if(null!=m)m(q);else{var c=[];h.getModel().beginUpdate();try{for(var f=0;f<q.length;f++){var d=q[f]();null!=d&&(c=c.concat(d))}}finally{h.getModel().endUpdate()}}k(c)}}),
+x=0;x<u;x++)mxUtils.bind(this,function(c){var k=a[c],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==n||n(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var m=a.target.result,u=m.indexOf(","),t=decodeURIComponent(escape(atob(m.substring(u+1)))),q=mxUtils.parseXml(t),t=q.getElementsByTagName("svg");if(0<t.length){var t=t[0],D=H?null:t.getAttribute("content");null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));
+null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null==D||"<mxfile "!==D.substring(0,8)&&"<mxGraphModel "!==D.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(m.substring(0,u+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var l=a[0],n=parseFloat(l.getAttribute("width")),t=parseFloat(l.getAttribute("height")),v=l.getAttribute("viewBox");if(null==v||0==v.length)l.setAttribute("viewBox","0 0 "+n+" "+t);else if(isNaN(n)||isNaN(t)){var w=v.split(" ");3<w.length&&(n=parseFloat(w[2]),
+t=parseFloat(w[3]))}m=this.createSvgDataUri(mxUtils.getXml(l));var D=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,t)),B=g(m,k.type,b+c*p,d+c*p,Math.max(1,Math.round(n*D)),Math.max(1,Math.round(t*D)),k.name,f);if(isNaN(n)||isNaN(t)){var x=new Image;x.onload=mxUtils.bind(this,function(){n=Math.max(1,x.width);t=Math.max(1,x.height);B[0].geometry.width=n;B[0].geometry.height=t;l.setAttribute("viewBox","0 0 "+n+" "+t);m=this.createSvgDataUri(mxUtils.getXml(l));var a=m.indexOf(";");0<a&&(m=m.substring(0,
+a)+m.substring(m.indexOf(",",a+1)));h.setCellStyles("image",m,[B[0]])});x.src=this.createSvgDataUri(mxUtils.getXml(l))}return B}}}catch(ka){}return null})):w(c,mxUtils.bind(this,function(){return g(D,"text/xml",b+c*p,d+c*p,0,0,k.name)}))}}else{t=!1;if("image/png"==k.type){var B=H?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var x=new Image;x.src=a.target.result;w(c,mxUtils.bind(this,function(){return g(B,"text/xml",b+c*p,d+c*p,x.width,x.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?
+(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,n,m){w(c,mxUtils.bind(this,function(){if(null!=h&&h.length<l){var t=f&&this.isResampleImage(a.target.result,v)?Math.min(1,
+Math.min(e/n,e/m)):1;return g(h,k.type,b+c*p,d+c*p,Math.round(n*t),Math.round(m*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else g(a.target.result,k.type,b+c*p,d+c*p,240,160,k.name,function(a){w(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name)||/(\.vsd)($|\?)/i.test(k.name)?g(null,k.type,b+c*p,d+c*p,240,160,
+k.name,function(a){w(c,function(){return a})},k):"image"==k.type.substring(0,5)?m.readAsDataURL(k):m.readAsText(k)})(x)});h?this.confirmImageResize(function(a){f=a;t()},q):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(f,d){if(f||b)mxSettings.setResizeImages(f?d:null),mxSettings.save();c();a(d)};null==f||
b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,f)};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,g,k){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var h=Math.max(c/g,f/g);if(1<h){var l=Math.round(c/h),m=Math.round(f/h),t=document.createElement("canvas");
-t.width=l;t.height=m;t.getContext("2d").drawImage(a,0,0,l,m);var q=t.toDataURL();if(q.length<b.length){var n=document.createElement("canvas");n.width=l;n.height=m;var p=n.toDataURL();q!==p&&(b=q,c=l,f=m)}}}catch(F){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var b=e,g=0;8>g;g++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[e]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
+"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,g,k){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var h=Math.max(c/g,f/g);if(1<h){var l=Math.round(c/h),p=Math.round(f/h),n=document.createElement("canvas");
+n.width=l;n.height=p;n.getContext("2d").drawImage(a,0,0,l,p);var m=n.toDataURL();if(m.length<b.length){var t=document.createElement("canvas");t.width=l;t.height=p;var u=t.toDataURL();m!==u&&(b=m,c=l,f=p)}}}catch(F){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var b=d,g=0;8>g;g++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[d]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=
function(a,b,d,e,g){function c(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);g=a.substring(0,
k);do{var l=f(a);if("IDAT"==c(a,4)){g=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);g+=h(d.length)+b+d+h(e^4294967295);g+=a.substring(k-8,a.length);break}g+=a.substring(k-8,k-4+l);c(a,l);c(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&
-!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(t){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
+!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(p){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph;d.addListener("pageLinkClicked",function(b,
c){a(c.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,
arguments)};var g=d.addClickHandler;d.addClickHandler=function(b,c,f){var e=c;c=function(b,c){if(null==c){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(c=f.getAttribute("href"))}null==c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=e&&e(b,c)};g.call(this,b,c,f)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,
-360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:m.apply(this,arguments)};var n=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var l=c.indexOf(",");0<l&&(l=b.getPageById(c.substring(l+1)),f=null!=
-l?l.getName():mxResources.get("pageNotFound"))}l=n.call(this,c,f);e&&mxEvent.addListener(l,"click",function(b){a(c);mxEvent.consume(b)});return l};var p=d.labelLinkClicked;d.labelLinkClicked=function(b,c,f){var e=c.getAttribute("href");if(null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))p.apply(this,arguments);else{if(!d.isEnabled()||null!=b&&d.isCellLocked(b.cell))a(e),d.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
+360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var n=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:n.apply(this,arguments)};var m=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var l=c.indexOf(",");0<l&&(l=b.getPageById(c.substring(l+1)),f=null!=
+l?l.getName():mxResources.get("pageNotFound"))}l=m.call(this,c,f);e&&mxEvent.addListener(l,"click",function(b){a(c);mxEvent.consume(b)});return l};var q=d.labelLinkClicked;d.labelLinkClicked=function(b,c,f){var e=c.getAttribute("href");if(null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))q.apply(this,arguments);else{if(!d.isEnabled()||null!=b&&d.isCellLocked(b.cell))a(e),d.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,
c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable){var l=function(){window.setTimeout(function(){v.innerHTML="&nbsp;";v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);
this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.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 l=e[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,l){b.insertImage(a,e,l)},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([l.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace=
@@ -7304,8 +7304,8 @@ typeof mxRuler){y=document.createElement("div");y.style.position="absolute";y.st
this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var F=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:F.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),
G=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(a){null!=G&&(G.parentNode.removeChild(G),G=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
c=d.view.translate,f=d.view.scale,e=b.x/f-c.x,l=b.y/f-c.y;mxEvent.isAltDown(a)&&(l=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,l,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,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,e,l,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var k=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(h=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(h=b[0].getAttribute("href")));var m=!0,t=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(h,e,l,!0,k,null,m))});k&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){m=
-a;t()},mxEvent.isControlDown(a)):t()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,null,"",e,l,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(g,
+"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var k=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(h=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(h=b[0].getAttribute("href")));var p=!0,n=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(h,e,l,!0,k,null,p))});k&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){p=
+a;n()},mxEvent.isControlDown(a)):n()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,null,"",e,l,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(g,
e,l,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,l,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};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.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
@@ -7320,14 +7320,14 @@ function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.
(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?"https://www.draw.io/":"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,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=
Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=
-function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,
-mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
-this.spinner.stop()}));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(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,
-function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),
-null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,
-a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),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=
+function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".xml");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".xml":f+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.vsdx)($|\?)/i.test(f)||/(\.vssx)($|\?)/i.test(f)||/(\.vsd)($|\?)/i.test(f))this.importVisio(a,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('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,f,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();
+this.spinner.stop()}));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(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}});c.onerror=mxUtils.bind(this,
+function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),
+null,f,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,
+a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),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")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,
function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=
this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,
@@ -7336,15 +7336,15 @@ a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64
l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var h=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);
this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==l.action){h=null;h="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):g(l.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),h,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{h.init()}catch(B){k.postMessage(JSON.stringify({event:"draft",error:B.toString(),message:l}),"*")}return}if("template"==
-l.action){this.spinner.stop();var h=1==l.enableRecent,m=1==l.enableSearch,h=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,h?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),
-"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==l.action)this.searchReadyCallback(l.list,l.errorMsg);else if("recentDocsList"==l.action)this.recentReadyCallback(l.list,
-l.errorMsg);else{if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
-l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var t=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,p=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.message=l;b.data=a;b.xml=encodeURIComponent(t);k.postMessage(JSON.stringify(b),"*")}),w=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(t))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);p(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),u=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(q.container);
-q.model.setRoot(D.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(t)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?p("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=
-l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),n.xml=mxUtils.getXml(h),n.data=this.getFileData(null,null,!0,null,null,null,h),n.format=l.format;else if("html"==l.format)t=this.editor.getGraphXml(),n.data=this.getHtml(t,this.editor.graph),n.xml=mxUtils.getXml(t),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;
-h==mxConstants.NONE&&(h=null);n.xml=this.getFileData(!0);n.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(h),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}h="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));n.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=
+l.action){this.spinner.stop();var h=1==l.enableRecent,n=1==l.enableSearch,h=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,h?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),
+"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==l.action)this.searchReadyCallback(l.list,l.errorMsg);else if("recentDocsList"==l.action)this.recentReadyCallback(l.list,
+l.errorMsg);else{if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var m=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
+l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var t=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.message=l;b.data=a;b.xml=encodeURIComponent(p);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var t=this.createTemporaryGraph(t.getStylesheet()),w=t.getGlobalVariable,D=this.pages[0];t.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(t.container);
+t.model.setRoot(D.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,t)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
+l.xml&&0<l.xml.length&&this.setFileData(l.xml);m=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),m.xml=mxUtils.getXml(h),m.data=this.getFileData(null,null,!0,null,null,null,h),m.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;
+h==mxConstants.NONE&&(h=null);m.xml=this.getFileData(!0);m.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(h),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(m),"*")}));return}h="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));m.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(m),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=
l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(h=document.createElement("span"),mxUtils.write(h,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
this.buttonContainer.appendChild(h),this.embedFilenameSpan=h),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}}l=g(l);c=!0;try{a(l,f)}catch(B){this.handleError(B)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var x=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=x();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=x();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",
@@ -7352,18 +7352,18 @@ b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImag
urlParams.ready||"ready";k.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,k="",m="auto",n="auto",l=null,p=null,H=40,E=40,A=0,C=this.editor.graph;
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,k="",n="auto",m="auto",l=null,q=null,H=40,E=40,A=0,C=this.editor.graph;
C.getGraphBounds();for(var F=function(){C.setSelectionCells(U);C.scrollCellToVisible(C.getSelectionCell())},G=C.getFreeInsertPoint(),z=G.x,D=G.y,G=D,M=null,B="auto",I=[],L=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var P=mxUtils.trim(a.substring(1,R)),O=mxUtils.trim(a.substring(R+1));"label"==P?M=C.sanitizeHtml(O):
-"style"==P?e=O:"identity"==P&&0<O.length&&"-"!=O?g=O:"namespace"==P&&0<O.length&&"-"!=O?k=O:"width"==P?m=O:"height"==P?n=O:"left"==P&&0<O.length?l=O:"top"==P&&0<O.length?p=O:"ignore"==P?V=O.split(","):"connect"==P?I.push(JSON.parse(O)):"link"==P?L=O:"padding"==P?A=parseFloat(O):"edgespacing"==P?H=parseFloat(O):"nodespacing"==P?E=parseFloat(O):"layout"==P&&(B=O)}}}var K=this.editor.csvToArray(b[T]);a=null;if(null!=g)for(var Q=0;Q<K.length;Q++)if(g==K[Q]){a=Q;break}null==M&&(M="%"+K[0]+"%");if(null!=
+"style"==P?e=O:"identity"==P&&0<O.length&&"-"!=O?g=O:"namespace"==P&&0<O.length&&"-"!=O?k=O:"width"==P?n=O:"height"==P?m=O:"left"==P&&0<O.length?l=O:"top"==P&&0<O.length?q=O:"ignore"==P?V=O.split(","):"connect"==P?I.push(JSON.parse(O)):"link"==P?L=O:"padding"==P?A=parseFloat(O):"edgespacing"==P?H=parseFloat(O):"nodespacing"==P?E=parseFloat(O):"layout"==P&&(B=O)}}}var K=this.editor.csvToArray(b[T]);a=null;if(null!=g)for(var Q=0;Q<K.length;Q++)if(g==K[Q]){a=Q;break}null==M&&(M="%"+K[0]+"%");if(null!=
I)for(var S=0;S<I.length;S++)null==d[I[S].to]&&(d[I[S].to]={});C.model.beginUpdate();try{for(Q=T+1;Q<b.length;Q++){var Y=this.editor.csvToArray(b[Q]);if(Y.length==K.length){var J=null,aa=null!=a?k+Y[a]:null;null!=aa&&(J=C.model.getCell(aa));null==J&&(J=new mxCell(M,new mxGeometry(z,G,0,0),e||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=aa);for(var N=0;N<Y.length;N++)C.setAttributeForCell(J,K[N],Y[N]);C.setAttributeForCell(J,"placeholders","1");J.style=C.replacePlaceholders(J,J.style);for(S=0;S<I.length;S++)d[I[S].to][J.getAttribute(I[S].to)]=
-J;null!=L&&"link"!=L&&(C.setLinkForCell(J,J.getAttribute(L)),C.setAttributeForCell(J,L,null));C.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var X=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=l&&null!=J.getAttribute(l)&&(J.geometry.x=z+parseFloat(J.getAttribute(l))),null!=p&&null!=J.getAttribute(p)&&(J.geometry.y=D+parseFloat(J.getAttribute(p))),"@"==m.charAt(0)&&null!=J.getAttribute(m.substring(1))?J.geometry.width=parseFloat(J.getAttribute(m.substring(1))):J.geometry.width=
-"auto"==m?X.width+A:parseFloat(m),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.height=parseFloat(J.getAttribute(n.substring(1))):J.geometry.height="auto"==n?X.height+A:parseFloat(n),G+=J.geometry.height+E);c.push(C.addCell(J))}}for(var Z=c.slice(),U=c.slice(),S=0;S<I.length;S++)for(var W=I[S],Q=0;Q<c.length;Q++){var J=c[Q],ha=J.getAttribute(W.from);if(null!=ha){C.setAttributeForCell(J,W.from,null);for(var ia=ha.split(","),N=0;N<ia.length;N++){var ba=d[W.to][ia[N]];null!=ba&&(M=
+J;null!=L&&"link"!=L&&(C.setLinkForCell(J,J.getAttribute(L)),C.setAttributeForCell(J,L,null));C.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var X=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=l&&null!=J.getAttribute(l)&&(J.geometry.x=z+parseFloat(J.getAttribute(l))),null!=q&&null!=J.getAttribute(q)&&(J.geometry.y=D+parseFloat(J.getAttribute(q))),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.width=parseFloat(J.getAttribute(n.substring(1))):J.geometry.width=
+"auto"==n?X.width+A:parseFloat(n),"@"==m.charAt(0)&&null!=J.getAttribute(m.substring(1))?J.geometry.height=parseFloat(J.getAttribute(m.substring(1))):J.geometry.height="auto"==m?X.height+A:parseFloat(m),G+=J.geometry.height+E);c.push(C.addCell(J))}}for(var Z=c.slice(),U=c.slice(),S=0;S<I.length;S++)for(var W=I[S],Q=0;Q<c.length;Q++){var J=c[Q],ha=J.getAttribute(W.from);if(null!=ha){C.setAttributeForCell(J,W.from,null);for(var ia=ha.split(","),N=0;N<ia.length;N++){var ba=d[W.to][ia[N]];null!=ba&&(M=
W.label,null!=W.fromlabel&&(M=(J.getAttribute(W.fromlabel)||"")+(M||"")),null!=W.tolabel&&(M=(M||"")+(ba.getAttribute(W.tolabel)||"")),U.push(C.insertEdge(null,null,M||"",W.invert?ba:J,W.invert?J:ba,W.style||C.createCurrentEdgeStyle())),mxUtils.remove(W.invert?J:ba,Z))}}}if(null!=V)for(Q=0;Q<c.length;Q++)for(J=c[Q],N=0;N<V.length;N++)C.setAttributeForCell(J,mxUtils.trim(V[N]),null);var da=new mxParallelEdgeLayout(C);da.spacing=H;var ja=function(){da.execute(C.getDefaultParent());for(var a=0;a<c.length;a++){var b=
-C.getCellGeometry(c[a]);b.x=Math.round(C.snap(b.x));b.y=Math.round(C.snap(b.y));"auto"==m&&(b.width=Math.round(C.snap(b.width)));"auto"==n&&(b.height=Math.round(C.snap(b.height)))}};if("circle"==B){var ea=new mxCircleLayout(C);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(C.getDefaultParent());ja()},!0,F);F=null}else if("horizontaltree"==B||"verticaltree"==B||"auto"==B&&U.length==
+C.getCellGeometry(c[a]);b.x=Math.round(C.snap(b.x));b.y=Math.round(C.snap(b.y));"auto"==n&&(b.width=Math.round(C.snap(b.width)));"auto"==m&&(b.height=Math.round(C.snap(b.height)))}};if("circle"==B){var ea=new mxCircleLayout(C);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(C.getDefaultParent());ja()},!0,F);F=null}else if("horizontaltree"==B||"verticaltree"==B||"auto"==B&&U.length==
2*c.length-1&&1==Z.length){C.view.validate();var fa=new mxCompactTreeLayout(C,"horizontaltree"==B);fa.levelDistance=E;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(C.getDefaultParent(),0<Z.length?Z[0]:null)},!0,F);F=null}else if("horizontalflow"==B||"verticalflow"==B||"auto"==B&&1==Z.length){C.view.validate();var ga=new mxHierarchicalLayout(C,"horizontalflow"==B?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=E;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(C.getDefaultParent(),
U);C.moveCells(U,z,D)},!0,F);F=null}else if("organic"==B||"auto"==B&&U.length>c.length){C.view.validate();var ca=new mxFastOrganicLayout(C);ca.forceConstant=3*E;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(C);da.spacing=H;this.executeLayout(function(){ca.execute(C.getDefaultParent());ja()},!0,F);F=null}this.hideDialog()}finally{C.model.endUpdate()}null!=F&&F()}}catch(ma){this.handleError(ma)}};
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,440,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&&
+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,440,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.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"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
@@ -7375,12 +7375,12 @@ this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.is
"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,g=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!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.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);
+EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("rename").setEnabled(null!=d&&d.isRenamable());this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());
-a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,g,k){var c=a.editor.graph;if("xml"==
-d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,g,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),l=Math.floor(h.width*g/c.view.scale),m=Math.floor(h.height*g/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+
-encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+k+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,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},
+a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,g,k){var c=a.editor.graph;if("xml"==
+d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,g,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),l=Math.floor(h.width*g/c.view.scale),n=Math.floor(h.height*g/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+
+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+n+"&border="+k+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=
a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins=
a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle},
@@ -7390,23 +7390,23 @@ mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSet
mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,
null==mxSettings.settings.currentEdgeStyle?mxSettings.settings.currentEdgeStyle=Graph.prototype.defaultEdgeStyle:10>=mxSettings.settings.version&&(mxSettings.settings.currentEdgeStyle.orthogonalLoop=1,mxSettings.settings.currentEdgeStyle.jettySize="auto"),null==mxSettings.settings.currentVertexStyle&&(mxSettings.settings.currentVertexStyle=Graph.prototype.defaultVertexStyle),null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=
mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};
-("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,d,e){EditorUi.call(this,a,d,null!=e?e:"1"==urlParams.lightbox||"min"==uiTheme);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,d,e){var b=null;try{b=window.open(a)}catch(n){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,e,d){EditorUi.call(this,a,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,d,e){var b=null;try{b=window.open(a)}catch(m){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(b){null!=window.console&&console.log("Plugin Error:",b,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
"import":"/plugins/import.js",replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js"};
-App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),e=0;e<d.length;e++){var b=mxUtils.trim(d[e]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",a))}return a};
+App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var b=mxUtils.trim(e[d]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",a))}return a};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
-App.main=function(a,d){var e=null;EditorUi.enableLogging&&(window.onerror=function(a,b,d,g,k){try{if(a!=e&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){e=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(x){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height",
-"0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var b=mxSettings.getPlugins(),g=urlParams.p;App.initPluginCallback();if(null!=g){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var m=g.split(";"),g=0;g<m.length;g++){var n=App.pluginRegistry[m[g]];null!=n?mxscript(k+n):null!=window.console&&console.log("Unknown plugin:",m[g])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
-null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;m=!0;for(g=0;g<b.length&&m;g++)"/"!=b[g].charAt(0)&&b[g].substring(0,k.length)!=k&&(m=!1);if(m||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",[b.join("\n")]).replace(/\\n/g,
-"\n")))for(g=0;g<b.length;g++)try{mxscript(b[g])}catch(p){}}}"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();
-mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=d?d():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
+App.main=function(a,e){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,e,g,k){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(x){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height",
+"0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var b=mxSettings.getPlugins(),g=urlParams.p;App.initPluginCallback();if(null!=g){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var n=g.split(";"),g=0;g<n.length;g++){var m=App.pluginRegistry[n[g]];null!=m?mxscript(k+m):null!=window.console&&console.log("Unknown plugin:",n[g])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
+null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;n=!0;for(g=0;g<b.length&&n;g++)"/"!=b[g].charAt(0)&&b[g].substring(0,k.length)!=k&&(n=!1);if(n||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",[b.join("\n")]).replace(/\\n/g,
+"\n")))for(g=0;g<b.length;g++)try{mxscript(b[g])}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();
+mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=
null;"function"===typeof window.OneDriveClient&&"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&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
@@ -7420,116 +7420,116 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
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.timeout=25E3;"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.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()}));
-if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var d=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=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var e=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
+if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){"undefined"!==
+typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();
this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==
-window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=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.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=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=b)});b()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();
null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",
IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),d=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=d){var e=d.lastIndexOf("@"),b=d;0<=e&&(b=d.substring(e+1),d=this.crc32(d.substring(0,e))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(d)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
-a.getStatus()&&299>=a.getStatus()){var d=a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,b)}}}catch(n){}}))}};
-App.prototype.handleLicense=function(a,d){var e=document.getElementById("geFooter"),b=null;if(null!=e&&null!=a)if(b=a.expiry,null!=a.footer)e.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var g=new Date(Date.parse(b)),k=Math.round((g-Date.now())/864E5);if(90>k){var m="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(d);e.style.height="100%";e.style.margin="0px";e.style.display=
-"";0>k?(this.footerHeight=80,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+m+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[d,g.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-m+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[d,g.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
+App.prototype.checkLicense=function(){var a=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var d=e.lastIndexOf("@"),b=e;0<=d&&(b=e.substring(d+1),e=this.crc32(e.substring(0,d))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(e)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
+a.getStatus()&&299>=a.getStatus()){var d=a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,b)}}}catch(m){}}))}};
+App.prototype.handleLicense=function(a,e){var d=document.getElementById("geFooter"),b=null;if(null!=d&&null!=a)if(b=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var g=new Date(Date.parse(b)),k=Math.round((g-Date.now())/864E5);if(90>k){var n="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(e);d.style.height="100%";d.style.margin="0px";d.style.display=
+"";0>k?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+n+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[e,g.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+n+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[e,g.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
-App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var e=0;e<d.length;e++)d[e].id==a.id&&d.splice(e,1);null!=d&&(d.unshift(a),d=d.slice(0,5),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(d){}return null}};
-App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(d){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
+App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var d=0;d<e.length;d++)e[d].id==a.id&&e.splice(d,1);null!=e&&(e.unshift(a),e=e.slice(0,5),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(e){}return null}};
+App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if((a.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],d,e=0;256>e;e++){d=e;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[e]=d}return a};
-App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var d=-1,e=0;e<a.length;e++)d=d>>>8^this.crcTable[(d^a.charCodeAt(e))&255];return(d^-1)>>>0};
-App.prototype.getThumbnail=function(a,d){var e=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),g=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(a)}),a,this.thumbImageCache,"#ffffff",function(){d()},null,null,null,null,null,null,b),e=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),n=b.getGraphBounds(),p=a/n.width,p=Math.min(1,Math.min(3*a/(4*n.height),p)),c=Math.floor(n.x),f=Math.floor(n.y);m.setAttribute("width",Math.ceil(p*(n.width+4)));m.setAttribute("height",Math.ceil(p*(n.height+4)));var h=m.getContext("2d");
-h.scale(p,p);h.translate(-c,-f);var u=b.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";h.save();h.fillStyle=u;h.fillRect(c,f,Math.ceil(n.width+4),Math.ceil(n.height+4));h.restore();var t=new mxJsCanvas(m),q=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var x=new mxImageExport;x.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())};x.drawText=function(a,
-b){};x.drawState(b.getView().getState(b.model.root),q);q.finish(mxUtils.bind(this,function(){x.drawState(b.getView().getState(b.model.root),t);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(m)}));e=!0}}catch(w){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return e};
+App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=e&&(a=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],e,d=0;256>d;d++){e=d;for(var b=0;8>b;b++)e=e&1?3988292384^e>>>1:e>>>1;a[d]=e}return a};
+App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var e=-1,d=0;d<a.length;d++)e=e>>>8^this.crcTable[(e^a.charCodeAt(d))&255];return(e^-1)>>>0};
+App.prototype.getThumbnail=function(a,e){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),g=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
+function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null,null,null,null,null,b),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),m=b.getGraphBounds(),q=a/m.width,q=Math.min(1,Math.min(3*a/(4*m.height),q)),c=Math.floor(m.x),f=Math.floor(m.y);n.setAttribute("width",Math.ceil(q*(m.width+4)));n.setAttribute("height",Math.ceil(q*(m.height+4)));var h=n.getContext("2d");
+h.scale(q,q);h.translate(-c,-f);var u=b.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";h.save();h.fillStyle=u;h.fillRect(c,f,Math.ceil(m.width+4),Math.ceil(m.height+4));h.restore();var p=new mxJsCanvas(n),t=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var x=new mxImageExport;x.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())};x.drawText=function(a,
+b){};x.drawState(b.getView().getState(b.model.root),t);t.finish(mxUtils.bind(this,function(){x.drawState(b.getView().getState(b.model.root),p);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(n)}));d=!0}}catch(w){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return d};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
-(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,e){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(e)if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+d+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),d=null!=b?b.getMode():null,d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
-[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):d==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
-App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var d=this.getCurrentFile(),e=null!=d?d.getMode():null;e==App.MODE_GOOGLE?null!=d.desc&&0<d.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+d.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):e==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):e==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):e==App.MODE_TRELLO?this.openLink("https://trello.com/"):
-e==App.MODE_GITHUB&&(null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a};
-App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var d=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,d){this.spinner.stop();null==b&&(b=urlParams.title,d=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,d))}))}}catch(e){}};
-App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(d){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
+(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+e+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),e=null!=b?b.getMode():null,e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
+[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
+App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?this.openLink("https://trello.com/"):
+d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a};
+App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var e=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,e){this.spinner.stop();null==b&&(b=urlParams.title,e=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,e))}))}}catch(d){}};
+App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(e){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(a){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
-App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
-mxResources.get("close"));a.innerHTML=mxResources.get("close");d.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(a))});document.body.appendChild(d);window.setTimeout(function(){d.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(d.style,"transition","all 2s ease");d.style.opacity="0";window.setTimeout(function(){null!=d.parentNode&&d.parentNode.removeChild(d)},2E3)},15E3)}};
-App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==b||this.loadFile(b,!0)}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
+mxResources.get("close"));a.innerHTML=mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.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 d=urlParams.create;null!=d?a(b[decodeURIComponent(d)]):(d=urlParams.data,null!=d?a(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(c){}if(d)this.spinner.spin(document.body,mxResources.get("loading"));else if(d=this.getDiagramId(),"0"!=urlParams.splash||null!=d&&0!=d.length)this.loadFile(this.getDiagramId());else{var e=this.getDraft(),p=null!=e?e.data:this.getFileData(),d=Editor.useLocalStorage;this.createFile(this.defaultFilename,
-p,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=d&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
+this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(c){}if(d)this.spinner.spin(document.body,mxResources.get("loading"));else if(d=this.getDiagramId(),"0"!=urlParams.splash||null!=d&&0!=d.length)this.loadFile(this.getDiagramId());else{var e=this.getDraft(),q=null!=e?e.data:this.getFileData(),d=Editor.useLocalStorage;this.createFile(this.defaultFilename,
+q,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var e=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=e&&0<e.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
"title"]))}),b=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 d=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,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?b(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),e)}))}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?
+null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?b(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}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 d=this.getServiceCount(!0,!0),e=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>d||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(null==this.mode||a){a=4==d?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();e()}),a);this.showDialog(b.container,3>a?260:300,4<=d?420:300,!0,!1);b.init()}else null==urlParams.create&&e()};
-App.prototype.addLanguageMenu=function(a,d){var e=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){e=document.createElement("div");e.setAttribute("title",mxResources.get("language"));e.className="geIcon geSprite geSprite-globe";e.style.position="absolute";e.style.cursor="pointer";e.style.bottom="20px";e.style.right="20px";if(d){e.style.direction="rtl";e.style.textAlign="right";e.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";
-b.style.fontSize="12px";b.style.margin="5px 24px 0 0";b.style.color="gray";mxUtils.write(b,mxResources.get("language"));e.appendChild(b)}mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxUtils.getOffset(e);
-b.popup(d.x,d.y+e.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(e)}return e};
+App.prototype.showSplash=function(a){var e=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>e||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(null==this.mode||a){a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),a);this.showDialog(b.container,3>a?260:300,4<=e?420:300,!0,!1);b.init()}else null==urlParams.create&&d()};
+App.prototype.addLanguageMenu=function(a,e){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";
+b.style.fontSize="12px";b.style.margin="5px 24px 0 0";b.style.color="gray";mxUtils.write(b,mxResources.get("language"));d.appendChild(b)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);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 e=mxUtils.getOffset(d);
+b.popup(e.x,e.y+d.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(d)}return d};
App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style=
gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children=
gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell");
-App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var d=this.getPeerForMode(a);if(null!=d)d.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var e=
-Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,g=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;g.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
+App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(a);if(null!=e)e.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){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,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,g=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;g.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&this.openFiles(k.files)}));k.click()}}};
-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 d=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!=d&&d.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&d.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var e=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,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=e;window.openFile=null})}else{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(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(b.files[a])}));b.click()}};
-App.prototype.saveLibrary=function(a,d,e,b,g,k,m){b=null!=b?b:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var n=this.createLibraryDataFromImages(d),p=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==e&&b==App.MODE_DEVICE&&(e=new LocalLibrary(this,n,a));if(null==e)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-n,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,n,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,d)}),p)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){e.setData(n);var c=mxUtils.bind(this,
-function(){e.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(e,d);null!=m&&m()}),p)});if(a!=e.getTitle()){var f=e.getHash();e.rename(a,mxUtils.bind(this,function(a){e.constructor!=LocalLibrary&&f!=e.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(e.getHash()));this.removeLibrarySidebar(f);c()}),p)}else c()}};
-App.prototype.saveFile=function(a){var d=this.getCurrentFile();if(null!=d){var e=mxUtils.bind(this,function(){this.removeDraft();d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==d.getTitle()||null==this.mode){var b=null!=d.getTitle()?d.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var m=4>=a?2:6<a?4:3,b=new CreateDialog(this,
-b,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,e)):"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))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
-/(\.html)$/i.test(a)),null,b,e,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,e))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,m);this.showDialog(b.container,460,a>m?390:270,!0,!0);b.init()}else this.save(d.getTitle(),e)}};
-EditorUi.prototype.loadTemplate=function(a,d,e){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){d(a)}):!this.isOffline()&&(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&&"<mxGraphModel"==a.responseText.substring(0,13)&&d(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),d(b))}),e,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,d,e,b,g,k,m,n){b=n?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var p=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){p();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(m=null!=this.stateArg?this.stateArg.folderId:m,this.drive.insertFile(a,d,m,mxUtils.bind(this,
-function(a){p();this.fileCreated(a,e,k,g)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,m):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c):
-b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,m):b==App.MODE_BROWSER?(p(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,e,k,g)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(p(),this.fileCreated(new LocalFile(this,
-d,a,null==b),e,k,g))}};
-App.prototype.fileCreated=function(a,d,e,b){var g=window.location.pathname;null!=d&&0<d.length&&(g+="?libs="+d);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,p=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(p=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(p.container),
-n=this.decodeNodeIntoGraph(n,p));a.setData(this.createFileData(k,p,a,m));null!=p&&p.container.parentNode.removeChild(p.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==e&&null!=f&&(e=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);e&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=d&&this.sidebar.showEntries(d)}),
-m=mxUtils.bind(this,function(){e||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==e||e?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=b&&b(),window.openWindow(g,null,m))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
+App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var e=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!=e&&e.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&e.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var 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,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(n){this.handleError(n,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})}else{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(q){this.handleError(q,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(b.files[a])}));b.click()}};
+App.prototype.saveLibrary=function(a,e,d,b,g,k,n){b=null!=b?b:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var m=this.createLibraryDataFromImages(e),q=mxUtils.bind(this,function(a){this.spinner.stop();null!=n&&n();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&b==App.MODE_DEVICE&&(d=new LocalLibrary(this,m,a));if(null==d)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+m,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,this.drive.libraryMimeType):b==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,e)}),q,c):b==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,e)}),q,c):b==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,e)}),q,c):b==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,e)}),q,c):b==App.MODE_BROWSER?(c=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,e)}),q)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(m);var c=mxUtils.bind(this,
+function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=n&&n()}),q)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(f);c()}),q)}else c()}};
+App.prototype.saveFile=function(a){var e=this.getCurrentFile();if(null!=e){var d=mxUtils.bind(this,function(){this.removeDraft();e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==e.getTitle()||null==this.mode){var b=null!=e.getTitle()?e.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var n=4>=a?2:6<a?4:3,b=new CreateDialog(this,
+b,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))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
+/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,n);this.showDialog(b.container,460,a>n?390:270,!0,!0);b.init()}else this.save(e.getTitle(),d)}};
+EditorUi.prototype.loadTemplate=function(a,e,d){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){e(a)}):!this.isOffline()&&(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&&"<mxGraphModel"==a.responseText.substring(0,13)&&e(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),e(b))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
+App.prototype.createFile=function(a,e,d,b,g,k,n,m){b=m?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var q=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){q();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(n=null!=this.stateArg?this.stateArg.folderId:n,this.drive.insertFile(a,e,n,mxUtils.bind(this,
+function(a){q();this.fileCreated(a,d,k,g)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),c,!1,n):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),c):
+b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),c,!1,n):b==App.MODE_BROWSER?(q(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,k,g)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(q(),this.fileCreated(new LocalFile(this,
+e,a,null==b),d,k,g))}};
+App.prototype.fileCreated=function(a,e,d,b){var g=window.location.pathname;null!=e&&0<e.length&&(g+="?libs="+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,n=window.location.protocol+"//"+window.location.hostname+g,m=k,q=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(q=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(q.container),
+m=this.decodeNodeIntoGraph(m,q));a.setData(this.createFileData(k,q,a,n));null!=q&&q.container.parentNode.removeChild(q.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=e&&this.sidebar.showEntries(e)}),
+n=mxUtils.bind(this,function(){d||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?n():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=b&&b(),window.openWindow(g,null,n))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
function(){f()}),mxUtils.bind(this,function(a){c();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,d,e){this.hideDialog();var b=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 b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));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!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),
-b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1));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 e=g,h=g.lastIndexOf("."),k=e.lastIndexOf("/");h>k&&0<k&&(e=e.substring(k+1,h),h=g.substring(h),this.useCanvasForExport||
-".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(c=e+h)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+g.substring(31,g.lastIndexOf("&")),d),!0):!1}),!b()&&this.spinner.spin(document.body,
-mxResources.get("loading"))&&this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)?b=this.gitHub:"T"==a.charAt(0)&&(b=this.trello),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),
-mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):
-window.location.hash=a.getHash()}))})))}),g=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=g&&(window.location.hash=g.getHash())}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null==a||0==a.length?k():null!=g&&g.isModified()&&!d?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
-App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor!=LocalLibrary&&(d+="\n"+a.getHash());a.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?d+=" ("+
-mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),d=mxUtils.bind(this,function(d,b){var e=0,k=[],m=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=b&&b()}});if(null!=d)for(var n=0;n<d.length;n++){var p=encodeURIComponent(decodeURIComponent(d[n]));mxUtils.bind(this,
-function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var c=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[d]=a;e--;m()}),f=mxUtils.bind(this,function(){a(b);e--;m()});this.pendingLibraries[b]=!0;var g=b.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
-b&&(b=this.emptyLibraryXml);null!=b?c(new StorageLibrary(this,b,a)):f()}))}catch(y){f()}}),0);else if("U"==g){var n=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=n;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{c(new UrlLibrary(this,a.getText(),n))}catch(y){f()}else f()}),function(){f()})}catch(w){f()}}}else{var p=null;"G"==g?null!=
-this.drive&&null!=this.drive.user&&(p=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{c(a)}catch(y){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
-f())}}})(p,n)}m()});d(mxSettings.getCustomLibraries(),function(){d((urlParams.clibs||"").split(";"))})}};
+App.prototype.loadFile=function(a,e,d,b){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 g=localStorage.getItem(a);if(null!=g)this.fileLoaded(new StorageFile(this,g,a)),null!=b&&b();else throw{message:mxResources.get("fileNotFound")};}catch(c){this.handleError(c,
+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!=d)this.spinner.stop(),this.fileLoaded(d),null!=b&&b();else if("R"==a.charAt(0))this.spinner.stop(),g=decodeURIComponent(a.substring(1)),
+"<"!=g.charAt(0)&&(g=this.editor.graph.decompress(g)),g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),g.getHash=function(){return a},this.fileLoaded(g),null!=b&&b();else if("U"==a.charAt(0)){var k=decodeURIComponent(a.substring(1));this.loadTemplate(k,mxUtils.bind(this,function(c){this.spinner.stop();if(null!=c&&0<c.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var g=k,n=k.lastIndexOf("."),p=g.lastIndexOf("/");
+n>p&&0<p&&(g=g.substring(p+1,n),n=k.substring(n),this.useCanvasForExport||".png"!=n||(n=".xml"),".svg"===n||".xml"===n||".html"===n||".png"===n)&&(d=g+n)}c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):d,!0);c.getHash=function(){return a};this.fileLoaded(c)||"https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),c=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+
+k.substring(31,k.lastIndexOf("&")),e,b),!0):!1}),!c()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",c))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else g=null,"G"==a.charAt(0)?g=this.drive:"D"==a.charAt(0)?g=this.dropbox:"W"==a.charAt(0)?g=this.oneDrive:"H"==a.charAt(0)?g=this.gitHub:"T"==a.charAt(0)&&(g=this.trello),null==g?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),g.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=b&&b()}),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(),n=mxUtils.bind(this,function(){null!=k&&k.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=k&&(window.location.hash=k.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()});null==a||0==a.length?n():null!=k&&k.isModified()&&!e?window.openWindow(this.getUrl()+"#"+a,null,n):n()};
+App.prototype.getLibraryStorageHint=function(a){var e=a.getTitle();a.constructor!=LocalLibrary&&(e+="\n"+a.getHash());a.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?e+=" ("+
+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),e=mxUtils.bind(this,function(d,b){var e=0,k=[],n=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=b&&b()}});if(null!=d)for(var m=0;m<d.length;m++){var q=encodeURIComponent(decodeURIComponent(d[m]));mxUtils.bind(this,
+function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var c=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[d]=a;e--;n()}),f=mxUtils.bind(this,function(){a(b);e--;n()});this.pendingLibraries[b]=!0;var g=b.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
+b&&(b=this.emptyLibraryXml);null!=b?c(new StorageLibrary(this,b,a)):f()}))}catch(y){f()}}),0);else if("U"==g){var m=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=m;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{c(new UrlLibrary(this,a.getText(),m))}catch(y){f()}else f()}),function(){f()})}catch(w){f()}}}else{var q=null;"G"==g?null!=
+this.drive&&null!=this.drive.user&&(q=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(q=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{c(a)}catch(y){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
+f())}}})(q,m)}n()});e(mxSettings.getCustomLibraries(),function(){e((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
this.shareButton=null)}};
-App.prototype.save=function(a,d){var e=this.getCurrentFile(),b=mxResources.get("saving");null!=e&&e.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=e&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==e&&(e.isModified()?e.isAutosave()||e.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
-d&&d()}),g=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==e.getTitle()?e.save(!0,b,g):e.saveAs(a,b,g)}};
-App.prototype.pickFolder=function(a,d,e){e=null!=e?e:!0;var b=this.spinner.pause();e&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var e=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(e=a.docs[0].id);d(e)}})):e&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,d(a))})):e&&a==App.MODE_GITHUB&&
-null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):e&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,d,e,b,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,b?this.base64ToBlob(a,e):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(d,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),e,b,!1):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_BROWSER&&(e=mxUtils.bind(this,function(){localStorage.setItem(d,a)}),null==localStorage.getItem(d)?
-e():this.confirm(mxResources.get("replaceIt",[d]),e))};
-App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var d=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
-""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var d=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),d,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
-App.prototype.showAuthDialog=function(a,d,e,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=e&&e(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,d,e,b,g,k){var m=d;/\.svg$/i.test(m)||(m=m.substring(0,d.lastIndexOf("."))+b);var n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if((/\.vsdx$/i.test(d)||/\.vsd$/i.test(d))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",a,!0);n||(p.responseType="blob");p.onload=mxUtils.bind(this,function(){var a=null;n?(a=JSON.parse(p.responseText),
-a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,m,!0))}),k,d)});p.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(d)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,m,!0)):g(new LocalFile(this,b,d,!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,m,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,m,!0))}catch(h){null!=k&&k(h)}});e=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||null!=e&&"image/"==e.substring(0,6);n?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(d)?
-"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,e)}};
+App.prototype.save=function(a,e){var d=this.getCurrentFile(),b=mxResources.get("saving");null!=d&&d.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=d&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==d&&(d.isModified()?d.isAutosave()||d.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
+e&&e()}),g=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,b,g):d.saveAs(a,b,g)}};
+App.prototype.pickFolder=function(a,e,d){d=null!=d?d:!0;var b=this.spinner.pause();d&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var d=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(d=a.docs[0].id);e(d)}})):d&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,e(a))})):d&&a==App.MODE_GITHUB&&
+null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):d&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(a,e,d,b,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),d,b,!1):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,a)}),null==localStorage.getItem(e)?
+d():this.confirm(mxResources.get("replaceIt",[e]),d))};
+App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
+""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var e=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),e,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
+App.prototype.showAuthDialog=function(a,e,d,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(n){this.editor.setStatus(mxUtils.htmlEntities(n.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,e,d,b,g,k){var n=e;/\.svg$/i.test(n)||(n=n.substring(0,e.lastIndexOf("."))+b);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if((/\.vsdx$/i.test(e)||/\.vsd$/i.test(e))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var q=new XMLHttpRequest;q.open("GET",a,!0);m||(q.responseType="blob");q.onload=mxUtils.bind(this,function(){var a=null;m?(a=JSON.parse(q.responseText),
+a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([q.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,n,!0))}),k,e)});q.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(e)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,n,!0)):g(new LocalFile(this,b,e,!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,n,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):g(new LocalFile(this,b,n,!0))}catch(h){null!=k&&k(h)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||null!=d&&"image/"==d.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(e)?
+"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,d)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));
@@ -7537,10 +7537,10 @@ this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":
"javascript:void(0);");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,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&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.toolbar.container.style.paddingLeft="56px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("href","javascript:void(0);");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="5px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"26px":"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,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var d=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
-"')"});this.addListener("formatWidthChanged",d);d();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";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);var e=this.hsplitPosition,b=!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(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?e:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
+"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,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
+"')"});this.addListener("formatWidthChanged",e);e();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";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);var d=this.hsplitPosition,b=!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(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?d:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
"8px",this.fullscreenElement.style.top="8px");"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("href","javascript:void(0);"),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="5px",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,"click",mxUtils.bind(this,
function(a){this.toggleCompactMode();mxEvent.consume(a)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};
@@ -7554,76 +7554,76 @@ Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.
(null!=d.pictureUrl?'<img style="margin-right:10px;border-radius:50%;" src="'+d.pictureUrl+'"/>':'<img style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=d.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(d.displayName)+"</b><br><small>"+mxUtils.htmlEntities(d.email)+"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",d=document.createElement("div"),d.style.textAlign="center",
d.style.padding="12px",d.style.background="whiteSmoke",d.style.borderTop="1px solid #e0e0e0",d.style.whiteSpace="nowrap",d.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(d)));d=
-mxUtils.bind(this,function(a,d,e,n){null!=a&&(b&&this.userPanel.appendChild(document.createElement("hr")),b=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=d?'<img style="margin-right:10px;" src="'+d+'" 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!=n?"<br><br><small>"+
-mxUtils.htmlEntities(n)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=e&&a.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(a))});null!=this.dropbox&&d(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==
+mxUtils.bind(this,function(a,d,e,m){null!=a&&(b&&this.userPanel.appendChild(document.createElement("hr")),b=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=d?'<img style="margin-right:10px;" src="'+d+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=m?"<br><br><small>"+
+mxUtils.htmlEntities(m)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=e&&a.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(a))});null!=this.dropbox&&d(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&&d(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&&d(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&&d(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"));b||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));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)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
-var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);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,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var d=Menus.prototype.init;Menus.prototype.init=function(){d.apply(this,
-arguments);var a=this.editorUi,e=a.editor.graph,k=mxUtils.bind(e,e.isEnabled),m=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);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,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this,
+arguments);var a=this.editorUi,d=a.editor.graph,k=mxUtils.bind(d,d.isEnabled),n=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),q=("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),c=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
-"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,m){b=parseInt(b);!isNaN(b)&&0<b&&
-a.exportSvg(b/100,c,d,e,f,g,h,!k,m)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),g=a.addCheckbox(b,
+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,n){b=parseInt(b);!isNaN(b)&&0<b&&
+a.exportSvg(b/100,c,d,e,f,g,h,!k,n)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,
mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,l,g,h,k,m){a.createHtml(b,c,d,e,f,l,g,h,k,m,mxUtils.bind(this,function(b,c){var d=
+!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,l,g,h,k,n){a.createHtml(b,c,d,e,f,l,g,h,k,n,mxUtils.bind(this,function(b,c){var d=
a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var d=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!e.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
-mxEvent.addListener(d,"change",function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!d.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){e.getSelectionCells();
-if(1==e.getSelectionCount()){var b=e.getSelectionCell(),c=e.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
+mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();
+if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+
"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(F){a.handleError(F)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+
"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var f=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=
-!a.isMathEnabled();e.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&
-a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=e.getSelectionCells(),c=[],d=0;d<b.length;d++)e.getModel().isVertex(b[d])&&c.push(b[d]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var u="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
-a.actions.addAction("copyStyle",function(){var b=e.view.getState(e.getSelectionCell());if(e.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=e.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var d=b[c],f=d.indexOf("=");if(0<=f){var g=d.substring(0,f),d=d.substring(f+1);null==a.copiedStyle[g]&&"none"==d&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&
-null!=a.copiedStyle){e.getModel().beginUpdate();try{for(var b=e.getSelectionCells(),c=0;c<b.length;c++)for(var d=e.view.getState(b[c]),f=0;f<u.length;f++){var g=u[f],h=a.copiedStyle[g];d.style[g]!=h&&e.setCellStyles(g,h,[b[c]])}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
-320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,m)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
-function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,m){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
-null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){e.setShadowVisible(!e.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return e.shadowVisible});var t=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){t=!1}),t=!0)},null,null,"F1"));a.actions.addAction("userManual...",
+!a.isMathEnabled();d.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&
+a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var u="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
+a.actions.addAction("copyStyle",function(){var b=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<u.length;f++){var g=u[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,n)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
+function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
+null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return d.shadowVisible});var 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?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):
a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",
function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));f=a.actions.addAction("find...",mxUtils.bind(this,function(){null==
this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=
this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=
-d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
-c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,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 f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
-null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));d.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);
+d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var t=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=t.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
+c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,
+null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
+null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);
this.addMenuItems(b,["support","-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);
this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],
-c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=e.getGraphBounds(),b=e.view.translate,d=e.view.scale;e.insertVertex(c,null,"",a.x/d-b.x,a.y/d-b.y,a.width/d,a.height/d,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){e.isSelectionEmpty()||(mxLog.show(),
-mxLog.debug("sb.createVertexTemplateFromData('"+e.compress(mxUtils.getXml(e.encodeCells(e.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=e.getGraphBounds(),c=e.view.scale,d=mxUtils.createXmlDocument(),f=d.createElement("output");d.appendChild(f);d=new mxXmlCanvas2D(f);
-d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var l=0,g=d.save;d.save=function(){l++;g.apply(this,arguments)};var h=d.restore;d.restore=function(){l--;h.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,l);k.apply(this,arguments);mxLog.debug("leaving shape",a,l)};a.drawState(e.getView().getState(e.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",l)})),this.addMenuItems(b,["testXmlImageExport"],
+c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),
+mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);
+e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var l=0,g=e.save;e.save=function(){l++;g.apply(this,arguments)};var h=e.restore;e.restore=function(){l--;h.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,l);k.apply(this,arguments);mxLog.debug("leaving shape",a,l)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",l)})),this.addMenuItems(b,["testXmlImageExport"],
c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),
this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,
arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",
function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",
-function(){a.getCurrentFile();if(e.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",
-b,function(b,c,d,e,f,l,g,h,k,m){a.createHtml(b,c,d,e,f,l,g,h,k,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");
+function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",
+b,function(b,c,d,e,f,l,g,h,k,n){a.createHtml(b,c,d,e,f,l,g,h,k,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");
d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=
/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));
a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=
-e.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-e.view.translate.y)/e.view.scale)+2,function(b,c,d,e,f,l,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+g+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,l,k)+'"></iframe>');a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",
+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,l,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+g+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,l,k)+'"></iframe>');a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",
new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,l));a.showDialog(l.container,440,240,!0,!0);l.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});f=a.actions.addAction("search",
-function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){e.isEditing()&&e.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var d=a.createLoadMessage("save");
-d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,
+function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");
+e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,
"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,
["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,
-this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,d){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var d=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
-c){e.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=d;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=h(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
-(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");l(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var l=mxUtils.bind(this,function(b,c,d){var f=e.view,g=e.getGraphBounds(),l=e.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*e.gridSize)),h=e.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*e.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=
-!0,k=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,k,m){f=g?Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/m)):1;a.importFile(b,c,l,h,Math.round(k*f),Math.round(m*f),d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;k()}):k()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,l,h,0,0,
-d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),h=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},d):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){l(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d));a.showCsvImport&&b.addItem(mxResources.get("csv")+"...",
-null,function(){a.showImportCsvDialog()},d)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&"min"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
+this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,e){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
+c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=h(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
+(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");l(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var l=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),l=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),h=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,k=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,k,n){f=g?Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/n)):1;a.importFile(b,c,l,h,Math.round(k*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;k()}):k()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,l,h,0,0,
+e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),h=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},e):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},e,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},e);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},e):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},e):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
+e,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},e):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);b.addSeparator(e);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},e);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},e);a.isOffline()||(b.addSeparator(e),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){l(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},e));a.showCsvImport&&b.addItem(mxResources.get("csv")+"...",
+null,function(){a.showImportCsvDialog()},e)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&"min"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
c);"min"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",
mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):
null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&k.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?
@@ -7632,18 +7632,18 @@ function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.ha
function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));
a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||
this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),w=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),
-c)},y=function(a,b,c,d){var f=e.isMouseInsertPoint()?e.getInsertPoint():e.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),d);a.vertex=!0;e.getModel().beginUpdate();try{a=e.addCell(a),e.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{e.getModel().endUpdate()}e.scrollCellToVisible(a);e.setSelectionCell(a);e.container.focus();e.editAfterInsert&&e.startEditing(a);return a};a.actions.addAction("insertText",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
-e.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&y("",
-80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):
+c)},y=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+d.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",
+80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):
w(a,b,mxResources.get(x[c])+"...",x[c])})));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,d){null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?
-b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?
+b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
"...",null,function(){a.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),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()},d))}));this.put("newLibrary",new Menu(function(b,d){"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)},d):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=
-a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},
-d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,
-null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):m&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));
-null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("newLibrary",new Menu(function(b,d){"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)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=
+a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},
+d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,
+null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));
+null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},
d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(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()},d))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",
@@ -7653,89 +7653,89 @@ urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","c
["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();
null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,
["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&
-d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var e=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,d){if(480>=screen.width&&a==this.get("help")){d.style.paddingRight="0px";d.style.paddingLeft="0px";d.innerHTML="";var b=document.createElement("img");
-b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);d.appendChild(b)}e.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
-DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,d,e){this.ui=a;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,d,e){this.ui=a;this.oldIndex=d;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(a,d){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,d=this.ui.editor,e=d.graph,b=d.graph.compress(e.zapGremlins(mxUtils.getXml(d.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState);
-d.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,d,e,b){SelectPage.call(this,a,e);this.relatedPage=d;this.index=b;this.previousIndex=null}
+d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,e){if(480>=screen.width&&a==this.get("help")){e.style.paddingRight="0px";e.style.paddingLeft="0px";e.innerHTML="";var b=document.createElement("img");
+b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);e.appendChild(b)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,e,d){this.ui=a;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,e,d){this.ui=a;this.oldIndex=e;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(a,e){this.ui=a;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e))}
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,e=this.ui.editor,d=e.graph,b=e.graph.compress(d.zapGremlins(mxUtils.getXml(e.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=d.getViewState();a.root=d.model.root;d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.rootChanged(a.root);d.setViewState(a.viewState);
+e.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.sizeDidChange();this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,e,d,b){SelectPage.call(this,a,d);this.relatedPage=e;this.index=b;this.previousIndex=null}
mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
-EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var d=0;d<this.pages.length;d++)if(this.pages[d].getId()==a)return this.pages[d];return null};
-EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,d=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(a.view,arguments)});var e=!1,b=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var d=this.currentPage;null!=d&&d!=b&&(null==d.viewState||null==d.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):
-(a.container.scrollLeft=a.view.translate.x*a.view.scale+d.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+d.viewState.scrollTop),b=d);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=
-!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),e=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),g=a.getAttribute("pageHeight"),k=a.getAttribute("background"),m=a.getAttribute("backgroundImage"),m=null!=m&&0<m.length?JSON.parse(m):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=m?new mxImage(m.src,m.width,m.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=g?new mxRectangle(0,0,parseFloat(b),parseFloat(g)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==a)return this.pages[e];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,e=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(a.view,arguments)});var d=!1,b=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var e=this.currentPage;null!=e&&e!=b&&(null==e.viewState||null==e.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):
+(a.container.scrollLeft=a.view.translate.x*a.view.scale+e.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+e.viewState.scrollTop),b=e);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=
+!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var e=a.getAttribute("page"),d=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),g=a.getAttribute("pageHeight"),k=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
+a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=g?new mxRectangle(0,0,parseFloat(b),parseFloat(g)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
a.pageFormat,this.view.scale=a.scale,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=
mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.background=this.defaultGraphBackground,this.backgroundImage=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize=
-this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var d=this.editor.extractGraphModel(a.node);if(null!=d){a.graphModelNode=d;a.viewState=this.editor.graph.createViewState(d);var e=new mxCodec(d.ownerDocument);a.root=e.decode(d).root}else a.root=this.editor.graph.model.createRoot()}return a};
-EditorUi.prototype.selectPage=function(a,d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();e.add(b);e.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))};
-EditorUi.prototype.selectNextPage=function(a){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),a?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,d){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();d=null!=d?d:this.pages.length;var e=new ChangePage(this,a,a,d);this.editor.graph.model.execute(e)}return a};
-EditorUi.prototype.createPage=function(a){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(a[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=a[e]);return e};
-EditorUi.prototype.removePage=function(a){var d=this.editor.graph;if(d.isEnabled()){d.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;e=this.pages[b]}else e=this.insertPage(),d.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));d.model.execute(new ChangePage(this,a,e))}finally{d.model.endUpdate()}}return a};
-EditorUi.prototype.duplicatePage=function(a,d){var e=this.editor.graph,b=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=e.cloneCells([e.model.root])[0],b.viewState=e.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(d),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
-EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};EditorUi.prototype.movePage=function(a,d){this.editor.graph.model.execute(new MovePage(this,a,d))};
+this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var e=this.editor.extractGraphModel(a.node);if(null!=e){a.graphModelNode=e;a.viewState=this.editor.graph.createViewState(e);var d=new mxCodec(e.ownerDocument);a.root=d.decode(e).root}else a.root=this.editor.graph.model.createRoot()}return a};
+EditorUi.prototype.selectPage=function(a,e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();d.add(b);d.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))};
+EditorUi.prototype.selectNextPage=function(a){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),a?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,e){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();e=null!=e?e:this.pages.length;var d=new ChangePage(this,a,a,e);this.editor.graph.model.execute(d)}return a};
+EditorUi.prototype.createPage=function(a){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(a[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=a[d]);return d};
+EditorUi.prototype.removePage=function(a){var e=this.editor.graph;if(e.isEnabled()){e.model.beginUpdate();try{var d=this.currentPage;if(d==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;d=this.pages[b]}else d=this.insertPage(),e.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1])));e.model.execute(new ChangePage(this,a,d))}finally{e.model.endUpdate()}}return a};
+EditorUi.prototype.duplicatePage=function(a,e){var d=this.editor.graph,b=null;d.isEnabled()&&(d.isEditing()&&d.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=d.cloneCells([d.model.root])[0],b.viewState=d.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(e),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
+EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return a};EditorUi.prototype.movePage=function(a,e){this.editor.graph.model.execute(new MovePage(this,a,e))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="12px";d.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,e){this.pages[b]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(e,
-"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));d.appendChild(e)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d);
-b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(d.clientWidth>this.tabContainer.clientWidth-e){null!=b&&(b.style.position="absolute",b.style.right="0px",d.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var n=this.createControlTab(4,
-"&nbsp;&#10095;");n.style.position="absolute";n.style.right=this.editor.chromeless?"0px":"29px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var p=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=p+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,p-20);mxUtils.setOpacity(m,0<d.scrollLeft?100:50);mxUtils.setOpacity(n,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
-0<d.scrollLeft?100:50);mxUtils.setOpacity(n,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,p-20);mxUtils.setOpacity(m,0<d.scrollLeft?100:50);mxUtils.setOpacity(n,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(a){var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="8px 4px 8px 4px";d.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";d.style.borderBottomStyle="solid";d.style.backgroundColor=this.tabContainer.style.backgroundColor;
-d.style.cursor="default";d.style.color="gray";a&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(d.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return d};
-EditorUi.prototype.createControlTab=function(a,d){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="12px";e.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+d)/this.pages.length)+1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(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()}));e.appendChild(d)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);
+b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=b&&(b.style.position="absolute",b.style.right="0px",e.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);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 q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=q+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){e.scrollLeft-=Math.max(20,q-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(m,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
+0<e.scrollLeft?100:50);mxUtils.setOpacity(m,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){e.scrollLeft+=Math.max(20,q-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(m,e.scrollLeft<e.scrollWidth-e.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 e=document.createElement("div");e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="8px 4px 8px 4px";e.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";e.style.borderBottomStyle="solid";e.style.backgroundColor=this.tabContainer.style.backgroundColor;
+e.style.cursor="default";e.style.color="gray";a&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(e.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return e};
+EditorUi.prototype.createControlTab=function(a,e){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,
function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),g=mxEvent.getClientY(a);d.popup(b,g,null,a);this.setCurrentMenu(d);
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),e=mxEvent.getClientY(a);d.popup(b,e,null,a);this.setCurrentMenu(d);
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,d,e){e=this.createTab(e);var b=a.getName();e.setAttribute("title",b);mxUtils.write(e,b);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(a,e);42<d&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var e=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;g=a==this.currentPage;e.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var n=mxEvent.getClientX(k),p=mxEvent.getClientY(k);m.popup(n,p,null,k);this.setCurrentMenu(m,d)}mxEvent.consume(k)}}))};
-EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(e,b){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);e.addSeparator(b);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,b){b.setAttribute("page",e.page.getId());return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.page=a.ui.getPageById(e.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,b){b.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(b.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,b));return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(e.getAttribute("relatedPage"));if(null==b.relatedPage){var d=document.createElement("diagram");d.setAttribute("id",e.getAttribute("relatedPage"));
-d.setAttribute("name",e.getAttribute("name"));b.relatedPage=new DiagramPage(d);e=e.cloneNode(!0);d=e.firstChild;if(null!=d)for(b.relatedPage.root=a.decodeCell(d,!1),b=d.nextSibling,d.parentNode.removeChild(d),d=b;null!=d;){b=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==a.lookup(k)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=b}}return e};a.afterDecode=function(a,e,b){b.index=b.previousIndex;return b};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",d=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,b,e,n,p){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),m=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g],
-a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=d.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=x.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 p(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;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=q.getOutgoingEdges(q.model.getTerminal(d[0],
-!0));if(null!=m){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,p=g=d=0;p<m.length;p++){var w=q.model.getTerminal(m[p],!1);if(f==n(w)){var u=q.view.getState(w);w!=a&&null!=u&&(t&&b!=u.getCenterX()<h.getCenterX()||!t&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/k))}}t?g=0:d=0;for(p=0;p<m.length;p++)if(w=q.model.getTerminal(m[p],
-!1),f==n(w)&&(u=q.view.getState(w),w!=a&&null!=u&&(t&&b!=u.getCenterX()<h.getCenterX()||!t&&b!=u.getCenterY()<h.getCenterY()))){var D=[];q.traverse(u.cell,!0,function(a,b){null!=b&&D.push(b);D.push(a);return!0});q.moveCells(D,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function c(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 h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);q.moveCells(g,h,k);return q.addCells(d,e)}finally{q.model.endUpdate()}}function f(a){q.model.beginUpdate();try{var b=
-q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=q.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=q.view.getBounds(f),l=n(a),m=q.view.translate,t=q.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/t-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/t-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/t-m.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function h(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?t.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=h(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 t=this,q=t.editor.graph,x=q.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){w.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))}};t.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");t.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");t.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");t.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+T");var y=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];x.isEdge(g)&&d(g)&&(e.push(g),g=x.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 y.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var l=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
-a)}this.model.beginUpdate();try{var h=l.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=q.getIncomingEdges(h[e]),g=q.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var m=this.cloneCells([g[0]])[0];this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var v=q.moveCells;q.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var 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!=l&&f!=l&&null!=this.view.getState(a[0])){var p=q.getIncomingEdges(a[0]);if(0<p.length){var w=q.view.getState(q.model.getTerminal(p[0],!0));if(null!=w){var u=q.view.getState(l);null!=u&&(c=(u.getCenterX()-w.getCenterX())/q.view.scale,d=(u.getCenterY()-w.getCenterY())/q.view.scale)}}}}k=v.apply(this,arguments);
-if(null!=k&&null!=a&&k.length==a.length)for(t=0;t<k.length;t++)if(this.model.isEdge(k[t]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[t],!0))&&this.model.setTerminal(k[t],l,!0);else if(b(a[t])&&(p=q.getIncomingEdges(a[t]),0<p.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(p[0],!0))&&this.model.setTerminal(p[0],l,!0);else if(0==q.getIncomingEdges(k[t]).length){m=l;if(null==m||m==q.model.getParent(a[t]))m=q.model.getTerminal(p[0],!0);e=this.cloneCells([p[0]])[0];this.addEdge(e,
-q.getDefaultParent(),m,k[t])}}finally{this.model.endUpdate()}return k};if(null!=t.sidebar){var H=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=H.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=q.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:t.actions.get("selectChildren"),
-84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},A=t.onKeyDown;t.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var d=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(q.getSelectionCell()):f(q.getSelectionCell()):13==a.which&&(d=p(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&q.model.isEdge(d[0])?q.setSelectionCell(q.model.getTerminal(d[0],
-!1)):q.setSelectionCell(d[d.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=E[a.keyCode];null!=e&&(e.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(I){console.log("error",I)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var C=q.connectVertex;q.connectVertex=function(a,d,e,g,h,k){var l=q.getIncomingEdges(a);return b(a)&&0<l.length?(e=n(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):p(a,d!=mxConstants.DIRECTION_NORTH&&
-d!=mxConstants.DIRECTION_WEST)):C.call(this,a,d,e,g,h,k)};q.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&q.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+EditorUi.prototype.createTabForPage=function(a,e,d){d=this.createTab(d);var b=a.getName();d.setAttribute("title",b);mxUtils.write(d,b);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(a,d);42<e&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(a,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){b=null!=this.currentMenu;g=a==this.currentPage;d.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var m=mxEvent.getClientX(k),q=mxEvent.getClientY(k);n.popup(m,q,null,k);this.setCurrentMenu(n,e)}mxEvent.consume(k)}}))};
+EditorUi.prototype.createPageMenu=function(a,e){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,e)}),b);d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
+mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,b){b.setAttribute("page",d.page.getId());return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.page=a.ui.getPageById(d.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,b){b.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(b.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,b));return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(d.getAttribute("relatedPage"));if(null==b.relatedPage){var e=document.createElement("diagram");e.setAttribute("id",d.getAttribute("relatedPage"));
+e.setAttribute("name",d.getAttribute("name"));b.relatedPage=new DiagramPage(e);d=d.cloneNode(!0);e=d.firstChild;if(null!=e)for(b.relatedPage.root=a.decodeCell(e,!1),b=e.nextSibling,e.parentNode.removeChild(e),e=b;null!=e;){b=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==a.lookup(k)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=b}}return d};a.afterDecode=function(a,d,b){b.index=b.previousIndex;return b};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",e=Graph.prototype.foldCells;
+Graph.prototype.foldCells=function(a,b,d,m,q){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),n=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(n,"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=c;d=e.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function m(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=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=t.view.getState(a),k=t.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=t.getOutgoingEdges(t.model.getTerminal(d[0],
+!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<n.length;q++){var u=t.model.getTerminal(n[q],!1);if(f==m(u)){var w=t.view.getState(u);u!=a&&null!=w&&(p&&b!=w.getCenterX()<h.getCenterX()||!p&&b!=w.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,w)&&(d=10+Math.max(d,(Math.min(l.x+l.width,w.x+w.width)-Math.max(l.x,w.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,w.y+w.height)-Math.max(l.y,w.y))/k))}}p?g=0:d=0;for(q=0;q<n.length;q++)if(u=t.model.getTerminal(n[q],
+!1),f==m(u)&&(w=t.view.getState(u),u!=a&&null!=w&&(p&&b!=w.getCenterX()<h.getCenterX()||!p&&b!=w.getCenterY()<h.getCenterY()))){var D=[];t.traverse(w.cell,!0,function(a,b){null!=b&&D.push(b);D.push(a);return!0});t.moveCells(D,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function c(a){t.model.beginUpdate();try{var b=m(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 h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);t.moveCells(g,h,k);return t.addCells(d,e)}finally{t.model.endUpdate()}}function f(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 h=t.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=t.view.getBounds(f),l=m(a),n=t.view.translate,p=t.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function h(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=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?p.actions.get("selectParent").funct():c==b?(d=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=h(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 p=this,t=p.editor.graph,x=t.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var w=p.menus.createPopupMenu;p.menus.createPopupMenu=function(a,c,d){w.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))}};p.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");p.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");p.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");p.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+T");var y=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];x.isEdge(g)&&d(g)&&(e.push(g),g=x.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 y.apply(this,arguments)};p.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var l=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 h=l.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=t.getIncomingEdges(h[e]),g=t.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var n=this.cloneCells([g[0]])[0];this.addEdge(n,t.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var v=t.moveCells;t.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=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 m=0;m<a.length;m++)if(b(a[m])||t.model.isEdge(a[m])&&null==t.model.getTerminal(a[m],!0)){f=t.model.getParent(a[m]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var q=t.getIncomingEdges(a[0]);if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var w=t.view.getState(l);null!=w&&(c=(w.getCenterX()-u.getCenterX())/t.view.scale,d=(w.getCenterY()-u.getCenterY())/t.view.scale)}}}}k=v.apply(this,arguments);
+if(null!=k&&null!=a&&k.length==a.length)for(m=0;m<k.length;m++)if(this.model.isEdge(k[m]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[m],!0))&&this.model.setTerminal(k[m],l,!0);else if(b(a[m])&&(q=t.getIncomingEdges(a[m]),0<q.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==t.getIncomingEdges(k[m]).length){n=l;if(null==n||n==t.model.getParent(a[m]))n=t.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,
+t.getDefaultParent(),n,k[m])}}finally{this.model.endUpdate()}return k};if(null!=p.sidebar){var H=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=H.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=t.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:p.actions.get("selectChildren"),
+84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},A=p.onKeyDown;p.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&&b(t.getSelectionCell())&&1==t.getSelectionCount()){var d=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(t.getSelectionCell()):f(t.getSelectionCell()):13==a.which&&(d=q(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&t.model.isEdge(d[0])?t.setSelectionCell(t.model.getTerminal(d[0],
+!1)):t.setSelectionCell(d[d.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=E[a.keyCode];null!=e&&(e.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(I){console.log("error",I)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var C=t.connectVertex;t.connectVertex=function(a,d,e,g,h,k){var l=t.getIncomingEdges(a);return b(a)&&0<l.length?(e=m(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):q(a,d!=mxConstants.DIRECTION_NORTH&&
+d!=mxConstants.DIRECTION_WEST)):C.call(this,a,d,e,g,h,k)};t.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&t.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var 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 z=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){z.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var 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);k.insertEdge(t,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");q.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-x.geometry.relative=!0;x.edge=!0;b.insertEdge(x,!0);q.insertEdge(x,!1);a.insert(c);a.insert(g);a.insert(t);a.insert(x);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(q);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);k.insertEdge(p,!1);var t=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;");t.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+x.geometry.relative=!0;x.edge=!0;b.insertEdge(x,!0);t.insertEdge(x,!1);a.insert(c);a.insert(g);a.insert(p);a.insert(x);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Organization",
@@ -7745,14 +7745,14 @@ a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new g(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(546,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),
-a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function d(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new g(a,mxResources.get("shapes"),10,56,c-6,Math.min(600,
+a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function e(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new g(a,mxResources.get("shapes"),10,56,c-6,Math.min(600,
b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");
f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
-a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var e=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
-document.getElementsByTagName("head")[0].appendChild(b)}catch(t){}var g=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
+document.getElementsByTagName("head")[0].appendChild(b)}catch(p){}var g=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
@@ -7760,9 +7760,9 @@ Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>')
HoverIcons.prototype.triangleLeft=Graph.createSvgImage(36,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);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.HIGHLIGHT_SIZE=5;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;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var k=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){k.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
-function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):m.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){n.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
-a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.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;";
+25;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var k=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){k.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=Menus.prototype.addShortcut;Menus.prototype.addShortcut=
+function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):n.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
+a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var 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="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
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",
@@ -7780,31 +7780,32 @@ null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.
"top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));F.appendChild(b);return b}u.apply(this,arguments);var g=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);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);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=
mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
-g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){d(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
+g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){e(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
"...",function(){a(g)}));var m=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
-g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));
-if(isLocalStorage){var k=g.menus.get("openFrom"),n=k.funct;k.funct=function(a,b){n.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-",
-"revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var p=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){p.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);g.menus.addMenuItems(a,["publishLink"],b)})));var A=g.menus.get("language");g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);
-null!=A&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+
-mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var C="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
-g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<C.length;c++)"-"==C[c]?a.addSeparator(b):m(a,b,mxResources.get(C[c])+"...",C[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
-"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var F=document.createElement("div");F.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 G=new Menubar(g,F);(k=900>e)||b("diagram");f([k?b("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,c(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),g.actions.get("image"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),c(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile&&(g.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&g.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||
+g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var k=g.menus.get("openFrom"),n=k.funct;k.funct=function(a,b){n.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["createRevision","makeCopy",
+"-","rename","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-","revisionHistory"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var q=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){q.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);g.menus.addMenuItems(a,["publishLink"],b)})));var A=g.menus.get("language");g.menus.put("preferences",
+new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);null!=A&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,
+"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",
+a,b)})));var C="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<C.length;c++)"-"==C[c]?a.addSeparator(b):m(a,b,mxResources.get(C[c])+"...",C[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",
+new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml","embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var F=document.createElement("div");F.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 G=new Menubar(g,F);(k=900>d)||b("diagram");f([k?
+b("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,c(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),g.actions.get("image"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),c(mxResources.get("format"),
+g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)]);var z=b("insert",!0,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([z,c(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)]);if(480<=e){var D=g.actions.get("undo"),k=g.actions.get("redo"),D=c("",D.funct,null,mxResources.get("undo")+" ("+D.shortcut+")",D,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),k=c("",k.funct,
-null,mxResources.get("redo")+" ("+k.shortcut+")",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([D,k]);560<=e&&f([c("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
+null)]);if(480<=d){var D=g.actions.get("undo"),k=g.actions.get("redo"),D=c("",D.funct,null,mxResources.get("undo")+" ("+D.shortcut+")",D,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),k=c("",k.funct,
+null,mxResources.get("redo")+" ("+k.shortcut+")",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([D,k]);560<=d&&f([c("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,
c=h.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&g.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=e?c("",g.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=e?c("",g.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+640<=d?c("",g.actions.get("zoomIn").funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=d?c("",g.actions.get("zoomOut").funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",null,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null])}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var M=g.descriptorChanged;g.descriptorChanged=function(){M.apply(this,arguments);var a=g.getCurrentFile();
if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);F.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else F.removeAttribute("title")};g.setStatusText(g.editor.getStatus());F.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";F.appendChild(g.buttonContainer);g.menubarContainer=
-g.buttonContainer;null!=A&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=e&&(z=G.addMenu("",A.funct),z.setAttribute("title",mxResources.get("language")),z.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+g.buttonContainer;null!=A&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=d&&(z=G.addMenu("",A.funct),z.setAttribute("title",mxResources.get("language")),z.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundSize="24px 24px",z.style.position="absolute",z.style.height="24px",z.style.width="24px",z.style.zIndex="1",z.style.top="11px",z.style.right="14px",mxUtils.setOpacity(z,30),F.appendChild(z));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
k=g.diagramContainer.parentNode;D=document.createElement("div");D.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";var B=g.menus.get("viewZoom");if(null!=B){this.tabContainer.style.right="70px";z=G.addMenu("100%",B.funct);z.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");z.style.whiteSpace="nowrap";z.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
z.style.backgroundPosition="right 6px center";z.style.backgroundRepeat="no-repeat";z.style.paddingRight="10px";z.style.display="block";z.style.position="absolute";z.style.textDecoration="none";z.style.textDecoration="none";z.style.right="0px";z.style.bottom="0px";z.style.overflow="hidden";z.style.textAlign="center";z.style.color="#000";z.style.fontSize="12px";z.style.color="#707070";z.style.width="59px";z.style.borderTop="1px solid lightgray";z.style.borderLeft="1px solid lightgray";z.style.height=
parseInt(g.tabContainer.style.height)-1+"px";z.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";D.appendChild(z);B=mxUtils.bind(this,function(){z.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,B);g.editor.addListener("resetGraphView",B);g.editor.addListener("pageSelected",B);var I=g.setGraphEnabled;g.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(z.style.visibility=this.tabContainer.style.visibility)}}D.appendChild(g.tabContainer);
D.appendChild(F);D.appendChild(g.diagramContainer);k.appendChild(D);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.outlineWindow.fit();null!=g.actions.layersWindow&&g.outlineWindow.fit();null!=g.actions.tagsWindow&&g.tagsWindow.window.fit();null!=g.actions.findWindow&&g.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;
(function(){function c(a){var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!=a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas&&null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value);if(null!=b){if(null!=b.t)return b.t=b.t.replace(/</g,"&lt;"),b.t=b.t.replace(/>/g,"&gt;"),b.t;if(null!=b.Value&&
null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"&lt;"),b.Value.t=b.Value.t.replace(/>/g,"&gt;"),b.Value.t}return""}function u(a){return null!=a.Action?a.Action:a}function q(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else if(null!=a.m)return a.m;return null}function l(c){return h(c)+f(c)+b(c)+a(c)+d(c)+g(c)+n(c)+D(c)+C(c)+y(c)}function h(a){a=
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index adf2cf0f..e0225f5a 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -3318,7 +3318,7 @@ App.prototype.fileCreated = function(file, libs, replace, done)
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
-App.prototype.loadFile = function(id, sameWindow, file)
+App.prototype.loadFile = function(id, sameWindow, file, success)
{
this.hideDialog();
@@ -3354,6 +3354,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
if (data != null)
{
this.fileLoaded(new StorageFile(this, data, id));
+
+ if (success != null)
+ {
+ success();
+ }
}
else
{
@@ -3375,6 +3380,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
// File already loaded
this.spinner.stop();
this.fileLoaded(file);
+
+ if (success != null)
+ {
+ success();
+ }
}
else if (id.charAt(0) == 'R')
{
@@ -3394,6 +3404,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
return id;
};
this.fileLoaded(tempFile);
+
+ if (success != null)
+ {
+ success();
+ }
}
else if (id.charAt(0) == 'U')
{
@@ -3452,7 +3467,7 @@ App.prototype.loadFile = function(id, sameWindow, file)
if (this.drive != null)
{
this.spinner.stop();
- this.loadFile('G' + url.substring(31, url.lastIndexOf('&')), sameWindow);
+ this.loadFile('G' + url.substring(31, url.lastIndexOf('&')), sameWindow, success);
return true;
}
@@ -3517,6 +3532,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
{
this.spinner.stop();
this.fileLoaded(file);
+
+ if (success != null)
+ {
+ success();
+ }
}), mxUtils.bind(this, function(resp)
{
// Makes sure the file does not save the invalid UI model and overwrites anything important
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 1e275eec..61e9a035 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -4,7 +4,7 @@
EditorUi.initMinimalTheme = function()
{
// Disabled in lightbox mode
- if (urlParams['lightbox'] == '1')
+ if (urlParams['lightbox'] == '1' || urlParams['chrome'] == '0')
{
return;
}
@@ -757,8 +757,23 @@ EditorUi.initMinimalTheme = function()
menu.addSeparator(parent);
ui.menus.addSubmenu('save', menu, parent);
}
-
+
ui.menus.addSubmenu('exportAs', menu, parent);
+
+ var file = ui.getCurrentFile();
+
+ if (file != null && file.constructor == DriveFile)
+ {
+ ui.menus.addMenuItems(menu, ['-', 'share'], parent);
+
+ if (file.realtime != null)
+ {
+ ui.menus.addMenuItems(menu, ['chatWindowTitle'], parent);
+ }
+
+ menu.addSeparator(parent);
+ }
+
ui.menus.addMenuItems(menu, ['-', 'outline', 'layers', '-', 'find', 'tags', '-'], parent);
// Cannot use print in standalone mode on iOS as we cannot open new windows
@@ -799,7 +814,7 @@ EditorUi.initMinimalTheme = function()
if (file != null && file.constructor == DriveFile)
{
- ui.menus.addMenuItems(menu, ['share', '-', 'makeCopy', 'moveToFolder'], parent);
+ ui.menus.addMenuItems(menu, ['createRevision', 'makeCopy', '-', 'rename', 'moveToFolder'], parent);
}
else
{
@@ -811,11 +826,6 @@ EditorUi.initMinimalTheme = function()
ui.menus.addMenuItems(menu, ['-', 'revisionHistory'], parent);
}
- if (file != null && file.constructor == DriveFile)
- {
- ui.menus.addMenuItems(menu, ['createRevision'], parent);
- }
-
ui.menus.addMenuItems(menu, ['-', 'autosave'], parent);
})));
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index ac86eb55..00aa6fd3 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.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")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index 6337d40b..cc2db01c 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.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")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index fd6de682..70d5aee7 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -3075,8 +3075,8 @@ b.container.clientHeight-30),function(b){function d(d,c){var f=a.menus.get(d),g=
c.className="geTitle";mxUtils.write(c,mxResources.get("moreShapes"));b.appendChild(c);mxEvent.addListener(c,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){c=document.createElement("div");c.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";c.className="geTitle";var f=document.createElement("span");
f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("newLibrary").funct);c=document.createElement("div");c.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;";c.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
mxUtils.write(f,mxResources.get("openLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("openLibrary").funct)}else c=d("newLibrary",mxResources.get("newLibrary")),c.style.left="0",c=d("openLibraryFrom",mxResources.get("openLibraryFrom")),c.style.borderLeft="1px solid lightgray",c.style.left="50%";else c.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
-a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var e=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
+a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));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){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
document.getElementsByTagName("head")[0].appendChild(c)}catch(n){}var h=function(a,b,d,c,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,d,c,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 d=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,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
@@ -3107,14 +3107,15 @@ null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.
mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+"...";g.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&
g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+
"...",function(){a(g)}));var p=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&
-g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));
-if(isLocalStorage){var m=g.menus.get("openFrom"),q=m.funct;m.funct=function(a,b){q.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["share","-","makeCopy","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-",
-"revisionHistory"],b);null!=c&&c.constructor==DriveFile&&g.menus.addMenuItems(a,["createRevision"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var u=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){u.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);g.menus.addMenuItems(a,["publishLink"],b)})));var F=g.menus.get("language");g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);
-null!=F&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+
-mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");
-g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):p(a,b,mxResources.get(x[c])+"...",x[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml",
-"embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var A=document.createElement("div");A.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 E=new Menubar(g,A);(m=900>e)||c("diagram");f([m?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),g.actions.get("image"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile&&(g.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&g.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));g.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||
+g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var m=g.menus.get("openFrom"),q=m.funct;m.funct=function(a,b){q.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["createRevision","makeCopy",
+"-","rename","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-","revisionHistory"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var u=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){u.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);g.menus.addMenuItems(a,["publishLink"],b)})));var F=g.menus.get("language");g.menus.put("preferences",
+new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);null!=F&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-","plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,
+"importText createShape - importCsv editDiagram - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",
+a,b)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):p(a,b,mxResources.get(x[c])+"...",x[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),b)})));g.menus.put("embed",
+new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,["embedImage","embedSvg","-","embedHtml","embedIframe"],b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var A=document.createElement("div");A.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 E=new Menubar(g,A);(m=900>e)||c("diagram");f([m?
+c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),g.actions.get("image"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),
+g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",null,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)]);var y=c("insert",!0,m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([y,d(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),m?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)]);if(480<=e){var z=g.actions.get("undo"),m=g.actions.get("redo"),z=d("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),m=d("",m.funct,
null,mxResources.get("redo")+" ("+m.shortcut+")",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([z,m]);560<=e&&f([d("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,